Create a Dynamic QR Code

The POST /v3/funding_details/pix/dynamic-qr-code method enables you to generate a new dynamic QR code in response to a consumer's request.

You generate the QR code providing your Pix key and your payer's tax ID. You then send the QR code to your payer, who will use it to complete a payment.

To create a code, make an HTTP call to the following endpoint using the indicated body parameters:

POST https://api-stage.bitso.com/v3/funding_details/pix/dynamic-qr-code

Request Body Parameters

Parameter NameDescriptionTypeRequired / Optional
amountThe amount to be received in BRL. This positive number represents the monetary amount to be credited to the Bitso account (payee).string (number)Required
payerContains the data of the consumer sending the payment.
See the table below for its description.
objectRequired
pix_keyThe address key of the payee's account or wallet.stringRequired

The payer object includes the following parameters:

Parameter NameDescriptionTypeRequired / Optional
nameThe payer's full legal name.stringRequired
tax_idTheir personal or business taxpayer ID. In Brazil they are named CPF or CNPJ.stringRequired

The following JSON object exemplifies the request body for generating a dynamic QR code:

{
  "payer": {
    "name": "João Pereira da Silva",
    "tax_id": "56782756820"
  },
  "amount": "150.00",
  "pix_key": "81382556917"
}

A successful call returns a JSON object that represents a dynamic QR code and its associated payment data:

{
  "success": true,
  "payload": {
    "fid": "037c4c00e17c592fc7b6d9bad2261be8",
    "payer": {
      "name": "João Pereira da Silva",
      "tax_id": "56782756820"
    },
    "amount": "150.00",
    "expires_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "qr_code_payload": "string"
  }
}

An unsuccessful call returns a JSON object that includes the error object:

{
    "success": false,
    "error": {
        "code": "1101",
        "message": "We couldn't process your sending request. Try again in a few minutes."
    }

Response Body Parameters

Parameter NameDescriptionType
errorContains error details when the call fails.
See the table below for its description.
object
payloadContains the payment and QR code data.
See the table below for its description.
object
successFlag that indicates whether the call was successful.Boolean

The error object contains the following parameters:

Parameter NameDescriptionType
codeThe error codestring
messageAn explanation of the errorstring

The payload object includes the following:

Parameter NameDescriptionType
amountThe amount to be received in BRL.string
created_atThe date and time when the QR code was issued in ISO 8601 format.string (timestamp)
expires_atThe date and time when the QR code will expire in ISO 8601 format.
The code's lifetime is 30 minutes from creation time.
string (timestamp)
fidThe payment's unique, system-generated identifier. This ID is useful for correlating the payment with the transaction notifications delivered by the webhook. It's also the path parameter used when retrieving a QR code pay-in.string
payerContains the data of the consumer sending the payment.
See its description table in the Request Body Parameters section.
object
qr_code_payloadThe string representation of the QR code.string

Did this page help you?