Skip to main content
Create a temporary virtual account that your customer can transfer funds into. When payment is received, Pasteaza sends a webhook notification and you can verify the transaction status with the verify virtual account status endpoint.
Create virtual accounts from your backend only. Use your secret key and include an Idempotency-Key header to prevent duplicate accounts when retrying requests.

Endpoint

POST /v1/collections/virtual-accounts

Headers

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxx
Content-Type: application/json
Idempotency-Key: 8f2b9d4a-3c4d-4b62-96c7-02b2c4f31388

Request body

FieldTypeRequiredDescription
amountintegerYesAmount to collect in kobo.
customer_namestringYesCustomer’s full name.
customer_emailstringNoCustomer’s email address.
customer_phonestringNoCustomer’s phone number.
merchant_referencestringNoYour internal transaction or order reference.
expires_inintegerNoExpiry time in minutes. Defaults to 30.
metadataobjectNoAdditional merchant data for your records.

Example request

curl https://api.oyapasteaza.com/v1/collections/virtual-accounts \
  -X POST \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 8f2b9d4a-3c4d-4b62-96c7-02b2c4f31388" \
  -d '{
    "amount": 500000,
    "customer_name": "John Doe",
    "customer_email": "john@example.com",
    "merchant_reference": "ORDER_12345",
    "metadata": {
      "order_id": "ORDER_12345"
    }
  }'

Successful response

{
  "status": true,
  "message": "Virtual account created successfully.",
  "data": {
    "reference": "pst_va_01JABCXYZ",
    "account_name": "JOHN DOE",
    "account_number": "1234567890",
    "bank": {
      "code": "090286",
      "name": "Pasteaza Bank"
    },
    "amount": 500000,
    "currency": "NGN",
    "status": "pending",
    "expires_at": "2026-06-11T14:30:00Z"
  }
}

Integration flow

1

Create the virtual account

Send the create request from your backend with the amount and customer details.
2

Show the account details

Display the returned account_number, account_name, bank, and amount to your customer.
3

Wait for payment

Ask the customer to transfer the exact amount before the account expires.
4

Confirm the status

Verify the payment status through the API or process the webhook notification from Pasteaza.

Notes

  • Every virtual account is unique to a collection request.
  • The customer should transfer the exact amount generated.
  • Payments are confirmed automatically through webhooks.
  • Store the returned reference so you can verify the payment later.
  • Use a new Idempotency-Key for every new virtual account request.

Next step

Verify virtual account status

Check whether a customer has completed the transfer.

Webhooks

Receive real-time payment notifications from Pasteaza.