Endpoint
POST /initiate-pay
Generate a payment link where users complete payment on a prebuilt Fapshi checkout page.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
| amount | Yes | integer | Amount to be paid (minimum 100 XAF). |
| No | string | If set, the user won’t have to provide an email during payment. | |
| redirectUrl | No | string | URL to redirect the user after payment. |
| userId | No | string | Your internal user ID (1-100 chars; a-z, A-Z, 0-9, -, _). |
| externalId | No | string | Transaction/order ID for reconciliation (1-100 chars; a-z, A-Z, 0-9, -, _). |
| message | No | string | Reason for payment. |
Response
-
200 OKwith JSON body containing:message: success messagelink: URL for user paymenttransId: transaction ID to track payment statusdateInitiated: date when the payment was initiated
- Errors return 4XX with a message explaining the failure.
Payment links expire after 24 hours and cannot be used afterward.
Body
application/json
Amount to be paid (minimum 100 XAF).
Required range:
x >= 100Optional user email to skip during payment.
URL to redirect after payment.
Internal user ID (1-100 chars; a-z, A-Z, 0-9, -, _).
Transaction/order ID for reconciliation (1-100 chars; a-z, A-Z, 0-9, -, _).
Reason for payment.