Payments via Pix / Dynamic QR Code
The fastest way to get money into your account.
Create payments via Pix
Create payments with billingType set to PIX and provide the dynamic QR Code for payment.
By the end of this guide, you will know how to create a Pix payment and retrieve the QR Code and the copy-and-paste code.
1. Create the payment
Send the payment with the PIX payment method.
POST /v3/lean/payments{
"customer": "cus_000005219613",
"billingType": "PIX",
"value": 100.90,
"dueDate": "2023-07-21"
}See the endpoint: Create new payment with summary data in response.
We recommend keeping a registered Pix key in the account.
2. Get the QR Code
After creating the payment, send the returned ID to retrieve the QR Code data.
GET /v3/payments/{id}/pixQrCodeSee the endpoint: Get QR Code for Pix payments.
The response provides:
| Field | Description |
|---|---|
encodedImage | QR Code image in Base64 |
payload | Pix copy-and-paste code |
expirationDate | QR Code expiration date |
The QR Code is dynamic, has a due date, and can be paid only once.
It expires 12 months after the payment's due date and can be printed or included in documents such as bank slips and payment booklets.
Payments without a registered Pix keyCurrently, it is possible to generate an immediate-payment dynamic Pix QR Code without a Pix key registered in Asaas. In this case, the QR Code is linked to a partner institution and can be paid until 11:59 PM on the same day.
If the payment is updated, get a new QR Code.
This feature will be discontinued in the future, with notice 30 days in advance. Therefore, we recommend registering a Pix key.
Next steps
Updated 4 days ago
