post
https://api.somossimpay.com.br/v2/finance/create-pix-copy-and-paste
Headers
| Parameter | Type | Description | Example |
|---|---|---|---|
| Authorization | String | Bearer + Access_token | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo |
| hmac | String | HMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC). | hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6) |
Body Details
{
"amount": 0.01,
"debtor_name": "M***** V****** F******",
"debtor_document": "***********",
"type_document": "CPF",
"type_fine": "NONE",
"fine": 0,
"source_account_branch_identifier": "****",
"source_account_number": "******",
"base_64_image": false
}
| Field | Type | Description | Required or Optional |
|---|---|---|---|
| amount | Decimal | Amount to be paid. | required |
| debtor_name | String | Payer's name. The maximum value is 25 characters for this field. | Optional |
| debtor_document | String | Payer document number which can be either a CPF (Individual Taxpayer Registry) with a length of 11 digits or a CNPJ (National Registry of Legal Entities) with a length of 14 digits. | required |
| type_document | String | CPF or CNPJ - You should inform the type of document according to what was provided in the debtor_document field. | required |
| type_fine | String | NONE, VALUE, or PERCENT – In this field, you should specify the type of fine/interest that will be applied. If this condition is not applicable, fill in the field with 'NONE'. If it is necessary to apply a fine/interest, use 'VALUE' to input a fixed amount or 'PERCENT' to indicate the percentage of the fine to be charged. If you use VALUE or PERCENT, remember that the due_date field must be included in the body (more details available in the PIX Cashin (PIX Copy and Paste) section with all recommended fields ). | required |
| fine | String | In this field, you should fill in the value that will be charged as fine/interest as indicated in the type_fine field (VALUE or PERCENT). If the type_fine field is filled in as 'NONE', fill in this field with '0' | required |
| source_account_branch_identifier | String | source_account_branch_identifier: In this field, please provide the number of the originating bank branch from which the Copy and Paste or QR Code Scanning will be generated. The branch number always consists of 4 digits (e.g., 0001). | required |
| source_account_number | String | In this field, you should provide the bank account number from which Copy and Paste or QR Code Scanning will be generated. A bank account number does not have a specific pattern and may vary in length depending on the financial institution. (Example: Accounts registered with SaQ.Digital typically have 6 characters) ex: 401050 | required |
| base_64_image | Boolean | In this field, you can choose whether to include the QR Code's base64 in the response of the request. If the option is set to true, the base64 will be included in the response. If set to false, the base64 will not be included. If the field is left empty, the base64 of the QR Code will be generated by default. | Optional |
During the Test Period (POC), the system will return the error of invalid HMAC, along with the correct HMAC that should be inputted.
Response Details
{
"worked": true,
"pix_copy_and_paste": "00020101021226880014br.gov.bcb.pix2566qrcodes.saq.digital/v2/qr/cob/***************************************SAQ INSTITUICAO DE PAGAME6009SAO PAULO62070503***63043F1A",
"qr_code_id": 1,
"debtor_name": "Fulano de tal",
"debtor_document": "144******47",
"type_document": "CPF",
"debtor_institution": null,
"debtor_institution_number": null,
"expiration_date": "2025-09-17T15:46:25.844Z",
"due_date": null,
"amount_chargeback": 0.0,
"amount": 0.01,
"fee": 0.0,
"type_fine": "NONE",
"fine": null,
"fine_date": null,
"status": "NEW",
"base_64_image": null,
"base_64_image_url": "https://api.saq.digital/v2/finance/image/qrcode/bae44c6d8ed34*****fe0d526e2c.png",
"account_number": "900002",
"agency_number": "0001",
"endToEndId": "",
"payment_date": null,
"tax": null,
"tx_id": "bae44c6d8ed34*****fe0d526e2c",
"tag": null
}
| Field | Type | Description |
|---|---|---|
| worked | Boolean | Returns true or false confirming whether the query was successfully submitted or not. |
| pix_copy_and_paste | String | This field returns the generated copy and paste code that the customer can pay directly through their bank |
| qr_code_id | Int | Unique payment identifier generated. This value never repeats, and it enables querying endpoints to confirm the payment status, refunds, etc. |
| debtor_name | String | Returns the Payer's name (the same information that was sent in the body) |
| debtor_document | String | Returns the Payer's document (the same information that was sent in the body) |
| type_document | String | Returns the Payer's type document (the same information that was sent in the body) |
| debtor_institution | String | Returns the payer's debtor institution |
| debtor_institution_number | String | Returns the debtor institution number (ISPB) |
| expiration_date | Datetime | Returns the expiration date if applicable (same as provided in the request body) |
| due_date | Datetime | Returns the due date (the same information that was sent in the body) |
| amount_chargeback | Decimal | If a refund occurs, this field will be filled with the refunded amount. |
| amount | Decimal | Returns the amount (the same information that was sent in the body) |
| fee | Decimal | This field returns the fee charged to the SaQ.Digital customer when using the Generate PIX Cash In (Copy and Paste or QR Code Scanning) endpoint. |
| type_fine | String | Returns the type_fine if applicable |
| fine | Decimal | Returns the fine if applicable |
| fine_date | Datetime | Returns the fine_date if applicable |
| status | String | NEW - Payment generated, awaiting payment by the customer PAID - Payment successfully completed CANCELED - Payment canceled / expired |
| base_64_image | String | This field returns the generated QRCode image in base64 format |
| base_64_image_url | String | This field returns the link with the generated QRCode image. The customer can scan it and pay directly through their bank. |
| account_number | String | Returns the account Number (the same information that was sent in the body) |
| agency_number | String | Returns the agency Number (the same information that was sent in the body) |
| endToEndId | String | Returns the Endtoend ID (the same information that was sent in the body) |
| payment_date | Datetime | Returns the date and time at which the payment was completed |
| tax | Decimal | Returns the fee amount charged for the transaction |
| tx_id | String | Returns the conciliation ID QR Code |
| tag | String | Returns the tag if applicable (the same information that was sent in the body) |
