API Reference

The Gateway Out method is used to transfer merchant funds direct to customers bank account, using bank data or Pix key.


Important: When the payment method passed is 'pix', the 'pix_key' variable must be populated properly. The 'pix_key' should be a valid CPF, identified as a registered pix key associated with the customer. This validation ensures that the Gateway Out payment is directed to the correct user, verified against the customer's CPF.


Params (before JWT-encoding)


ParameterTypeDescription
name(required, string)The 'name' parameter represents user name. If this value is provided as blank, the deposit form will display the field as editable, allowing the user to input his name.
email(required, string)The 'email' parameter represents the user email address. If this value is provided as blank or invalid email address, the corresponding field in the deposit form can be manually edited by the user.
cpf(required, string)The 'cpf' parameter represents the user's CPF (Brazilian tax number). If this value is provided as blank or with a invalid, the corresponding field in the deposit form can be manually edited by the user.
paymentMethod(required, string)The 'paymentMethod' parameter specifies the defined withdrawal method, which can only these following options: [banco-do-brasil, bradesco, caixa, nubank, santander, pix].
amount(number, string)The 'amount' parameter represents the value of the deposit and cannot be modified by the user.
currency(required, string)The 'currency' parameter specifies the deposit currency, which defaults to BRL (Brazilian Real) in ISO 4217 format.
reference(required, string)The 'reference' parameter represents the reference ID, which is a unique string generated by the merchant.
merchant_user(required, string)The 'merchant_user' parameter identifies the user on your system, which may be represented by an ID or username.
country(required, string)The 'country' parameter specifies the user's country configured on the merchant cashier, formatted according to ISO 3166 standards. Only 'BR' (Brazil) is accepted.
pix_key(required only if paymentMethod === "pix", string)The 'pix_key' parameter must be a valid CPF, which must also be registered as a pix key. The 'pix_key' value and the 'cpf' value must match. This parameter is required only if the paymentMethod is pix.
branch(required only if paymentMethod !== "pix", string)The 'branch' parameter represents the customer’s branch code for the withdrawal. It is not required if the paymentMethod is pix.
account(required only if paymentMethod !== "pix", string)The 'account' parameter represents the customer’s bank account number for the withdrawal. It is not required if the paymentMethod is pix.
account_type(required only if paymentMethod !== "pix", string)The 'account_type' parameter indicates the customer’s bank account type for the withdrawal. Use 'C' for Current Account and 'S' for Savings Account. It should be displayed to the customer on the merchant cashier as follows: 'C' for Current Account > 'Conta Corrente de Pessoa Física', and 'S' for Savings Account > 'Conta Poupança de Pessoa Física'. This parameter is not required if the paymentMethod is pix.
buyer_ip(required, string)The 'buyer_ip' parameter represents the user's IP address.
phone(optional, string)The 'phone' parameter represents the user's phone number. The suggested format is (51)9999-999, where (51) is the area code. The maximum length is 45 characters..
{
  "iat": 1712175617,
  "exp": 1712175677,
  "data": {
    "name": "",
    "email": "",
    "cpf": "",
    "paymentMethod": "",
    "amount": 0,
    "currency": "BRL",
    "reference": "",
    "merchant_user": "",
    "country": "BR",
    "pix_key": "",
    "branch": "",
    "account": "",
    "account_type": "",
    "buyer_ip": "",
    "phone": ""
  }
}



After this request is marked as 'completed' or 'canceled,' you will receive a callback notification with the current status.

The merchant must provide a URL as a callback method to receive payment notifications. This URL will receive a JWT token via POST with the confirmation data.


For more information, please refer to the documentation here.



Example Response (after JWT-decode)

{
  "iat": 1712254851,
  "exp": 1712254911,
  "code": 201,
  "data": {
    "transfer_id": "102140"
  }
}

Language
Click Try It! to start a request and see the response here!