Create a Payout
This guide provides a quick walkthrough for creating a payout with EBANX, using your existing Direct API integration to complete the process step by step.
Instructions
To create a payout using EBANX Direct API, follow the steps below.
Define your parameters
There are a few key parameters you need to provide to create a payout. Check the table below for more details.
Field Description integration_key
Your EBANX integration key. external_reference
The unique payout ID provided by you. country
The two-letter country code for the customer country. In this case, we'll show the method to ar (Argentina) amount
The amount in the specified currency (currency_code). currency_code
Three-letter code of the payout currency. In this case, we'll use ARS (Argentina) payee
A JSON object containing the details of the payee of your request. Payee DetailsYou can either include all payee details in the payout request, or create the payee in advance using the
/ws/payee/create
endpoint and reference them by document number.Document Types Allowed
These document types are used to identify payees or shareholders.
Document type Description DNI National Identity Document, with 8 digits. CUIL Unique Labor Identification Code, with 11 digits. CUIT Single Tax identification. Send payout request to EBANX
To create a new Payout, you will use the /ws/payout/create endpoint.
There are two ways to create a payout for Argentina.
1 - MercadoPago
The following example is a payout create request for a MercadoPago account. You need to send the target key filled up with mercadopago and the key target_account with the MercadoPago account email.
curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/create' \
-d 'integration_key=your_test_integration_key' \
-d 'external_reference=PAYOUT_EBANX_04' \
-d 'country=ar' \
-d 'amount=100' \
-d 'currency_code=ARS' \
-d 'target=mercadopago' \
-d 'target_account=chew@bac.ca' \
-d 'payee[document]=85351346' \
-d 'payee[document_type]=DNI' \
-d 'payee[name]=Han Solo' \
-d 'payee[email]=chew@bac.ca' \
-d 'payee[address][zipcode]=B1675' \
-d 'payee[address][state]=AR-B' \
-d 'payee[address][city]=Buenos Aires' \
-d 'payee[address][street_address]=Fake Street' \
-d 'payee[address][street_complement]=123'2 - Bank Account
By default, the target key is set to bank_account, so it can be omitted when processing bank account payouts.
For bank account payouts, you must include the bank_info object with the bank_details key containing the CBU/CVU number.
The bank_details field is required and must be a 22-character string representing the CBU or CVU.
You must also include the account_type attribute to specify the destination account type:
- Use C for Checking
- Use S for Savings
This field is mandatory for all bank account payouts.
curl -X POST 'https://sandbox.ebanxpay.com/ws/payout/create' \
-d 'integration_key=your_test_integration_key' \
-d 'external_reference=PAYOUT_EBANX_04' \
-d 'country=ar' \
-d 'amount=100' \
-d 'currency_code=USD' \
-d 'payee[name]=Han Solo' \
-d 'payee[email]=chew@bac.ca' \
-d 'payee[phone]=+554112345678' \
-d 'payee[document]=34585474' \
-d 'payee[document_type]=DNI' \
-d 'payee[bank_info][bank_details]=3365196911100062632985' \
-d 'payee[bank_info][account_type]=C' \
-d 'payee[address][zipcode]=B1675' \
-d 'payee[address][state]=AR-B' \
-d 'payee[address][city]=Buenos Aires' \
-d 'payee[address][street_address]=Fake Street' \
-d 'payee[address][street_complement]=123'For organizations, the following fields are required in the shareholder object:
name
document
document_type
A successful request will return a JSON response with
"type": "success"
and apayout
object containing all the details of the newly created payout.{
"type": "success",
"payout": {
"uid": "a1352f5341c3c8c1e40ea9c06715f05778ff35ee",
"external_reference": "PAYOUT_EBANX_04",
"status": "OP",
"request_date": "2020-09-18 13:26:53",
"status_date": null,
"paid_date": null,
"cancel_date": null,
"payee": {
"name": "Han Solo",
"email": "chew@bac.ca",
"phone": "554112345678",
"document": "85351346893",
"document_type": "DNI",
"bank_info": {
"bank_name": "104 Caixa Econ\u00f4mica",
"bank_branch": "3708",
"bank_account": "8251777-6",
"account_type": "C",
"bank_details": "001"
}
},
"request_amount": "10.00",
"request_currency": "USD",
"request_exchange_rate": "1.0000",
"debit_amount": "10.00",
"debit_fee": "0.15",
"debit_amount_total": "10.15",
"debit_currency": "USD",
"local_tax_amount": "0.12",
"local_amount_total": "32.88",
"local_currency": "USD",
"local_exchange_rate": "3.2997"
}
}Send commit request to EBANX
After a new payout record is created, it will be automatically committed after 6 hours.
If you prefer to trigger the payment process immediately, you can use the/ws/payout/commit
endpoint.Example: Manually Commit a Payout
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "your_ebanx_integration_key",
"uid": "0e495f7a4409c032d54376084b10b9c771e9b39f0",
}'If the commit is successful, the API will return a JSON object like the following:
{
"type": "success",
"message": "Payout has already been committed"
}Congratulations!
You have succesfully Created a Payout in Argentina.
Creating a Payout using Dashboard
You can also create a payout through your Dashboard in the Overview section of the Payout tab. Click on Create Payout, fill in the payee information, payout amount and click Create. Additionally, you can create a Mass Payout for up to 600 payouts.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.