Initiate Checkout Transaction

The Initiate Checkout endpoint creates a new checkout session for your customer. This generates a one-time payment address and reference details, allowing the payer to complete their transaction.

📝 Key Notes

  • A valid email address must be included in the request body. This is used to notify the customer about each payment step.

  • Customers are expected to pay directly from their exchange/wallet, copying the provided address and destination tag (when required).

  • Each session is valid for 5 minutes. After expiration, a new request will be automatically generated if the customer is still on the checkout screen.

Endpoint

POST

{{base_url}}/api/checkout/initiate-checkout/

Example Request

curl --location '{{base_url}}/api/checkout/initiate-checkout/' \
--header 'X-Api-Key: *******************' \
--header 'X-Api-Id: ****************' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount": 2000.00,
  "from_currency": "USDC",
  "to_currency": "NGN",
  "chain": "BASE",
  "reference": "28282882882",
  "description": "Payment for goods or services"
  "email": "[email protected]"
}'

Request Body Parameters

Name
Type
Required
Description

amount

number

✅ Yes

The fiat amount to charge. Supported: NGN, GHS, ZAR, KES.

from_currency

string

✅ Yes

The cryptocurrency the customer will pay with. Supported: USDT, USDC, SOL.

to_currency

string

✅ Yes

The fiat currency you want to receive. Supported: NGN, GHS, ZAR, KES.

chain

string

✅ Yes

The blockchain/network of the from_currency (e.g., BASE, POLYGON, SOLANA).

email

string

✅ Yes

Customer’s valid email address for notifications.

reference

string

✅ Yes

Merchant reference ID (up to 32 characters). Recommended: generate unique references for reconciliation.

description

string

Optional

If not provided would default to "Payment for goods or services"

Example Response (200 OK)

Response Field Definitions

Field
Type
Description

payment_reference_id

string

Unique Kazza-generated ID for the transaction.

crypto_amount

number

Exact amount of crypto the customer must send.

merchant_fiat_amount

string

Fiat equivalent the merchant will receive.

merchant_reference_id

string

Reference you provided in the request.

payment_address

string

Wallet address the customer should send to.

payment_address_tag

string

Destination tag/memo if required (e.g., XLM, XRP).

expires_at

string

Expiration timestamp for this checkout session.

status

string

Initial transaction status. Usually payment_pending.

origin_asset_code

string

The crypto being paid (e.g., USDC).

destination_asset_code

string

The fiat settlement currency (e.g., NGN).

checkout_link

string

Shareable checkout page link.


🧑‍💻 Developer Notes

  • Customers must pay the exact crypto amount (crypto_amount) displayed.

  • Merchants will receive settlement in fiat (merchant_fiat_amount) or crypto, depending on configuration.

  • Always verify the transaction status via:

    • Webhook notifications, or

    • GET /api/checkout/verify-payment-request/{payment_reference_id}.

  • Sessions expire after 5 minutes. Always handle expired status gracefully.

Last updated