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 secret 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 |
๐ค 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": "Virtual account created successfully",
"data": {
"account_name": "Transactpay Inc",
"account_number": "1234567890",
"bank_name": "Transactpay Bank",
"reference": "VAC-093823"
}
}
๐ 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.