PIX Integration Payins

Pix Payins

POST https://api.payretailers.com/payments/v2/transactions

For Payins, customers are either able to submit the “active” account used for the transaction, or all registered customer accounts. Given Pix is asynchronous and the customer can use any Pix account to submit payment, we suggest customers insert all registered accounts to optimize conversion and prevent false positives in account validation.

POST Json Request

{
 "paymentMethodId": "53EF54E3-8788-4144-A808-690F0C1AADA3",
 "amount": "10000",
 "currency": "BRL",
 "description": "New Pix Integration",
 "trackingId": "",
 "notificationUrl": "https://XXX.XXX.com",
 "returnUrl": " https://XXX.XXX.com",
 "cancelUrl": " https://XXX.XXX.com ",
 "language": "PT",
 "customer": {
"firstName": "Jhon",
"lastName": "Doe",
"email": "[email protected]",
"country": "BR",
"personalId":"1XXXXXXXXXXXX0", 
"registeredAccounts": [
 {
  "bankName": "001", 
  "accountNumber": "0001", 
  "accountAgencyNumber": "0123456789", 
  "accountTypeCode": "0002" 
 } 
],
"city": "City",
"address": "Address",
"zip": "58410-111",
"phone": "1111122225",
"deviceId": "DEVICE",
"ip": "181.166.166.11"
 }
}

Multiple registeredAccounts objects can be included in each payload as part of a collection.

Example:

"registeredAccounts": [
    {
        "bankName": "001",
        "accountNumber": "0001",
        "accountAgencyNumber": "0123456789",
        "accountTypeCode": "0002"
    },
    {
        "bankName": "002",
        "accountNumber": "0002",
        "accountAgencyNumber": "9876543210",
        "accountTypeCode": "0002"
    },
    {
        "bankName": "003",
        "accountNumber": "0003",
        "accountAgencyNumber": "5678901234",
        "accountTypeCode": "0002"
    }
]

In the event the transaction needs to be reversed due to non-compliance, the confirmation webhook will contain the reason code “CUSTOMER ACCOUNT IS NOT REGISTERED” and set the transaction status as “CANCELLED”.

In the case of the Canceled Transaction Status, the following information will be included in the Webhook:

"uid": "105433d8-74584-40b1-8f0e-3d543bbc0648",
"type": "payment",
"status": "FAILED",
"message": "INVALID_PAYMENT_PAYER_ACCOUNT_NOT_REGISTERED"

Also, refer to this section of our documentation regarding error messages for failed validation. <Payout Error Messages>


Error Messages

Below are the possible error messages for these transactions:

Error ReasonDescription
INVALID_PAYMENT_PAYER_ACCOUNT_NOT_REGISTEREDThe payer account doesn't match with the registered accounts enabled for this operation
CORPORATE_BANK_ACCOUNT_PAYMENT_NOT_ALLOWEDThe transaction was paid from a corporate bank account.
TRANSACTION_INVALID_CPF(Brazil only) the "personalID" field contains an invalid value