Esc

Temporary accounts

Create a bank account number that only works for a limited time, for example one number per order. Your customer transfers money to it, and you're notified when the payment arrives.

How it works

  1. Create the account

    Call the endpoint below with your customer's name, email and one ID number (BVN, NIN or CAC number).

  2. Show it to your customer

    Display the account number, bank name and account name from the response.

  3. Your customer pays before it expires

    The account stays open for 40 minutes unless you choose a different time.

  4. You get notified

    The payment is added to your balance and a webhook is sent to your server. See Payment notifications.

Late payments are returned

If a customer pays after the account has expired, Gafiapay sends the money back to them automatically.

Need a number that never expires?

Use a permanent virtual account instead.

Create a temporary account

POST /account/generate/temporary

Your business must be verified to use this endpoint. Sign the request like any other call; see Authentication.

What to send

name string required
Your customer's name. It becomes the account name.
email string required
Your customer's email.
bvn string one ID number
Your customer's 11-digit BVN.
nin string one ID number
Your customer's 11-digit NIN.
businessNumber string one ID number
CAC registration number, for example RC1234567, when the customer is a business.
duration number optional Default 40
How many minutes the account stays open.

Send one ID number. If you send more than one, businessNumber is used first, then bvn, then nin. If you send none, your own business's verified ID is used. These are the same rules as permanent accounts.

What you get back

accountNumber string
The 10-digit number your customer pays into.
bankName string
The bank to show your customer.
accountName string
The name on the account.
expiresAt string
When the account stops accepting payments.
expiresInMinutes number
How long the account is open for.
isTemporary boolean
Always true for these accounts.
curl -X POST 'https://api.gafiapay.com/api/v1/external/account/generate/temporary' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: your_api_key' \
  -H 'x-timestamp: 1678901234567' \
  -H 'x-signature: generated_signature' \
  -d '{
    "name": "Jane Customer",
    "email": "jane@example.com",
    "nin": "12345678901",
    "duration": 60
  }'
Response
{
  "status": "success",
  "data": {
    "accountNumber": "1234567890",
    "accountName": "Jane Customer",
    "bankName": "Palmpay",
    "isTemporary": true,
    "expiresAt": "2024-01-01T00:40:00.000Z",
    "expiresInMinutes": 60
  }
}
GafiaPayGafiaPayDocs
Guide for AI agents Dashboard