DYNAMIC PAYMENTS
Create Dynamic Account
Create a one-time virtual bank account for fixed-amount bank transfer payments and time-limited collections.
POST /v1/payments/dynamic-account
Create a one-time virtual bank account tied to a specific payment amount. Use this dynamic virtual account for fixed-amount bank transfer payments. The account expires after 15 minutes if no payment is received.
Use this endpoint to
- Generate a temporary virtual bank account for a single payment
- Collect fixed-amount customer bank transfers
- Support time-limited payment collection workflows
Request
Headers
| Header | Value |
|---|---|
Authorization |
Bearer {access_token} |
Content-Type |
application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reference |
string | ✅ | Unique merchant-generated reference for this payment |
amount |
number | ✅ | Expected payment amount |
currency |
string | ✅ | Currency code (e.g. NGN) |
description |
string | ❌ | Optional description or note for the payment |
Code Samples
const axios = require("axios");
const response = await axios.post(
"https://sandbox.hitchpay.ng/v1/payments/dynamic-account",
{
reference: "1232456789",
amount: 1000,
currency: "NGN",
description: "Testing"
},
{
headers: {
Authorization: `Bearer ${process.env.ACCESS_TOKEN}`,
"Content-Type": "application/json"
}
}
);
console.log(response.data);<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://sandbox.hitchpay.ng/v1/payments/dynamic-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"reference" => "1232456789",
"amount" => 1000,
"currency" => "NGN",
"description" => "Testing"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_ACCESS_TOKEN",
"Content-Type: application/json"
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import requests
url = "https://sandbox.hitchpay.ng/v1/payments/dynamic-account"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"reference": "1232456789",
"amount": 1000,
"currency": "NGN",
"description": "Testing"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())Response
200 — Success
{
"status": "success",
"message": "Dynamic account generated. Awaiting payment.",
"data": {
"tracking_id": "EXTPAYA2165E437665",
"merchant_reference": "1232456789",
"account_number": "6020006173",
"account_name": "HitchAfricaTech Checkout",
"amount": 1000,
"currency": "NGN",
"valid_for": 900,
"expires_in": "15 minutes",
"status": "pending"
}
}Response Fields
| Field | Description |
|---|---|
tracking_id |
Use this to retrieve payment status |
account_number |
Virtual account number to share with the payer |
account_name |
Account name to share with the payer |
valid_for |
Validity window in seconds (900 = 15 minutes) |
expires_in |
Human-readable expiry window |
status |
Initial status — always pending on creation |
Next Steps
Share the account_number and account_name with your customer for them to make the transfer, then track status via Retrieve Dynamic Payment.
Questions? Email [email protected]. Also on GitBook.