Skip to main content

Send To Bank

Introduction

The "Send To Bank" feature allows users to transfer money to a bank account by making an HTTP POST request to our API. This documentation provides details on how to send money to a bank and includes code examples in various programming languages.

Sending Money To Bank

To send money to a bank, users need to make an HTTP POST request to the specified endpoint with the required parameters.

Endpoint

https://api.mypayd.app/api/v2/withdrawal

Authorization

Users need to include basic authentication credentials in the request headers.

AUTHORIZATION: Basic Auth

Username <username>
Password <password>

The Token Object

json
{
"account_id": "4c0f6ad5-92bf-4fd1-ba93-8c89c9d23616",
"phone_number": "+254718686209",
"amount": 100,
"narration": "Withdrawal request",
"callback_url": "https://example.com/callback",
"bank_code": "1234",
"bank_name": "Example Bank",
"bank_account_name": "Recipient Name",
"bank_account_number": "9876543210"
}


Code Examples

Below are code examples in different programming languages demonstrating how to send money to a mobile number using HTTP POST requests.

curl --location 'https://api.mypayd.app/api/v2/withdrawal' \
--data-raw '{
"account_id": "4c0f6ad5-92bf-4fd1-ba93-8c89c9d23616",
"phone_number": "+254718686209",
"amount": 100,
"narration": "Withdrawal request",
"callback_url": "https://example.com/callback",
"bank_code": "1234",
"bank_name": "Example Bank",
"bank_account_name": "Recipient Name",
"bank_account_number": "9876543210"
}
'

Example of a successful response

{
"success": true,
"correlator_id": "12345abcd",
"message": "Payout processed successfully",
"status": "completed"
}

Conclusion

The "Send To Bank" feature provides a convenient way for users to transfer money to a bank account securely. By following the instructions outlined in this documentation, users can easily integrate money transfers to banks into their applications or services.