Skip to main content

Payout

With PagaSul, you can send money directly to your customers' bank accounts or Pix keys.

Here is a step-by-step description of the payout processing flow in PagaSul. en_payout_flow.svg

How to integrate

1. Create a pay-out

Send a POST request to /v2/pay-out. Include a signature in the header, and specify the payment method and the beneficiary's account details.

curl -X POST https://api.pagasul.com/v2/pay-out \
-H "Content-Type: application/json" \
-H "signature: <calculated>" \
-d '{
"client_id": 123,
"client_payment_id": "payout_42",
"amount": 150.00,
"currency": "BRL",
"payment_method": "BR.PIX",
"payee": {
"id": "user_1234",
"cpf": "231.002.999-00"
},
"payee_account": {
"pix_key": "johndoe@example.com",
"pix_key_type": "EMAIL"
},
"payment_options": {
"callback_url": "https://your-site.com/webhook"
}
}'

client_payment_id must be unique per payment in your system — it is used for idempotency.

The required payee_account fields depend on the payment method. For example, a Colombian bank transfer requires payee_account.number, payee_account.account_type, and payee_account.bank_code. See Payment Methods for the exact requirements per method, and Bank List for valid bank_code values.

Full parameter list

ParameterTypeRequiredDescription
client_idintegerYesYour account identifier, provided upon integration
client_payment_idstringYesYour payment ID, must be unique to the client_id used
payment_methodstringYesSelected payment method code (see Supported payment methods section)
currencystringYesPayment currency (see Supported payment methods section)
amountdecimalYesRequested payment amount (for example: pass 12.34 for 12 dollars 34 cents amount)
payeeobjectYesCustomer data section
payee.idstringYesA unique identifier for a customer or customer account on your side. It is used to accumulate customer data and for anti-fraud protection
payee.is_trustedbooleanOptionalIf passed and "true" customer marked as trusted (for use please consult Pagasul representative)
payee.namestringOptionalCustomer name
payee.emailstringOptionalCustomer email
payee.countrystringOptionalCustomer country (alpha-2 code)
payee.statestringOptionalCustomer state
payee.citystringOptionalCustomer city
payee.addressstringOptionalCustomer address
payee.phonestringOptionalCustomer phone
payee.languagestringOptionalPreferred language for customer
payee.cpfstringOptionalCustomer CPF (Cadastro de Pessoas Físicas) for Brazil payment methods. Can be passed in following formats: "231.002.999-00" or "23100299900"
payee.cuitstringOptionalCustomer CUIT (Unique Tax Identification Code) for Argentina payment methods. Can be passed in following formats: "30-69330706-2" or "30693307062"
payee.citizenship_cardstringConditionalNumber of the Citizenship Card (Cédula de Ciudadanía) for Colombian/Ecuadorian payment methods
payee.nitstringConditionalUnique Taxpayer Number (Número de Identificación Tributaria) for Colombian/Bolivian payment methods
payee.passtringOptionalPassport needed for Bolivian/Ecuadorian payment methods
payee.cestringOptionalCustomer Identity card of Foreigners (Cédula de Extranjería) for Colombian payment methods
payee.tistringOptionalCustomer identity document (Tarjeta de Identidad) for Colombian payment methods
payee.cistringOptionalCustomer identity document (Cédula de Identidad) for Bolivia/Venezuela payment methods. For Venezuela it must start with letter V or E
payee.rucstringOptionalEcuadorian taxpayer number (Registro Único de Contribuyente)
payee.rifstringOptionalVenezuela's tax number (Registro de Información Fiscal). It must start with letter V, E, P, J, G, or C
payee_accountobjectYesCustomer account data for payment
payee_account.pix_keystringConditionalRequired for Pix method. Key for Pix account. One of the following: CPF, CNPJ, E-mail, Phone, EVP
payee_account.pix_key_typestringConditionalRequired for Pix method. Type of pix key value. One of: CPF, CNPJ, EMAIL, PHONE, EVP
payee_account.breb_keystringConditionalRequired for Bre-b method. Key for Bre-b account. One of the following: E-mail, Phone, ID (Cédula), Alpha-Numeric Code (user-generated alias)
payee_account.account_typestringConditionalType of account number passed in number parameter. (Mandatoriness see in section Supported payment methods). One of: CACC, SVGS
payee_account.numberstringConditionalBank account number or mobile phone number that links to bank account (Mandatoriness see in section Supported payment methods)
payee_account.bank_codestringConditionalPayee bank code (Mandatoriness see in section Supported payment methods). One of bank code from list (see Bank Codes section)
payee_account.holder_namestringConditionalBank account holder name. Required for Argentina bank transfers (Mercado Pago) method
payment_optionsobjectOptionalOptional section for extra parameters used for payment flow adjustment
payment_options.callback_urlstringOptionalIf passed, the notification on payment status change will be sent to the specified URL
payment_extra_paramstringOptionalPlease, contact to your manager for possible parameter values and purpose

Also the full parameter list, see Create pay-out in the API Reference.

2. Handle the response

A successful request returns a 200 response with status: "new":

{
"payment_id": 246001235,
"status": "new",
"result_code": "OK",
"result_message": "payment processing"
}

Store the payment_id — you'll need it to correlate callbacks. For the full response structure, see Response.

3. Handle the callback

When the payout is processed, PagaSul sends a POST to your callback_url. Verify the signature in the header, then check the status field:

StatusMeaningAction
successPayout deliveredNo action required
declinePayout declinedCheck result_code, notify the customer
failedProcessing errorContact PagaSul support

For all statuses and result codes, see Statuses & Codes. For the full callback structure, see Callbacks.