Generate Transaction

View as Markdown
### Generate Transaction The **Generate Transaction** endpoint creates a web payment link for a specific payment channel. You can redirect your customer to this link so they can complete the payment. After the payment is processed, the user will be **automatically redirected** to either the `success_redirect_url` or the `failure_redirect_url`, depending on whether the payment was successful. To receive real-time payment updates, you may use the `callback_webhook_url`, which will notify your system once the payment status is confirmed. **Response Fields:** - `status` — starts as `pending`; final values are `completed` or `cancelled`. - `provider_reference_no` — the upstream provider reference number; may be `null` or a string. - `other_reference_no` — an additional reference number; may be `null` or a string.

Authentication

AuthorizationBearer

Bearer token obtained from the Create Token endpoint. Tokens are valid for ~60 minutes — cache and reuse a token for its full lifetime instead of re-authenticating per request.

Request

This endpoint expects an object.
channel_codestringRequired

The payment channel to use. Values are available via the Get Channels endpoint — refer to the code field in its response.

amountdoubleRequired0.01-50000
Amount to collect. Must be between 0.01 and 50,000.
reference_nostringRequired

Your unique reference for this transaction. Each reference_no can be used only once, making it a natural idempotency key — reuse the same value when retrying the same intent. See the Idempotency & Safe Retries guide.

success_redirect_urlstringOptionalformat: "uri"
Optional. Where the customer's browser is redirected after a successful payment.
failure_redirect_urlstringOptionalformat: "uri"
Optional. Where the customer's browser is redirected if the payment fails or is cancelled.
callback_webhook_urlstringOptionalformat: "uri"

Optional but strongly recommended. URL that receives a server-side webhook once the final payment status is known. See the Webhooks & Redirects guide.

Response

OK
messagestring
dataobject

Errors

401
Unauthorized Error
422
Unprocessable Entity Error