The Virtual Account Generation endpoint allows you to create unique, reserved bank account numbers linked to your Transactpay account. These accounts are useful for:
- šø Receiving customer payments
- š Tracking transactions per user or department
- āļø Automating financial workflows
Virtual accounts simplify reconciliation, increase automation, and enhance transaction-level visibility.
Good to Know
- Payload must be encrypted using RSA (PKCS#1 v1.5) before making the request.
- Virtual accounts are persistent and reusable for future transactions tied to the alias
š® Endpoint
POST http://payment-api-service.transactpay.ai/payment/virtual-account/generateš Headers
| Header | Type | Required | Description |
|---|---|---|---|
api-key | string | ā Yes | Your Transactpay public API key |
encryption | string | ā Yes | Must be "RSA" |
Content-Type | string | ā Yes | Must be application/json |
Important:Payloads must be encrypted using RSA (PKCS#1 v1.5).
š¦ Sample Request Payload
{
"Alias": "TestAccountViaAPI"
}| Key | Type | Required | Description |
|---|---|---|---|
Alias | string | ā Yes | Label or identifier for the virtual account |
Narration | string | ā No | |
Reference | string | ā No | Reference for virtual account - to be returned as "accountReference" on callbacks |
š¤ Sample cURL Request
Important:You must encrypt the payload using RSA (PKCS#1 v1.5) before sending the request.
curl -X POST http://payment-api-service.transactpay.ai/payment/virtual-account/generate \
-H "api-key: YOUR_PUBLIC_KEY" \
-H "encryption: RSA" \
-H "Content-Type: application/json" \
--data @encrypted_payload.jsonā
Sample Success Response
{
"status": true,
"message": "Account Number successfully generated",
"accountNumber": "1234567890",
"accountName": "Transactpay Inc",
"bank": "Transactpay Bank",
"bankCode": "123456"
}š Notes
- Each virtual account is tied to the alias you provide.
- You can reuse virtual accounts to collect future payments from the same user or group.
