Skip to main content
POST
Generate a Payment Link

Endpoint

POST /initiate-pay Generate a payment link where users complete payment on a prebuilt Fapshi checkout page.

Parameters

Response

  • 200 OK with JSON body containing:
    • message: success message
    • link: URL for user payment
    • transId: transaction ID to track payment status
    • dateInitiated: 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.

Authorizations

apiuser
string
header
required
apikey
string
header
required

Body

application/json
amount
integer
required

Amount to be paid (minimum 100 XAF).

Required range: x >= 100
email
string<email>

Optional user email to skip during payment.

redirectUrl
string<uri>

URL to redirect after payment.

userId
string

Internal user ID (1-100 chars; a-z, A-Z, 0-9, -, _).

Pattern: ^[a-zA-Z0-9\-_]{1,100}$
externalId
string

Transaction/order ID for reconciliation (1-100 chars; a-z, A-Z, 0-9, -, _).

Pattern: ^[a-zA-Z0-9\-_]{1,100}$
message
string

Reason for payment.

Response

Payment link generated successfully

message
string

Success message

URL to redirect the user to complete payment.

transId
string

Transaction ID for payment.

dateInitiated
string<date>

Date when the payment was initiated.