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
Headers
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes | Amount to collect in kobo. |
customer_name | string | Yes | Customer’s full name. |
customer_email | string | No | Customer’s email address. |
customer_phone | string | No | Customer’s phone number. |
merchant_reference | string | No | Your internal transaction or order reference. |
expires_in | integer | No | Expiry time in minutes. Defaults to 30. |
metadata | object | No | Additional merchant data for your records. |
Example request
Successful response
Integration flow
Create the virtual account
Send the create request from your backend with the amount and customer details.
Show the account details
Display the returned
account_number, account_name, bank, and amount to your customer.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
referenceso you can verify the payment later. - Use a new
Idempotency-Keyfor 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.