Withdrawal for Brazil
This part of the documentation describes the withdrawal flow for Brazil.
# POST /v4/withdrawals
# REQUEST
# BR withdrawals
For BR, either the user_id
or national_identification_number
is required to initiate a withdrawal. If the national_identification_number
is used then the bank_account
is also required.
{
// required
"country_code": "BR",
"site_display_name": "Best Website.com",
"ref": "merchant-transaction-ref",
"amount": "100.00",
"currency": "BRL",
"site": "example.com",
"success_url": "https://example.com/return_path/transaction_identifier",
"failure_url": "https://example.com/return_path/transaction_identifier",
"close_url": "https://example.com/return_path/transaction_identifier",
"user_ip":"123.456.78.90",
// optional
"payment_prefix":"A1B2C3",
"notification_url": "https://example.com/return_path/transaction_identifier",
"account_ref": "CustomerRefOnMerchantSide",
"email": "bobben@example.com",
"locale": "pt-BR",
"mobile_phone": "+5511234569999"
// bank_account is required for BR
"bank_account": {
"type": "iban",
"account_number": "BR8937040044053201300C"
}, // or
"bank_account": {
"type": "pix-BR",
"key": "23100299900"
"key_type": "CPF" // "CPF", "CNPJ", "TELEFONE", "EMAIL", "CHAVE_ALEATORIA"
},
// one of user_id or national_identification_number is required for BR
"user_id": "f65191e4-3064-cc45-df68-8130e4a11197",
"national_identification_number": "23100299900"
}
# RESPONSES
All responses will include the full withdrawal object sent within your request. This is pointed out with the […] in below documentation.
# Authorized (will be sent in the notification)
The withdrawal is complete and can now be approved.
{
...
"id": "6a734480-a051-4a05-8405-ac2d8f49102f",
"state": "authorized",
"user_form_url": "https://toh.zimpler.net/v4/callbacks/5c2ce36d-cf4b-4b8b-9930/success",
"user_id": "9b9047da-175f-d29a-dae8-85b428488c2e",
"kyc_info": {
"country_code": "BR",
"user_id": "9b9047da-175f-d29a-dae8-85b428488c2e",
"first_name": "Heitor",
"last_name": "Souza",
"date_of_birth": "1981-01-01",
"sex" : "M",
"pep": false,
"address": {
"line_1": "Avenida Sete de Test",
"line_2": null,
"postcode": "69000-000",
"city": "Rio de Janeiro",
"country": "Brazil",
},
"bank_account": {
"type": "iban",
"account_number": "BR8937040044053201300C"
}, // or
"bank_account": {
"type": "pix-BR",
"key": "23100299900"
"key_type": "CPF" // "CPF", "CNPJ", "TELEFONE", "EMAIL", "CHAVE_ALEATORIA"
}
}
}
# POST /v4/withdrawals/:id/approve
Note: Amount has to be the same as provided in the POST /v4/withdrawals
.
# REQUEST
{
// required
"amount": "100.00"
}
# RESPONSE
{
...
"state": "approved"
}
# POST /v4/withdrawals/:id/reject
# RESPONSE
{
...
"state": "rejected"
}
# GET /v4/withdrawals/:id
Will return the full transaction object with the current state.