Initiate Bank Transfer
POST /api/v1/transfers/bank
Description
Initiates a bank transfer from a specified wallet to a bank account. This endpoint is used for moving funds directly to bank accounts, which is crucial for business operations and vendor payments.
Headers:
tenantId(required): The tenant ID under which the bank transfer is initiated. This should be included as a header.userId(required): The user ID of the individual initiating the bank transfer. This should also be included as a header.countryCode(required): The country code where the bank transfer is being processed. This should be included as a header.
Request Body (application/json): Required. The body should include detailed information about the transfer:
{
"amount": 0,
"accountNumber": "string",
"bankCode": "string",
"walletUuid": "string",
"userId": "string",
"businessId": "string",
"tenantId": "string",
"pin": "string",
"description": "string",
"countryCode": "string"
}
Responses:
- 201 Created: Indicates that the bank transfer has been successfully initiated. The response typically includes details of the transaction.
Example Request:
curl -X POST "http://[base_url]/api/v1/transfers/bank" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d '{
"amount": 5000,
"accountNumber": "123456789",
"bankCode": "XYZ123",
"walletUuid": "wallet1234",
"userId": "USR456",
"businessId": "BIZ789",
"tenantId": "TEN123",
"pin": "1234",
"description": "Payment for supplies",
"countryCode": "US"
}'
Example Response:
{
"message": "Transfer initiated successfully.",
"transactionId": "trans123"
}
Error Responses:
- 400 Bad Request: Incorrect or incomplete data for the bank transfer initiation.
- 403 Forbidden: The user does not have permission to create a bank transfer.
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/transfers/bank \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!