Virtual Account Generation

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

HeaderTypeRequiredDescription
api-keystringโœ… YesYour Transactpay secret API key
encryptionstringโœ… YesMust be "RSA"
Content-Typestringโœ… YesMust be application/json
โš ๏ธ

Important:

Payloads must be encrypted using RSA (PKCS#1 v1.5).


๐Ÿ“ฆ Sample Request Payload

{
  "Alias": "TestAccountViaAPI"
}
KeyTypeRequiredDescription
Aliasstringโœ… YesLabel 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.