Create virtual account
curl --request POST \
--url https://api.oyapasteaza.com/v1/collections/virtual-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantReference": "COL-10001",
"amount": 500000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantReference: 'COL-10001', amount: 500000})
};
fetch('https://api.oyapasteaza.com/v1/collections/virtual-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oyapasteaza.com/v1/collections/virtual-accounts"
payload = {
"merchantReference": "COL-10001",
"amount": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": true,
"message": "<string>",
"data": {}
}{
"status": false,
"message": "<string>",
"code": "<string>"
}Virtual Account
Create virtual account
Create a temporary virtual account for collecting a bank transfer payment.
POST
/
v1
/
collections
/
virtual-accounts
Create virtual account
curl --request POST \
--url https://api.oyapasteaza.com/v1/collections/virtual-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantReference": "COL-10001",
"amount": 500000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantReference: 'COL-10001', amount: 500000})
};
fetch('https://api.oyapasteaza.com/v1/collections/virtual-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oyapasteaza.com/v1/collections/virtual-accounts"
payload = {
"merchantReference": "COL-10001",
"amount": 500000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": true,
"message": "<string>",
"data": {}
}{
"status": false,
"message": "<string>",
"code": "<string>"
}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 store the returned
reference so you can verify payment status later.Endpoint
POST /v1/collections/virtual-accounts
Headers
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxx
Content-Type: application/json
Request body
| Field | Type | Required | Description |
|---|---|---|---|
merchantReference | string | Yes | Your internal transaction or order reference. |
amount | integer | Yes | Amount to collect in kobo. |
expiresAt | string | No | ISO date string for when the virtual account should expire. It cannot be more than 24 hours from creation. |
metadata | object | No | Additional 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" \
-d '{
"merchantReference": "ORDER_12345",
"amount": 500000,
"expiresAt": "2026-06-11T14:30:00Z",
"metadata": {
"customerId": "cust_001"
}
}'
Successful response
{
"status": true,
"message": "Virtual account created successfully.",
"data": {
"reference": "pstv_01JABCXYZ",
"accountNumber": "6020009141",
"accountName": "John Doe",
"bankCode": "999240",
"bankName": "Pasteaza Bank",
"amount": 500000,
"currency": "NGN",
"status": "ACTIVE",
"expiresAt": "2026-06-11T14:30:00.000Z"
}
}
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
accountNumber, accountName, bankName, bankCode, 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.
merchantReferenceis required.expiresAtis optional and cannot be more than 24 hours from creation.- The customer should transfer the exact amount generated.
- Payments are confirmed automatically through webhooks.
- Store the returned
referenceso you can verify the payment later.
Next step
Verify virtual account status
Check whether a customer has completed the transfer.
Webhooks
Receive real-time payment notifications from Pasteaza.
Authorizations
Use an sk_test_... key in the playground. Never enter a live key in shared environments.
Body
application/json