Skip to content

Create Invoice

C4 edited this page Jun 11, 2024 · 2 revisions
<?php

use Illuminate\Support\Facades\Http;

$response = Http::accept("application/json")->post(
    "https://yourdomain.com/api/createCashiersInvoice",
    [
        "auth_token" => "YourSiteAPIKey_asDefined_inAdminPanel",
        "amount" => 20,
        "invoice_no" => "ExternalInvoiceID",
        "user_id" => 69,
        "username" => "test",
        "duration" => "3 days",
        "ip" => "0.0.0.0",
    ]
);
$result = json_decode($response->body());
if ($result->status && isset($result->invoice_url)) {
    header("Location: $result->invoice_url");
}

Visit the URL and select a payment method. Only after a payment method is selected will it appear under invoices in the admin panel.

Clone this wiki locally