Create a payout
const url = 'https://api.pachapay.io/v1/payouts';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"amount":50000,"currency":"CLP","country":"CL","method_code":"CL.BANK_TRANSFER","merchant_reference":"payout-1190","destination":{"type":"bank_account","bank_code":"001","account_number":"000123456789","account_type":"checking","holder_name":"Maria Lopez","holder_document":{"type":"RUT","number":"12345678-5"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pachapay.io/v1/payouts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "amount": 50000, "currency": "CLP", "country": "CL", "method_code": "CL.BANK_TRANSFER", "merchant_reference": "payout-1190", "destination": { "type": "bank_account", "bank_code": "001", "account_number": "000123456789", "account_type": "checking", "holder_name": "Maria Lopez", "holder_document": { "type": "RUT", "number": "12345678-5" } } }'The amount plus our fee is reserved from the merchant’s available balance at creation.
If the balance is not enough, returns 422 insufficient_balance.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Unique key per logical operation, up to 255 characters. Keys are kept for 24 hours. Same key with a different body returns 409 idempotency_conflict, and the same key while the first request is still running returns 409 idempotency_in_progress.
Request Bodyrequired
Section titled “Request Bodyrequired”object
ISO 4217 code. Crypto assets are not accepted in this field.
ISO 3166-1 alpha-2. Target countries for the first release are CL, CO, EC, PE, MX and BR; availability per country depends on the agreement with the payment provider.
object
object
object
E.164 format.
object
object
object
object
object
object
Must be whitelisted; a new address becomes active after 24 hours.
Up to 20 string keys, values up to 500 characters. Returned as is.
object
Example
{ "amount": 50000, "currency": "CLP", "country": "CL", "method_code": "CL.BANK_TRANSFER", "merchant_reference": "payout-1190", "destination": { "type": "bank_account", "bank_code": "001", "account_number": "000123456789", "account_type": "checking", "holder_name": "Maria Lopez", "holder_document": { "type": "RUT", "number": "12345678-5" } }}Responses
Section titled “Responses”Payout created.
object
After succeeded the bank may still return the money, then the status becomes returned.
Our fee; reserved on top of the amount.
ISO 4217 code. Crypto assets are not accepted in this field.
ISO 3166-1 alpha-2. Target countries for the first release are CL, CO, EC, PE, MX and BR; availability per country depends on the agreement with the payment provider.
object
object
object
E.164 format.
object
object
object
object
object
object
Must be whitelisted; a new address becomes active after 24 hours.
Set when the payout executes a refund.
Up to 20 string keys, values up to 500 characters. Returned as is.
object
Example
{ "id": "pout_0192f3b7", "object": "payout", "status": "created", "currency": "CLP", "country": "CL", "destination": { "type": "bank_account", "account_type": "checking", "holder_document": { "type": "RUT" } }}Too many requests. Retry after the number of seconds in Retry-After.
object
object
Stable machine-readable code that does not change within a major version. Examples are
parameter_invalid, parameter_missing, amount_out_of_range, api_key_invalid,
api_key_revoked, merchant_not_active, method_not_allowed, country_not_allowed,
resource_not_found, idempotency_conflict, idempotency_in_progress, invalid_state,
insufficient_balance, method_not_available, blocked_payer, limit_exceeded,
rate_limited, internal_error, provider_unavailable, service_unavailable.
Name of the offending parameter, if any.
Example
{ "error": { "type": "invalid_request_error" }}Headers
Section titled “Headers”Seconds to wait before retrying.
Requests allowed in the current window.
Requests left in the current window.
Seconds until the window resets.
Error. See error.code.
object
object
Stable machine-readable code that does not change within a major version. Examples are
parameter_invalid, parameter_missing, amount_out_of_range, api_key_invalid,
api_key_revoked, merchant_not_active, method_not_allowed, country_not_allowed,
resource_not_found, idempotency_conflict, idempotency_in_progress, invalid_state,
insufficient_balance, method_not_available, blocked_payer, limit_exceeded,
rate_limited, internal_error, provider_unavailable, service_unavailable.
Name of the offending parameter, if any.
Examples
Merchant not approved
{ "error": { "type": "permission_error", "code": "merchant_not_active", "message": "KYB is not approved for this merchant.", "request_id": "req_01" }}Not enough balance
{ "error": { "type": "invalid_state_error", "code": "insufficient_balance", "message": "Available balance is lower than the amount plus fee.", "param": "amount", "request_id": "req_02" }}Error. See error.code.
object
object
Stable machine-readable code that does not change within a major version. Examples are
parameter_invalid, parameter_missing, amount_out_of_range, api_key_invalid,
api_key_revoked, merchant_not_active, method_not_allowed, country_not_allowed,
resource_not_found, idempotency_conflict, idempotency_in_progress, invalid_state,
insufficient_balance, method_not_available, blocked_payer, limit_exceeded,
rate_limited, internal_error, provider_unavailable, service_unavailable.
Name of the offending parameter, if any.
Examples
Merchant not approved
{ "error": { "type": "permission_error", "code": "merchant_not_active", "message": "KYB is not approved for this merchant.", "request_id": "req_01" }}Not enough balance
{ "error": { "type": "invalid_state_error", "code": "insufficient_balance", "message": "Available balance is lower than the amount plus fee.", "param": "amount", "request_id": "req_02" }}