PIX is an alternative payment method exclusive to Brazil, which we offer through Facilitapay, Pagsmile and Apolopag. It allows you to make transfers and payments in real time, at any time and any day. It can be used through banking applications and other financial platforms. With PIX, users can pay using their phone number, email or QR codes, without the need for complicated banking details.
There are two ways to integrate it: by redirection or push payment.
Integration via redirection
To integrate by redirection, the user must be present at the time of payment, which must be processed through a browser. First we must generate a payment order. Only, if using PIX through PAGSMILE, it will be necessary to indicate the user's name, email and identification number.
"extra_data": {
"profile": {
"first_name": "Carlos",
"last_name": "Moreno",
"email": "test@gmail.com",
"document_identification_number": "11032341882"
}
}
As service identifier, the service_uuid of the FACILITAPAY, PAGSMILE or APOLOPAG service you have activated in your Paylands Backend → Manage → Payment Services → Listing must be indicated.
Once the order is generated, the user must be redirected to the payment screen indicating the token of the order and in the query, the name of the APM:
We construct the redirection URL by replacing the token of the order returned from the previous call.
https://api.paylands.com/v1/sandbox/payment/process/{token}?apm=PIX
Once the user is redirected to this screen, they will be able to view the reference to be entered through his/her bank's mobile application. When the payment is completed, they will be redirected back to the OK or KO URL, depending on the result of the payment.
Push payment integration
If the merchant prefers to send the reference to the user through a channel other than the browser, it is possible to integrate the push payment method, which will return the reference to the server so that it can be sent to the user.
To do this, we must first generate a payment order, indicating user name, email and identification number if PAGSMILE is being used. If you use APOLOPAG, indicate the same with telephone number and date of birth, along with the above.
For PAGSMILE:
"extra_data": {
"profile": {
"first_name": "Carlos",
"last_name": "Moreno",
"email": "test@gmail.com",
"document_identification_number": "11032341882"
}
}
For APOLOPAG:
"extra_data": {
"profile": {
"first_name": "Carlos",
"last_name": "Moreno",
"email": "test@gmail.com",
"document_identification_number": "659.516.937-13",
"birthdate": "1996-01-01",
"phone": {
"number": "5151428089"
}
}
}
Then we must launch the push payment request indicating the UUID of the order. The response will contain the pix key and the QR code with which to pay. These fields are included within the payment transaction, in the payment_data
field. An example is included below:
"payment_data": {
"qr_code": "00020126580014br.pix013627a44d0a-0736-4bbf-a4a4-6e11063973315204000053039865406100.pixTest123742074363049E0B",
"qr_code_url": "https://paylands/pix-example/qr-code"
}
Once the payment is completed, the merchant will receive the payment notification to the URL indicated in the url_post
field when generating the payment order.
Testing
For more information on how to test this payment method on each of your vendors, visit the FACILITAPAY, PAGSMILE or APOLOPAG documentation.
Custom fields
Optionally, if you are using PIX with PAGSMILE or APOLOPAG, within the extra_data
you can include the payment_reason
field, which allows you to indicate a description of the payment.
"extra_data": {
"payment": {
"payment_reason": "Payment description"
}
}