Create a payment link to redirect users to a Fapshi-hosted checkout page.
POST /initiate-pay
Generate a payment link where users complete payment on a prebuilt Fapshi checkout page.
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. |
200 OK
with JSON body containing:
message
: success messagelink
: URL for user paymenttransId
: transaction ID to track payment statusdateInitiated
: date when the payment was initiatedErrors return 4XX with a message explaining the failure.
Payment link generated successfully
The response is of type object
.