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
Narrationstring❌ No
Referencestring❌ NoReference 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": "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.