Bank Payouts
Last updated
Last updated
Sonic Payment Gateway allows merchants to easily transfer funds directly to bank accounts using our bank payouts APIs. This feature allows merchants to pay out their earnings to their own bank account or to pay their employees and contractors.
To create a bank payout, make a POST request to the following endpoint:
Include the following information in the request body:
recipient_name (string): The name of the recipient
recipient_account_number (string): The bank account number of the recipient
recipient_bank_name (string): The name of the recipient's bank
recipient_bank_code (string): The bank code of the recipient's bank
amount (number): The amount to be paid out
currency (string): The currency of the payout (e.g. USD, EUR, GBP)
metadata (object): Additional information to be associated with the payout, in key-value pairs
Example curl request:
If the request is successful, the API will return a 200 OK response with the created bank payout object in the response body. The bank payout object will have the following properties:
id
string
The unique identifier for the bank payout
recipient_name
string
The name of the recipient
recipient_account_number
string
The bank account number of the recipient
recipient_bank_name
string
The name of the recipient's bank
recipient_bank_code
string
The bank code of the recipient's bank
amount
number
The amount of the bank payout
currency
string
The currency of the bank payout
status
string
The status of the bank payout (e.g. succeeded, failed)
metadata
object
Additional information associated with the bank payout, in key-value pairs
created_at
string
The date and time the bank payout was created, in ISO 8601 format
You can also filter the results by passing query parameters in the request.
Examples:
To filter by country, use country=<country_code>
To filter by currency, use currency=<currency_code>
To filter by status, use status=<status>
Example curl request:
Sample response:
Delete Bank Payout
Example curl request:
The API will return a 204 No Content response if the request is successful.
Example curl request:
The API will return a 200 OK response if the request is successful, with the updated bank payout object in the response body.
Example curl request:
The API will return a 200 OK response if the request is successful, with an array of country objects in the response body. Each country object will have the following properties:
code
string
The ISO 4217 currency code for the currency (e.g. USD, EUR, GBP)
name
string
The full name of the currency
Replace CURRENCY_CODE with the ISO 4217 currency code for the currency you want to get the exchange rate for.
Example curl request:
The API will return a 200 OK response if the request is successful, with the following JSON object in the response body:
To view all bank payouts, make a GET request to the following endpoint:
To delete a bank payout, make a DELETE request to the following endpoint:
To update a bank payout, make a PUT request to the following endpoint: Include the updated information in the request body.
To get a list of supported countries for bank payouts, make a GET request to the following endpoint:
To get the exchange rate for a specific currency, make a GET request to the following endpoint: