Skip to Content
TransfersInitiate Transfer

Initiate Bank Transfer

The Initiate Bank Transfer endpoint allows you to start a bank transfer by providing the necessary details, such as the recipient’s bank account information and the amount to be transferred.

Step 1: Set Up Request Headers

Include the following headers in your request:

HeaderTypeDescription
AuthorizationstringBearer token with your secret key
Content-TypestringMust be application/json
X-SignaturestringBase64 RSA-SHA256 signature for the exact request body
Idempotency-KeystringStable unique key for safe retries. Use the payout reference when possible

Step 2: Sign the Request Body

Payout requests should be signed with your RSA private key. Upload your public key first, then sign the exact request body you send and pass the generated value in the X-Signature header.

See RSA Request Signing for key generation, public key upload, language examples, and security requirements.

The JSON string used to generate X-Signature must match the request body you send exactly. If your account has API encryption enabled, sign the encrypted body because the API verifies the raw bytes it receives.

Currency Specific Instructions

Select the currency you are transferring to view the specific parameters and examples.

Step 3: Prepare Request Body (NGN)

ParameterTypeDescription
account_numberstringThe bank account number of the recipient
account_namestringThe name of the recipient
bank_codestringThe bank code of the recipient’s bank
amountstringThe amount to be transferred
currencystringNGN
sender_namestringThe name of the sender
narrationstringA description or note for the transfer
referencestringYour unique identifier for the transfer

Step 4: Sample Request (NGN)

{ "account_number": "0123456789", "account_name": "John Doe", "bank_code": "000013", "amount": "100", "currency": "NGN", "sender_name": "Jane Smith", "narration": "Payment for services", "reference": "ngn_ref_123" }

Step 5: Sample cURL Request (NGN)

curl -X POST https://api.cashonrails.com/api/v1/bank_transfer \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_SECRET_KEY" \ -H "X-Signature: YOUR_BASE64_RSA_SIGNATURE" \ -H "Idempotency-Key: ngn_ref_123" \ -d '{"account_number":"0123456789","account_name":"John Doe","bank_code":"000013","amount":"100","currency":"NGN","sender_name":"Jane Smith","narration":"Payment for services","reference":"ngn_ref_123"}'

Step 6: Sample Response

Here is an example of a successful response:

{ "success": true, "status": "00", "message": "Transfer Initiated Successfully", "data": { "transfer_id": "12345", "reference": "x01234yz", "status": "pending" } }

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
statusstringStatus code of the request
messagestringMessage describing the result
dataobjectContains the transfer details
data.transfer_idstringUnique identifier for the transfer
data.referencestringYour unique identifier for the transfer
data.statusstringThe status of the transfer

Use this endpoint to initiate a bank transfer, ensuring that all necessary details are provided for a successful transaction.

Last updated on