Overview
Checkout Wallet lets your business accept a single NGN bank-transfer payment for an order, invoice, or purchase. You create the checkout from your server, show the returned bank account and exact payable amount to the customer, and fulfill the order after receiving a signedcheckout.completed webhook.
Production base URL: https://api-production.fossapay.com
How it works
1
Create the checkout
Call
POST /api/v1/checkouts from your backend with your existing active FossaPay API key and a unique idempotency key.2
Display the payment instructions
Show the customer
data.account.bankName, data.account.accountName, data.account.accountNumber, and the exact data.amountPayable.3
Customer makes one exact transfer
The customer must transfer
amountPayable in one transaction before expiresAt. Do not split a payment or reuse the account for a second transaction.4
Wait for confirmation
Verify the webhook signature, acknowledge the webhook quickly, and fulfill only after
checkout.completed.5
Reconcile if necessary
Retrieve the checkout by its FossaPay ID or your unique reference whenever your webhook delivery is delayed or your application needs to recover state.
Prerequisites
- An active FossaPay merchant account that has completed business verification.
- An existing active FossaPay API key.
- An active permanent NGN account on the merchant account. It is used as a fallback if a temporary checkout account cannot be generated.
- A public HTTPS webhook URL configured for your merchant.
Keep API keys and webhook secrets on your server. Do not create checkouts directly from browser or mobile code where a key can be exposed.
Create a checkout
Required fields
Optional fields
Customer details do not identify the incoming bank transfer. FossaPay correlates a temporary checkout through its dedicated account and provider checkout reference, or a fallback checkout through the permanent account and the pending checkout’s expected payment. Treat
customer as contact and reconciliation information.
Understand the amounts and fee bearer
FossaPay calculates the checkout fee on the server using the configured fee rule. Never calculate the final payable amount yourself; use the values returned by the API.
For example, if
amount is 5000.00 and the calculated fee is 80.00:
- With
customer, the customer transfers5080.00and the merchant settlement is5000.00. - With
merchant, the customer transfers5000.00and the merchant settlement is4920.00.
Example response
Money values in responses are decimal strings. Parse them with a decimal or money library, not binary floating-point arithmetic.
Temporary and permanent accounts
The API first attempts to create a dedicated 30-minute account:account.type: "temporary"means the account is dedicated to this checkout and has its ownaccount.expiresAt.- If account generation remains unavailable after retries, FossaPay returns the merchant’s permanent NGN account with
account.type: "permanent"andaccount.expiresAt: null.
data.expiresAt, including when a permanent account is returned. Your UI should always show the checkout expiry and stop accepting payment when the checkout reaches a terminal state.
Exact-amount payment rule
The customer must send exactlyamountPayable in a single transfer.
- For a temporary account, an incorrect amount is rejected by the checkout provider and may be reversed to the sender.
- For a permanent fallback account, FossaPay records an incorrect payment as failed, underpaid, or overpaid. Do not fulfill the order unless the checkout becomes
completed.
pending/processing response.
Idempotency and references
Every create request requires eitherX-Idempotency-Key or Idempotency-Key. Prefer X-Idempotency-Key for new integrations.
- Same key + same body: returns the original checkout.
- Same key + different body: returns
409 Conflict. - Both header names with different values: returns
400 Bad Request. - Missing key: returns
400 Bad Request. - A reference already used by the same merchant: returns
409 Conflict.
Checkout statuses
Receive and verify checkout webhooks
Checkout terminal events are:checkout.completedcheckout.failedcheckout.expiredcheckout.reversed
JSON.stringify(body.data) with HMAC-SHA256 using your webhook secret. The lowercase hexadecimal digest is sent in x-fossapay-Signature.
X-Event-Id and X-Event-Type. Retries also include X-Retry-Count. Store eventId and make fulfillment idempotent because failed deliveries can be retried up to five times.
See Webhook Events for complete payload examples.
Retrieve or expire a checkout
pending checkout can be manually expired. Trying to expire any other status returns 409 Conflict. Retrieval is merchant-scoped, and expired sessions may be updated to expired when retrieved.
Production checklist
- Create checkouts only from your backend.
- Use a unique merchant reference and stable idempotency key per order attempt.
- Display the returned
amountPayable, not the requestamount. - Display
data.expiresAtand stop payment after expiry. - Tell customers to make one transfer for the exact amount.
- Verify the webhook signature over
JSON.stringify(body.data). - Deduplicate webhook deliveries using
eventId. - Fulfill only on
checkout.completedand make fulfillment idempotent. - Add reconciliation polling by checkout ID or reference.
- Keep API keys and webhook secrets outside client-side code and logs.
API reference
Create checkout
Generate payment instructions for a one-time NGN payment.
Get by ID
Retrieve the latest status using the checkout ID.
Get by reference
Reconcile a checkout using your merchant reference.
Expire checkout
Stop a pending checkout before its scheduled expiry.

