Create a Payout with Existing Payee
This guide shows how to create a payout using an existing payee in EBANX, with step-by-step instructions based on your existing Direct API integration.
Instructions
To create a payout using EBANX Direct API, follow the steps below.
Define your parameters
Provide the required parameters listed below to create a payout.
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 br (Brazil) amount
The amount in the specified currency (currency_code). currency_code
Three-letter code of the payout currency. In this case, we'll use BRL (Brazil) payee_uuid
Payee uuid received on payee create endpoint Send payout request to EBANX
To create a new Payout, you will use the /ws/payout/create endpoint.
The following example is a payout create request to the payee's bank account sending bank data with bank details:
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=br' \
-d 'amount=10' \
-d 'currency_code=USD' \
-d 'payee_uuid=11bfcdc3-f323-4dd1-becc-a75235857fed' \And a successful creation will return a JSON Object with type "success" and a payout object with 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": "CPF",
"birthdate": null,
"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"
}
}On the other hand, if necessary, you can send the payment to this payee but on a different bank account or with a different payment method.
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=br' \
-d 'amount=10' \
-d 'currency_code=USD' \
-d 'payee_uuid=11bfcdc3-f323-4dd1-becc-a75235857fed' \
-d 'payee[bank_info][bank_name]=104 Caixa Econômica' \
-d 'payee[bank_info][bank_branch]=3708' \
-d 'payee[bank_info][bank_account]=08251777-6' \
-d 'payee[bank_info][account_type]=C' \
-d 'payee[bank_info][bank_details]=001' \Bank Information UpdateNote that when you send payee bank information the payee will be updated with the new bank data and this bank account will be considered the standard for future payout create with payee_uuid. That's saying: a payee can only have registered one active account per payment method.
You can either pass an APM target with respective target_account and even if the payee already has bank information registered, the target data will be considered for this payout.
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=br' \
-d 'amount=10' \
-d 'currency_code=USD' \
-d 'target=mercadopago' \
-d 'target_account=chew@bac.ca' \
-d 'payee_uuid=11bfcdc3-f323-4dd1-becc-a75235857fed' \And a successful creation will return a JSON Object with type "success" and a payout object with 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": "CPF",
"birthdate": null,
"bank_info": null,
},
"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",
"target": "mercadopago",
"target_account": "chew@bac.ca"
}
}Congratulations!
You have succesfully Created a Payout with existing payee.
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.