Environments

Environments Address
Sandbox api2.cielo.com.br/sandbox
api2.cielo.com.br/sandbox/v2/oauth/token (format url encoded)
api2.cielo.com.br/sandbox/v2/oauth/access-token (format json)
api2.cielo.com.br/sandbox/padraoq/v1/publicKey
api2.cielo.com.br/sandbox/padraoq/v1/parsedQRCode
api2.cielo.com.br/sandbox/padraoq/v1/payment/card
Production api2.cielo.com.br
api2.cielo.com.br/v2/oauth/token (format url encoded)
api2.cielo.com.br/v2/oauth/access-token (format json)
api2.cielo.com.br/padraoq/v1/publicKey
api2.cielo.com.br/padraoq/v1/parsedQRCode
api2.cielo.com.br/padraoq/v1/payment/card

Access requirements

For the use of our APIs we need to receive the following information, for the creation of the client id and Authorization

Information we will send:

After sending the above information, we will send the client_id (key that identifies the APP) and the client_secret to the person in charge.

Any questions, open a ticket with our Developer Experience team Zendesk

Authentication

Access Token generation flow (via JSON format)

Fluxo de Integração QR Code

The access_token resource is responsible for authentication using the OAuth 2.0 protocol. With client_id and client_secret in hand the request to POST / access_token must be done by carrying authorization in Header and grant_type in the body of the request, following example below.

Note: The authorization value must be composed of the word Basic with Base64 generated from the client_id concatenation: client_secret

Contract

POST /v2/oauth/access-token (format json)

Headers

Key Value
Authorization Basic + Base64
Content-Type application-json

Body

{
"grant_type": "client_credentials"
}

Request Example

curl --location --request POST 'https://api2.cielo.com.br/v2/oauth/access-token' \
--header 'Authorization: Basic
dERxQUs000FoSDg5dFdpUWM1ejY0REJKc2lJTFpLbzh4TG0zV0p3eHkwRkQ0Y2dZVm46ZVZUVVZJZjFZWDJkOU40M0p4MVZwNGlWVXEzTzluTTR0TGF1UzhZYWo0V1JPcTJFSXU=' \
--header 'Content-Type: application/json' \
--data-raw '{
 "grant_type": "client_credentials",
"scopes": "qrcode_write,qrcode_read"
}

Response Example

{
  "access_token": "5eb50e6b-2bfc-3a44-b9ba-b9ba75256e7e",
  "token_type": "bearer",
  "expires_in": 86400
}

Access Token generation flow (via format x-www-form-urlencoded)

Fluxo de Integração QR Code

POST /v2/oauth/token (format url encoded)

Headers

Key Value
Authorization Basic + Base64
Content-Type application-json

Body

{
"grant_type": "client_credentials"
}

Request Example

curl --location --request POST 'https://api2.cielo.com.br/sandbox/v2/oauth/token' \
--header 'Authorization: Basic
dERxQUs0anFoSDg5dFdpUWM1ejY0REJKc2lJTFpLbzh4TG0zV0p3eHkwRkQ0Y2dZVm46
ZVZUVVZJZjFZWDJkOU40M0p4MVZwNGlWVXEzTzluTTR0TGF1UzhZYWo0V1JPcTJFSXU
=' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scopes=qrcode_write,qrcode_read'

Response Example

{
"access_token": "8d9529bd-3dcf-3130-82ea-d28712f96de2",
"token_type": "bearer",
"expires_in": 86400
}

API return codes

SUCCESS

Code Nome Description
200 Ok The request was successful for an API call, either GET or POST .
201 Created The create request was successful for an API call of type POST

EXCEPTIONS

Code Nome Description
400 Bad Request. * The request is not valid. One or more conditions in the request fields were not met
List of unmet conditions
401 Unauthorized API Consumer Authentication Failed
403 Forbbiden API consumer does not have access to certain features
409 Conflict Resubmission of the request with divergent information. (Ex: Request for payments with different CPF)
412 Precondition Failed 001: Expired key
002: Expected dynamic QRCode
422 Unprocessable Entity The request is valid, but it was not possible to process.
500 Internal Server Error Internal application error. Usually coming from infrastructure

Public key generation

The partner needs to call the API/publicKey to get the public key needed to send the card data in encrypted form.

Fluxo de Integração QR Code

Contract

GET /padraoq/v1/publicKey

Headers

Key Value
Authorization Bearer = access_token (generated by the Access Token API)

Request Example


curl --location --request GET 'https://api2.cielo.com.br/sandbox/padraoq/v1/publicKey' \
--header 'Authorization: Bearer 83247803-585d-379d-8ea4-19dfcf4c3f75'

Response Example


{
    "public_key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmH7eS0n6yQSylMDZnY3c/mbDUUEJfyslrilslJKpDRG3m2YaCZdtwo5LahEUWshhBc8jckRkCyqDVVfBJ7WQN1Z1hN0ifCK8mfnh/2SAYGc4e8qydcWT64AVQo+Kay201cRuHeCt1Iyuhi5tOxTF2satd40+8eMkqiVJdhJ0Sjc1ZRezFSo96XReiT8eYz/4Rhubq1BPISlNXqqls3NuPMCxY6IFOLmjTi3xEIdcYtUT5MCfXBG4Rz6rMNrQ7JRAfEOIdvcAt++ygV9ilUxtETn+OKKNDcEUKzXM3Taop8vFXD8HWKzfmlA/usxeKxiI6eTrcWCmrVMQ2Yvf4RSU4wIDAQAB",
    "key_id": "1b59934a-7eaa-4f90-a391-585de0ffc550",
    "expires_in": 35853
}

Cryptography

Example Java code to encrypt the card number using a public key:

import java.security.PublicKey;
import java.util.Base64;
import javax.crypto.Cipher;
public class EncriptCard {
    public String encript(PublicKey key, String cardNumber) {
        try {
            Cipher cipher = Cipher.getInstance("RSA");
            cipher.init(Cipher.ENCRYPT_MODE, key);
            byte[] encryptedBytes =
                cipher.doFinal(cardNumber.getBytes());
            String encryptedCard =
                Base64.getEncoder().encodeToString(encryptedBytes);
            return encryptedCard;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Payment flow

Fluxo de Integração QR Code

The POST /payment/card resource is responsible for making the payment based on the data contained in the requisition payload. In the request header it’s required to inform Authorization.

The request body consists of data from the application and the QR Code.

Note: it’s possible to generate test cards using the tool (https://namso-gen.com/), for this it’s only required to inform the first 6 digits of a valid card. Through the tool (https://8gwifi.org/RSAFunctionality?keysize=2048), it’s possible to simulate the encryption of the "card_data" made using the return obtained from GET / publicKeys.

Contract

POST /padraoq/v1/payment/card

Headers

Key Value
Authorization Bearer = access_token (generated by the Access Token API)
Content-Type application/json
{
   "key_id":"string",
   "card_data":"string",
   "payee_document":"string",
   "payee_name":"string",
   "authorization_token":"string",
   "qrcode":"string"
}
Property Description Type Required
key_id Identifier of the encryption key used to encrypt the card. Returned by the GET /publicKey resource String Yes
card_data Card data encrypted by the public key, See layout String Yes
payee_document CPF or CNPJ of the payer (user logged in the wallet) String Yes
payee_name Payer name (user logged into the wallet) String Yes
authorization_token User authorization token generated by the issuer (support debit payment) * for future use String Yes
qrcode QR Code string captured by the wallet String Yes

Request Example


curl --location --request POST 'https://api2.cielo.com.br/sandbox/padraoq/v1/payment/card' \
--header 'Authorization: Bearer 83247803-585d-379d-8ea4-19dfcf4c3f75' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key_id": "001",
    "card_data": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeiLngFr9h0npwe6D3ArSi10ZgdOCUCsUYT12KMuYsxImzwe9aGX8XXvzEF60E600ZjdvmYU64UnZKgfbttwNi+Tl7ZcB2cnS/oJMrfA0AbRHukJnL/fFsziHOjv0A1xRcE0ZbJRkob5A5s4GenF+jv/xCTOoIetFimZHZDiPPFux2NyrL3ZqSs7F4XJZvo2zPfCVlAcnEbVf+8vWX3goP2TEuAqZtBT543wIDAQAB+dqSzZSqZolYU1sjV7s8FzsjZYqo+AjM8BMuPlMoPEuBqgRFm4fSRIpeJIr0G9FokSU3X6MAZTC7n3YePHFsFmGxPTrKpEFrp8s28f1qMP5suTsA”,,
    "payee_document": "25617535811",
    "payee_name": ""Alexandre Marcelino",
    "authorization_token": null,
    "qr_code": ""00020101021226580014br.com.padraoq01160010000244470001020862000092030400015204030053039865406123.995802BR5909POSTO_ABC6010Barueri_SP62200516100023071641629281600014br.com.padaoq0112230120171643020400040302020402010502038204010063
041213""
}'

Response Example


{
  "reference_label": "230120171643",
  "merchant_id": "0020060049139200",
  "terminal_id": "62000092",
  "authorization_code": "031581",
  "authentication_code": "null",
  "host_nsu": "730025",
  "terminal_nsu": "730025",
  "timestamp": "160620143832",
  "card_scheme": "Master"
}

Layout - Card Data

Layout Card Data

Note: Encrypt all “cardData” tag information including the quotes “ { } “.

{
   "card_number":"4984XXXXXX4106",
   "card_cvv":"123",
   "card_holder_name":"Teste",
   "card_expiration_date":"0127"
}

Payment success codes

Code Name Description
200 Ok The request was successful for an API call, either GET or POST .

Payment error codes

Error Code Error Description
422 001 The product was not found Business error regarding problems with the reported product
422 002 Invalid QRCode Business error regarding problems in QRCode data sent
422 003 QRCode expired Business error regarding QRCode expiration time
422 004 Invalid Card Data Business error referring to problems with the card data entered
422 005 We do not accept payments with the registered card Business error regarding the acceptance of the registered card
422 006 Error in authorizer Business error returned from issuer authorizer
422 007 Generic Error Other Business Mistakes

API to parse the QR Code (optional use))

Fluxo Parsed QR Code

Contract

GET /padraoq/v1/parsedQRCode

Headers

Key Value
Authorization Bearer = access_token (generated by the Access Token API)
Content-Type application/json

Parameter:

qrcode:"00020101021226580014br.com.padraoq011600100002444700010208620000920304000152040
30053039865406123.995802BR5909POSTO_ABC6010Barueri_SP622005161000230716416292816000
14br.com.padraoq0112230120171643020400040302020402010502038204010063041213"


body:

<body empty>

Response


{
   "qrcode_data":{
      "payload_format_indicator":"01",
      "point_of_initiation_method":"12",
      "merchant_account_information":{
         "gui":"br.com.padraoq",
         "id_merchant":"1234567890123456",
         "id_terminal":"12345678",
         "id_credenciador":"1234",
         "instituicao":"12345678",
         "tipo_de_conta":"1234",
         "agencia":"12345678",
         "conta":"12345678901234567890"
      },
      "merchant_category_code":"0000",
      "transaction_currency":"986",
      "transaction_amount":"01.00",
      "country_code":"BR",
      "merchant_name":"Q Café",
      "merchant_city":"Brasilia",
      "additional_data_field":{
         "reference_label":"reference label"
      },
      "crc16":"AC05",
      "unreserved_templates":{
         "gui":"br.gov.bcb.spi",
         "url_uri":"https://br.gov.bcb.spi/"
      },
      "payment_information":{
         "gui":"br.com.padraoq",
         "timestamp":"010220120001",
         "modalidade":"0400",
         "parcelas":"01",
         "tipo_de_transacao":"01",
         "fonte_de_dados_do_pagamento":"03",
         "campo_livre":"1234567890"
      }
   }
}

QR CODETM POS GENERATED LAYOUT (NEW BR CODE +ELO MODEL)

The data used to generate the QRCode for reading in the digital wallet must follow as a basis the specification “EMVCo-Merchant-Presented-QR-Specification-v1” using the data below:

Type Description
N Numeric - Values represented by digits from “0” to “9”
ANS Special Alphanumeric - Special alphanumeric values contain (96) characters in total, including numbers and punctuation.
ID Field name Size Type Description
00 Payload Format Indicator 02 N QR Code data version used in code generation. Fixed “01”.
01 Point of Initiation Method 02 N Identifier of the generated QR Code method: Fixed “12” – Dynamic QR Code.
26 Merchant Account Information Up to 76 ANS Establishment Information
26 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”.
26 01 - Merchant Account Information 16 N Commercial Establishment Number..
26 02 - Logic Number 08 N Terminal Logical Number.
26 03 - ID Accreditor 04 N Accreditor identification. Fixed “0001”.
26 04 - CPF/CNPJ Up 14 N CPF or CNPJ number of the EC.
27 ELO - Merchant Account Information Up 99 ANS Merchant Information
OBS: Although this is ELO-specific data, it must be present in all QRCode transactions “BR Code V3 Aliança + Elo”.
27 00 - Globally Unique Identifier 10 ANS Global identifier: use fixed “BR.COM.ELO”.
27 01 - Acquirer ID 04 up 07 ANS Accreditor Code assigned by Elo.
In case Cielo uses the fixed value “8384”.
27 02 - Merchan Identification Number 15 N Commercial Establishment Number: use only the last 15 digits.
27 03 - Terminal ID 08 ANS Terminal Logical Number.
27 04 - Terminal Device Type 01 ANS Device/environment type displaying the QR Code:
“A” – ATM
“C” – Mobile (Mobile)
“E” – E-commerce

“M” – POS Mobile
“P” – Standard POS
“T” – TEF
52 Merchant Category Code 04 N Establishment’s branch of activity (MCC).
53 Transaction Currency 03 N Currency source code.
54 Transaction Amount Up 13 ANS Transaction amount. Ex.: “123.99”
58 Country Code 02 ANS Country code: Fixed “BR”.
59 Merchant Name Up 25 ANS Business Name of the Establishment.
60 Merchant City Até 15 ANS City of Establishment.
61 Postal Code 08 N Terminal location zip code taken from Bit 63 subfield 25 of initialization. For the Brazilian ZIP code format, use 8 digits, no hyphen.
62 Additional Data Field Up 29 ANS Additional Data Field
62 05 - Reference Label Up 25 ANS QR Code identification. Unique transaction code, extracted from BIT 31..
81 Transaction informations Up 99 ANS Transaction information
81 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”.
81 01 - Transaction Date 12 N Transaction date and time (DDMMYYHHmmss).
81 02 - Modality 04 H Fixed codes in hex for the Matrix and Secondary product flows:
Debit on demand (Flow 08): 0001Credit on demand (Flow 04): 0002
Store installment credit (Flow 06) : 0004
ADM Installment Credit (Flow 05): 0008
Voucher (Flow 13): 0010
Fleets (Flow 32): 0020
Pre -Authorization (Flow 07): 0040
Crediário Simulation (Flow 11): 0200
Crediário Hiring (Flow 43): 0400
Other: 0000
81 03 - Payment Installments 02 N Number of installments.
81 04 - Transaction Type 02 N Transaction Type:
“01” – Sale;
“02” – Cancellation.
81 05 - Payment Data Source 02 N Fixed:”03” - QR Code
81 06 - NOriginal Transaction NSU Up 12 N NSU of current transaction
81 50 - RUF Up 19 ANS RUF
82 Unreserved Templates – Elo Transaction Detail 56 Up 88 ANS ELO - Transaction information
OBS: Although this is ELO-specific data, it must be present in all QRCode transactions “BR Code V3 Aliança + Elo”
82 00 - Globally Unique Identifier 10 ANS Shared global QR code identifier: fixed value equal to “BR.COM.ELO”.
82 01 - Transaction Date 10 N Transaction date and time(MMDDHHmmss).
82 02 - Product Type & Installments 03 ANS Position [1]
Product of the transaction:
“C” – Credit – Flows: 04, 06, 05, 11 and 43
“D” – Debit – Flow : 08
“V” – Voucher – Flow: 13 and 32
“O” – Others – Other unforeseen flows.
Position [2,3]

Amount of parcels. For spot transactions, the field must be sent with the value equal to “00”.
82 03 - Transaction Type 02 N Transaction Type:
“01” – Purchase
“02” – Cancellation
“03” – Purchase with Withdrawal
“04” – Withdrawal
82 04 - Transaction ID 06 N NSU of the current transaction..
82 05- Original Transaction ID 06 N Unique identifier of the original Transaction that will be canceled (Transaction ID field of the QR Code used in the original transaction).
Must be presented in the QR Code used to initiate cancellation transactions.
NOTE: Include only this field if it is a cancellation transaction..
82 06 - Original Transaction Date 04 N Date of the original transaction, which will be canceled, in MMDD format.
Must be sent for cancellation transactions
NOTE: Only include this field if it is a cancellation transaction.
82 07 - Original Transaction Terminal ID 08 ANS Terminal Logical Number.
Identification of the merchant’s terminal used in the original transaction.
Must be sent for cancellation transactions.
NOTE: Only include this field if it is a cancellation transaction.
82 08 - Elo QR Code Version Up 03 N Identification of the QR Code Link version used in the transaction. For this document, use the value equal to “3”.
63 CRC16 04 ANS Calculated checksum of QR Code data (See Documentation “EMV-QRCode” and “ISO13239).

Ex.:

Data:

00020101021226760014br.com.padraoq0116123456789012000102082009130003040001041 40306501400093927580010BR.COM.ELO010483840215234567890120001030820091300040 1P520400005303986540525.005802BR5905CIELO6014SANTOANDRE SP61080600000062200516040310245460330981740014br.com.padraoq01120203211002180 20400020302010402010502030606069646500082560010BR.COM.ELO011003021002180203 C0003020104060696460801363044847

QRCODE:

QRCodePOS

QR CODETM POS GENERATED LAYOUT (NEW BR CODE MODEL)

The data used to generate the QRCode for reading in the digital wallet must follow the specification “EMVCo-Merchant-Presented-QR-Specification-v1” using the data below:

Type Description
N Numeric - Values represented by digits from “0” to “9”
ANS Special Alphanumeric - Special alphanumeric values contain (96) characters in total, including numbers and punctuation.
ID Nome do Campo Tam Tipo Descrição
00 Payload Format Indicator 02 N QR Code data version used in code generation. Fixed “01”.
01 Point of Initiation Method 02 N Identifier of the generated QR Code method: Fixed “12” – Dynamic QR Code.
26 Merchant Account Information Up 76 ANS Establishment Information
26 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”.
26 01 - Merchant Account Information 16 N Commercial Establishment Number.
26 02 - Logic Number 08 N Terminal Logical Number.
26 03 - ID Accreditor 04 N Accreditor identification. Fixed “0001.
26 04 - CPF/CNPJ Up 14 N CPF/CNPJ number of the merchant
52 Merchant Category Code 04 N Establishment’s branch of activity (MCC).
53 Transaction Currency 03 N Currency source code.
54 Transaction Amount Up 13 ANS Transaction amount.
Ex: “123.99”
58 Country Code 02 ANS Country code: Fixed “BR”.
59 Merchant Name Up 25 ANS Business Name of the Establishment.
60 Merchant City Up 15 ANS City of Establishment.
62 Additional Data Field Up 29 ANS Additional Data Field
62 05- Reference Label Up 25 ANS QR Code identification.
Unique code of the transaction, taken from BIT 31.
81 Transaction informations Up 99 ANS Transaction information
81 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”.
81 01 - Transaction Date 12 N Transaction date and time (DDMMYYHHmmss).
81 02 - Main Product 04 N Matrix product code.
81 03 - Payment Installments 02 N Number of installments.
81 04 - Transaction Type 02 N Transaction Type:
“01” – Sale;
“02” – Cancellation.
81 05 - Payment Data Source 02 N Fixed: “03” - QR Code
81 06 - NSU Host Original Up 12 N NSU of the original transaction
81 50 - Campo livre/RUF Up 19 ANS Free Usage Field (RUF)
63 CRC16 04 ANS Calculated checksum of QR Code data (See Documentation “EMV-QRCode” and “ISO13239”).

Ex:

DATA:

00020101021226760014br.com.padraoq0116001000024447000102086200009203040001041 4010270580001915204030053039865406123.995802BR5909POSTO_ABC6010Barueri_SP6220 0516100023071641629281720014br.com.padraoq011223012017164302040004030202040201 05020306020050020063040CE6

QR CODE:

QRCodePOS

Map TAGs generated in a transaction via QRCode:

00020101021226760014br.com.padraoq0116001000024447000102086200009203040001041 4010270580001915204030053039865406123.995802BR5909POSTO_ABC6010Barueri_SP6220 0516100023071641629281720014br.com.padraoq011223012017164302040004030202040201 05020306020050020063040CE6

ID Field name Size Type Description Parse
00 Payload Format Indicator 02 N QR Code data version used in code generation. Fixed “01”. 01
01 Point of Initiation Method 02 N Identifier of the generated QR Code method: Fixed “12” – Dynamic QR Code. 12
26 Merchant Account Information 76 ANS Establishment Information    
26 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”. br.com.padraoq
26 01 - MerchantAccount Information 16 N Number of the Commercial Establishment. 0010000244470001
26 02 - Logic Number 08 N Terminal Logical Number. 62000092
26 03 - ID Credenciador 04 N Accreditor identification. Fixed “0001”. 0001
26 04 - CPF/CNPJ Até 14 N CPF/CNPJ number of the merchant 01027058000191
52 Merchant Category Code 04 N Establishment’s branch of activity (MCC). 0300
53 Transaction Currency 03 N Currency source code. 986
54 Transaction Amount Até 13 ANS Transaction amount. Ex: “123.99” 123.99
58 Country Code 02 ANS Country code: Fixed “BR”. BR
59 Merchant Name Up 25 ANS Business Name of the Establishment. POSTO_ABC
60 Merchant City Up 15 ANS City of Establishment. Barueri_SP
62 Additional Data Field Up 29 ANS Additional Data Field  
62 05 - Reference Label Up 25 ANS QR Code identification. Unique transaction code, extracted from BIT 31. 1000230716416292
81 Transaction informations Up 99(72 in this example ANS Transaction information  
81 00 - Globally Unique Identifier 14 ANS Global identifier: use fixed “br.com.padraoq”. br.com.padraoq
81 01 - Transaction Date 12 N Transaction date and time (DDMMYYHHmmss). 230120171643
81 02 - Main Product 04 N Matrix product code.. 0004
81 03 - Payment Installments 02 N Number of installments. 02
81 04 - Transaction Type 02 N Transaction type: “01” – Sale;
“02” – Cancellation.
01
81 05 - Payment Data Source 02 N Fixed:”03” - QR Code 03
81 06 - NSU Host Original Up 12 N NSU of the original transaction 00
81 50 - Free Field/RUF Up 19 ANS Free field of use (RUF) 00
82 RUF Up 99 ANS RUF  
82 01 - RUF Up 95 ANS RUF  
63 CRC16 04 ANS Calculated checksum of QR Code data (See Documentation “EMV-QRCode” and “ISO13239”). 8F04

QR CODETM POS GENERATED LAYOUT (OLD MODEL)

The data used to generate the QRCode for reading in the digital wallet must follow as a basis the specification “EMVCo-Merchant-Presented-QR-Specification-v1” using the data below:

Type Description
N Numeric - Value represented by digits 0 from 9
ANS Alphanumeric - contain 96 characters including numbers and accents
ID Field name Size Type Description
00 Payload format indicator 02 N QR Code data version used at code generation. Fixe”01”
01 Point of initiation Method 02 N QR Code method identifier: Fixed “12” Dynamic QR Code
26 Merchant Account Information up to 56 ANS Merchant information
26 00 - Globaly Unique identifier up to 32 ANS Global identifier. Fixed “Cielo”
26 01 - Merchant Account information 16 N Merchant number
26 02 - Logic Number 08 N Terminal Logical Number
52 Merchant Category Code 04 N Merchant Category Code (MCC)
53 Transaction Currency 03 N Transaction Currency
54 Transaction Amount 12 N Transaction Amount
58 Contry Code 02 ANS Country Code. Fixed “BR”
59 Merchant Name up to 25 ANS Merchant Name
59 Merchant City up to 15 ANS Merchant City
80 Transaction Informations up to 120 ANS Transaction Information
80 00 - Globally Unique Identifier up to 80 ANS Global Identifier: Use the fixed URL, including (“”):”https://www.cielo.com.br/qrcode”
80 01 - Transaction ID 16 ANS Unique transaction code
80 02 - Transaction Date 12 N Transaction’s date and time (DDMMYYHHmmss)
80 03 - Main Product 04 N Main Product
80 04 - Sub Product 04 N Sub Product
80 05 - Payment Installments 02 N Payment Installments
80 06 - Transaction Type 02 N Type of transaction:
“01” - Payment Request
“02” - Cancellation request
63 CRC 04 ANS Calculated checksum of QrCode data (see documentation”EMV-QrCode” and “ISO13239”)

00020101021226410005Cielo011600100002444720100208201000015204591 2530398654120000000010005802765923CIA BRAS MEIO PAGAMENTO6009SAO PAULO801010033”https://www.cielo.com.br/qrcode”01161209676128919 232021210041809451203041000040400010502010602016304**A177**

QRCodePOS

ID Field name Size Type Description Parse
00 Payload Format Indicator 02 N QR Code version fixed value “01” 01
01 Point of Initiation Method 02 N QR Code Method Identifier: Fixed “12” – Dynamic QR Code 12
26 Merchant Account Information Up to 56 ANS Property Information  
26 00 - Globally Unique Identifier Up to 32 ANS Global identifier: fixed value “Cielo” Cielo
26 01 - Merchant Account Information 16 N Establishment number 0010000244472010
26 02 - Logic Number 08 N terminal number 20100001
52 Merchant Category Code 04 N MCC 5912
53 Transaction Currency 03 N Currency code 986
54 Transaction Amount 12 N Transaction amount 000000001000
58 Country Code 02 ANS Country Code. Fixed “BR” 76
59 Merchant Name Up to 25 ANS Name of the establishment CIA BRAS MEIO PAGAMENTO
60 Merchant City Up to 15 ANS City of establishment SAO PAULO
80 Transaction informations Up to 120 ANS Transaction information  
80 00 - Globally Unique Identifier Up to 80 ANS Global identification url:fixed:: “https://www.cielo.com.br/qr_code” “https://www.cieloid.com.br/qr_code”
80 01 - Transaction ID 16 N Unique transaction code 12096761
28919232
80 02 - Transaction Date 12 N Transaction date (DDMMYYHHmmss) 100418094512
80 03 - Main Product 04 N PMain product 1000
80 04 - Sub Product 04 N Secondary product 0001
80 05 - Payment Installments 02 N Number of installments 01
80 06 - Transaction Type 02 N Transaction Type:
“01” – Payment
“02” – Cancellation
01
63 CRC 04 ANS QR Code string checksum A177

CALLBACK API FOR UNDO (optional use)

There is a call-back API to inform the wallet of a defect

The partner needs to develop an API to receive the undo information following the format below and providing the url to send the information:

Body:


{
"transactionDate": "string",
"terminalLogicalNumber": "string",
"authorizationCode": “string",
"nsu": "string",
“merchantId“: 0,
“amount“: 0,
“originalTransactionType”: 0,
“statusCode“: 0
}

API request (example):


{
"transactionDate": "2018-10-29T14:35:12.000+0000",
"terminalLogicalNumber": "78257509",
"authorizationCode": "019387",
"nsu": "572061",
“merchantId“: 1000000000,
“amount“: 82.90,
“originalTransactionType”: 1,
“statusCode“: 3
}