Cashin
API Reference: PIX QR Code Immediate
Currently, in U4C PIX, we have two ways to make a cash-in (deposit money into your U4C account):
- Immediate Dynamic QR Code Generation
- PIX Transfer
Immediate Dynamic QR Code
What is it?
It encodes transaction and Pix key data into a QR Code, allowing the payer to complete the transaction by simply scanning the code in their financial institution's app.
Business Rules:
- Each Dynamic QR Code can be paid only once.
- After the QR Code expires, it cannot be paid anymore.
- The account generating the QR Code must have a PIX key.
Features:
- Generate the QR Code image (in base64) or PIX Copy and Paste (Default: Payload).
- Set an expiration time in seconds (Required).
- Set the value of the QR Code (Required).
- Define any request to the payer (Optional).
- Present additional information to the payer (Optional).
- Restrict the payer to specific CPFs or CNPJs (Optional).
- Define receiver information (Optional).
- Define payer information (Optional).
Key | Description |
---|---|
customerId | Client unique identifier in U4C. |
externalId | External identifier for additional reference or tracking. |
payerRequestInformation | Information related to the payer's request. |
format | Format of the generated PIX code, set to "IMAGE_AND_PAYLOAD" || "PAYLOAD". IMAGE AND PAYLOAD = Generates the QR Code IMAGE in base 64. PAYLOAD = Only generates the "PIX COPIA e COLA" |
additionalInformation | Additional information in the form of an array of key-value pairs. Each element contains a name and content. |
immediate | Object containing details for immediate payment. |
- expiration | Expiration time for the PIX code in seconds. |
- payerInformation | Information about the payer, including name and CPF/CNPJ. |
- paymentValue | Details about the payment value, including documentValue and whether to show it in the QR code. |
- receiverInformation | Information about the receiver, including category code, city IBGE, and zipcode. |
- restrictPayers | Restrictions on specific payers, including name and CPF/CNPJ. |
Example Curl:
curl --location 'https://pix.u4c-baas.com/pix/brcode/erp/v2/dynamic/immediate' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'partner: 20c0d057-a1f0-4c2d-b680-509a9aaab467' \
--header 'token: f67ec3fd-7536-406d-b939-bdeaf877480b' \
--data '{
"format": "PAYLOAD",
"payerRequestInformation": "TEST PAYLOAD",
"customerId": "{{yourCustomerId}}",
"externalId": "{{yourExternalId}}",
"immediate": {
"payerInformation": {
"name": "Portuga Andre",
"cpfCnpj": "yourPayerCPF"
},
"expiration": 3600,
"paymentValue": {
"documentValue": "0.1"
},
"receiverInformation": {
"categoryCode": "2000",
"zipcode": "86055860",
"cityIbge": "3550308"
},
"restrictPayers":{
"cpfCnpj": ["yourPayerCPF"]
}
},
"additionalInformation": [
{
"name": "key",
"content": "0adb:db39:b43b:6a01:c7b1:78b9:23e7:1276"
},
{
"name": "site",
"content": "ryley.com"
},
{
"name": "city",
"content": "Port Icieton"
}
]
}'
Updated 12 months ago
What’s Next