POST
/payment/zibapay/order/createAPIAuthentication:Bearer token
Authorization: Bearer <token>Security requirement: 403 CSRF Protection
Direct server-to-server calls authenticated via Bearer tokens do not require CSRF headers. If you instead invoke mutation endpoints from a web browser using cookie-based sessions, you must include the following header:
X-Requested-With: XMLHttpRequestRequest body
| Field | Type | Required | Description |
|---|---|---|---|
order.amount | number | Required | Stored on the Ziba Pay order and sent to TransactPay. |
order.currency | string | Required | 3-letter currency sent to TransactPay. Examples use RWF to match the default configured mobile-money market. Illustrative example. |
order.description | string | Required | Narrative description of order goods or service. |
order.reference | string | Optional | Ignored. The service assigns the unique order reference. |
redirectUrl | string | Required | Sent to TransactPay as payment.RedirectUrl. |
Response fields
| Field | Type | Presence | Description |
|---|---|---|---|
status | string | Always returned | success |
data.orderId | string | Always returned | Ziba Pay assigned order reference ID. |
data.reference | string | Always returned | Reference assigned to this transaction. |
data.amount | number | Always returned | Order monetary amount in currency units. |
data.currency | string | Always returned | Currency code (e.g. NGN, RWF, GHS, USD). |
data.description | string | Always returned | Order description provided during creation. |
data.status | string | Always returned | Initial order status: PENDING. |
data.redirectUrl | string | Always returned | Merchant return URL after customer checkout. |
data.checkoutUrl | string | Optional | TransactPay hosted checkout link. |
Status codes
| HTTP Status | Meaning |
|---|---|
| 201 | Order created successfully. |
| 401 | No merchant session. Missing Bearer token. |
| 403 | KYC is not VERIFIED. Complete KYC verification in merchant dashboard. |
| 404 | { message: "User Not Found" } when the session has no user. |
Notes
- The merchant kycStatus must be VERIFIED. Otherwise the response is 403 { message: "User must complete KYC to create an order" }.
- The customer name, email, country, and phone are taken from the signed-in user, not from this body.
- HTTP 201 returns the JSON produced by the TransactPay create-order call, without a Ziba Pay envelope.