Skip to main content
This Quickstart establishes the minimum working FossaPay integration: authenticate a server-side request, create an individual customer, provision the customer’s NGN wallet, and retrieve the wallet for reconciliation.
FossaPay currently supports production access only. All requests use the production API and can create or affect live financial resources.

What you will build

By the end of this guide, your backend will be able to:
  1. authenticate with FossaPay;
  2. create a merchant-scoped individual customer;
  3. create that customer’s dedicated NGN wallet;
  4. retrieve the wallet using its FossaPay ID; and
  5. receive and verify signed webhook events.

Prerequisites

Before making requests, you need:
  • a FossaPay merchant account;
  • completed business verification;
  • two-factor authentication enabled for API-key management;
  • an active production API key from Dashboard → Settings → API Keys; and
  • curl or an equivalent HTTP client.
Production API keys use the fk_production_ prefix. Complete your integration and operational readiness checks before creating financial resources.
API keys authorize access to merchant financial resources. Keep them in a secret manager or protected server environment. Never expose them in browser code, mobile applications, public repositories, screenshots, or support messages.

1. Configure your environment

For local development, assign the production API URL and API key to shell variables:
The variable names are local conventions; they are not request headers. Every public request must send the key as x-api-key.

2. Verify authentication

List customers to confirm that the key is active and the request is authenticated for the correct merchant:
A successful request returns HTTP 200 with the standard response envelope:
The contents of result and the remaining pagination fields depend on existing data. HTTP 401 means the key is missing, invalid, inactive, or unavailable to the request.

3. Create an individual customer

Customer records represent individuals served by your business. Send exactly one name in each name field, and set type to individual.
Use unique customer information. An email address already used by your merchant is rejected. An HTTP 201 response has this structure:
Store data.id as the FossaPay customer ID. It is a UUID and is required by customer-scoped wallet and transfer operations.
Response values above are illustrative. Use identifiers and account details from your actual response.
See Customers for name validation, required information, and ownership rules.

4. Create the customer’s NGN wallet

Create one NGN wallet for the customer using the returned customer UUID:
walletReference is your correlation value. Generate it in your system and retain it with the customer mapping. An HTTP 201 response has this structure:
Store the wallet ID, bank details, and wallet reference. Do not hard-code the bank name or bank code; provider account details are determined at provisioning time. Only one NGN wallet can be created for the same customer. If your create request has an ambiguous outcome, retrieve the customer or reconcile your stored response before attempting another creation.

5. Retrieve the wallet

Retrieve the wallet with data.walletId from the creation response:
Wallet retrieval is merchant-scoped. A wallet belonging to another merchant is not accessible with your API key. You can also retrieve a wallet using its account number:
At this point, the core integration is working: the merchant can authenticate, create a customer, provision an NGN wallet, and retrieve it.

6. Prepare webhook handling

Before accepting live deposits, configure a public HTTPS URL from Dashboard → Settings → Webhooks and store its secret securely. FossaPay signs exactly JSON.stringify(body.data) with HMAC-SHA256. The lowercase hexadecimal result is sent in x-fossapay-Signature.
insertWebhookIfNew and queueWebhookProcessing represent your persistence and job-queue implementation. Enforce a unique database constraint on eventId; do not implement deduplication only in application memory. See Webhooks for the event catalogue, retry schedule, signature rules, and reconciliation guidance.

Error handling

FossaPay returns errors using an HTTP status and structured JSON body:
For write requests, distinguish a confirmed rejection from an ambiguous network failure. Never create a second financial operation solely because the original response was lost.

Production readiness

Before processing customer funds:
  • confirm business verification and production API-key access;
  • use a production HTTPS webhook endpoint;
  • store API keys and webhook secrets in production secret management;
  • verify signature rejection, duplicate delivery, and queue recovery behavior;
  • persist FossaPay IDs and your references for every operation;
  • monitor API errors, webhook delivery failures, and pending transactions; and
  • begin with controlled amounts and reconcile each result.
FossaPay does not currently provide a staging or sandbox environment. Requests made with your production API key operate on live resources and may initiate real financial activity.

Next steps

Authentication

Understand API-key security and idempotency.

NGN collections

Receive and reconcile customer deposits.

Checkout Wallet

Accept exact-amount, one-time NGN payments.

NGN transfers

Move customer or business funds using the correct flow.