This page explains how Fapshi treats the transactions you create, and what your application is responsible for to keep transaction states reliable. Read it before going live with Initiate Pay, Direct Pay or Payout.
Idempotency and Duplicate Prevention
This means:- If you send two Direct Pay requests with the same
externalId, Fapshi creates two transactions and sends two payment prompts to the customer. Both can be paid. - If you send two Payout requests with the same
externalId, both payouts are processed. - Preventing duplicates is your application’s responsibility.
Recommended approach
- Generate a unique
externalIdin your system for every payment attempt (e.g., your order ID plus an attempt number) and store it before calling Fapshi. - Always send a
userIdas well. It is what lets you look the transaction up later if you never receive the response (see below). - Store the
transIdreturned by Fapshi against yourexternalIdas soon as you receive it. - Do not create a new transaction for an order that already has one that is
CREATED,PENDINGorSUCCESSFUL.
Retrying after a timeout or lost response
If a transaction creation request times out or you never receive its response, do not blindly resend it. The transaction may already exist. Instead:- Call
GET /transaction/{userId}with theuserIdyou sent. - Look for a transaction whose
externalIdmatches the one you sent. - If you find it, save its
transIdand continue tracking that transaction. Do not retry. - If you do not find it, the transaction was not created and it is safe to send the request again.
A transaction is returned by
GET /transaction/{userId} as soon as it is created (status CREATED), so you can run this check immediately, even if the original API response was lost.Transaction States
- Direct Pay transactions never expire. Their final state is always
SUCCESSFULorFAILED. - Payment links expire after 24 hours. Until then, a customer can retry on the same link after a failed attempt.
GET /payment-status/{transId} to confirm or to recover missed notifications.
Failed Transactions
Recommended handling:- Treat
FAILEDas a final outcome for that transaction. - Show the customer a generic message (e.g., “The payment could not be completed. Please check your balance and try again.”).
- If the customer wants to try again, create a new transaction with a new
externalId.
Reconciliation Checklist
Use this checklist to reconcile payments whose outcome is uncertain:Amounts and Fees
- Fapshi does not collect partial payments. Fapshi always collects the full
amountyou pass to the API, so a transaction markedSUCCESSFULalways means that exact amount was collected. - Fapshi’s transaction fee is 3% of the amount paid.
- The fee is the same for every payment method (MTN Mobile Money and Orange Money) and does not change with transaction volume.
- The
revenuefield on a transaction is what you receive after Fapshi fees are deducted:
10,000 XAF has revenue of 9,700 XAF.
For settlement timelines and other pricing questions, see the Fapshi FAQ.
Refunds
Fapshi does not have a dedicated refund API. To return money to a customer, send it to them with the Payout endpoint, using a separate payout-enabled service. The refund is paid from your payout service balance, not from the collections service that received the original payment. Make sure the payout service is funded first (an instant, free transfer from your collections service, or a top-up); see Funding Your Payout Service.Payouts are disabled by default in the live environment and must be activated. The requirements and restrictions are described on the Payout endpoint page. Remember that payouts are subject to the same rule as payments: Fapshi does not prevent duplicate payouts, so apply the same duplicate-prevention approach described above.
Supported Payment Methods
The API supports MTN Mobile Money and Orange Money only (plus Fapshi accounts as a payout destination). There are no plans to support other payment networks in the short term.Need help? Contact us via support@fapshi.com or visit our Help & Support Center.