Skip to main content
POST
/
direct-pay
Initiate a Direct Payment Request
curl --request POST \
  --url https://sandbox.fapshi.com/direct-pay \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --header 'apiuser: <api-key>' \
  --data '{
  "amount": 101,
  "phone": "<string>",
  "medium": "mobile money",
  "name": "<string>",
  "email": "jsmith@example.com",
  "userId": "<string>",
  "externalId": "<string>",
  "message": "<string>"
}'
{
  "message": "<string>",
  "transId": "<string>",
  "dateInitiated": "2023-12-25"
}

Endpoint

POST /direct-pay Send a payment request directly to a user’s mobile device. You are responsible for building your own checkout and verifying payment status.
Direct payment transactions cannot and do not expire. Consequently, their final state is either SUCCESSFUL or FAILED.
Direct pay is disabled by default on live environment; Follow the steps in the Activate Direct pay on your Live Fapshi API guide to enable direct pay in live mode.
Handle this endpoint with care; misuse can result in account suspension.

Parameters

NameRequiredTypeDescription
amountYesintegerAmount to be paid (minimum 100 XAF).
phoneYesstringPhone number to request payment from (e.g., 67XXXXXXX).
mediumNostring"mobile money" or "orange money". Omit to auto-detect.
nameNostringPayer’s name.
emailNostringPayer’s email to receive receipt.
userIdNostringYour system’s user ID (1–100 chars; a–z, A–Z, 0–9, -, _).
externalIdNostringTransaction/order ID for reconciliation (1–100 chars; a–z, A–Z, 0–9, -, _).
messageNostringReason for payment.

Response

  • 200 OK with JSON body containing:
    • message: success message
    • transId: transaction ID to track payment status
    • dateInitiated: date when the payment was initiated
  • Errors return 4XX with failure message.

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
phone
string
required

Phone number where payment request is sent.

medium
enum<string>

Payment medium (optional).

Available options:
mobile money,
orange money
name
string

Name of the payer (optional).

email
string<email>

Email of the payer for receipts (optional).

userId
string

Internal user ID (optional).

externalId
string

Transaction/order ID for reconciliation (optional).

message
string

Reason for payment (optional).

Response

Accepted

message
string

Success message

transId
string

Transaction ID for the payment.

dateInitiated
string<date>

Date when the payment was initiated.

I