Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Response Example

{
"version": 1,
"sale": {
"increase": 0,
"discount": 0,
"total": 0,
"header": null,
"payments": [],
"paymentChange": null,
"solidaryChange": null,
"items": [],
"discountCodes": [],
"messages": {
"customer": [ {
{
"text""text": "Ganhou 1000 pontos nessa compra\r\n"
}
],
"user": [ {
{
"text": "Ganhou 100 pontos nessa compra\r\n"
}
}]
},
"vouchersPrint": [
]{
"text": " },
"vouchersPrint": [ {
"text": " CUPOM CUPOM DESCONTO 1\r\n\r\n Cupom de 5% de desconto para \r\npróxima\r\ncompra, aplicado para todos os \r\nprodutos.\r\n\r\n[ImpBarra]1234567890\r\n[ImpFimBarra]\r\n"
},
{
},
"text": " CUPOM {
"text": " CUPOM DESCONTO 2DESCONTO 2\r\n\r\n Cupom de 10% de desconto para \r\npróxima\r\ncompra, aplicado para todos os \r\nprodutos.\r\n\r\n[ImpBarra]1234567890\r\n[ImpFimBarra]\r\n"
}
],
}"partitionIncrease": [],
"partitionDiscount": [
],{
"partitionIncreaseprice": []0,
"partitionDiscountpartnerCode": [ {0,
"promotionCode": 511,
"pricediscountAmount": 0,
}
]
},
"pay": {
"total": 4.49,
"discount": 0,
"partnerCodeincrease": 0,
"paymentNumber": 29,
"authorizationCode": "FD455FKL34SS1100AXV",
"idWallet": "123456",
"typeWallet": "1",
"installmentAmount": 1,
"promotionCodetransactionCode": 511"000080014",
"networkCard": "00125",
"flagCard": "00002",
"vouchersPrint": [
{
"discountAmounttext": 0
" RECEBO PAGAMENTO, CONVENIO: \r\n\r\n N. 100, Vlr. Compra: 99,99\r\n"
},
{
"text": " RECEBO }
PAGAMENTO, CONVENIO: \r\n\r\n N. 100, Vlr. ]
},
"pay": {
"total": 4.49,
"discount": 0,
"increase": 0,
"paymentNumber": 29,
"authorizationCode": "FD455FKL34SS1100AXV",
"idWallet": "123456",
"typeWallet": "1",
"installmentAmount": 1,
"transactionCode": "000080014",
"networkCard": "00125",
"flagCard": "00002",
"vouchersPrint": [ {
"text": " RECEBO PAGAMENTO, CONVENIO: \r\n\r\n N. 100, Vlr. Compra: 99,99\r\n"
},
{
"text": " RECEBO PAGAMENTO, CONVENIO: \r\n\r\n N. 100, Vlr. Compra: 99,99\r\n"
}
],
"identification": {
"document": "11263629059",
"partnerCode": 0,
"documentType": "cdtCPF"
}
},
"return": {
"code": 0
},
"execution": "cetContinue",
"interpret": {
"commandType": "cctGetValue",
"messageCommand": null,
"options": null,
"value": {
"title": "Leitura de codigo",
"subtitle": "Teste Pagamento",Compra: 99,99\r\n"
}
],
"identification": {
"defaultValuedocument": "123456789012345678911263629059",
"partnerCode": 0,
"documentType": "cdtCPF"
}
},
"dataTypereturn": "cvtQRCode",{
"code": 0
},
"execution": "cetContinue",
"interpret": {
"commandType": "cctGetValue",
"messageCommand": null,
"sizeoptions": 0null,
"value": {
"title": "Leitura de codigo",
"documentTypessubtitle": []
"Teste Pagamento",
"defaultValue": "1234567890123456789",
"dataType": "cvtQRCode",
"size": 0,
}
"documentTypes": []
}
},
"vouchersPrint": []
}

Exemplo Fluxo de Pagamento

...

JSON enviado para o parceiro

{
  "Event": "cetBefore",
  "Execution": "cetContinue",
  "ID": "001600000591145",
  56"Operation": "cotSalePayment",
  "Pay"{
     "Discount": 0,
     "Increase": 0,
     "PaymentNumber": 1,
     "Total": 4.99
   },
  "Sale"{
     "Discount": 0,
     "Header"{
        "AccountingDate": "2020-03-10T00 00 00",
        "DateTimeIssue": "2020-03-10T16 57 34",
        "IdDocument": 591145,
        "IdStore": 1,
        "IdTerminal": 600,
        "IdUser": 2,
        "Status"": sttValid"
      },
     "ID": "001600000591145",
     "Increase": 0,
     "Items"[
        {
         "BarCode": "7891000100103",
         "CaptionPacking": "UN",
         "Description": "MOCA",
         "DiscountAmount": 0,
         "DiscountPrice": 0,
         "IncreasePrice": 0,
         "InternalCode": "4900",
         "ItemNumber": 1,
         "PackingQuantity": 1,
         "Quantity": 1,
         "Status": "sttValid",
         "TotalPrice": 4.99,
         "UnitPrice": 4.99
        }
      ],
     "Total": 4.99
   },
  "Version": 1
}

O parceiro retorna informando que é necessário obter um valor do QRCode. Após a leitura e confirmação do QRCode, o pagamento é finalizado.

...

JSON enviado para o parceiro

{
  "version": 1,
  "sale"{
     "increase": 0,
     "discount": 0.1,
     "total": 0,
     "items"[
        {
         "itemNumber": 1,
         "unitPrice": 0,
         "increasePrice": 0,
         "packingQuantity": 0,
         "quantity": 0,
         "totalPrice": 0,
         "discountPrice": 0.0499,
         "status": "sttValid",
         "partitionDiscount"[
             {
              "discountAmount": 1,
              "price": 0.0499,
              "partnerCode": 0,
              "promotionCode": 193
            }
          ]
       }
     ],
    "partitionDiscount"[
       {
         "discountAmount": 1,
         "price": 0.1,
         "partnerCode": 0,
         "promotionCode": 949
       }
     ]
   },
  "pay"{
     "total": 4.99,
     "discount": 0,
     "increase": 0,
     "paymentNumber": 1,
     "authorizationCode": "FD455FKL34SS1100AXV",
     "vouchersPrint"[
        {
         "text": " RECEBO PAGAMENTO, CONVENIO \r\n\r\n N. 100, Vlr. Compra 4.99\r\n"
        },
        {
         "text": " RECEBO PAGAMENTO, CONVENIO \r\n\r\n N. 100, Vlr. Compra 4.99\r\n"
        }
      ],
     "identifcation"{
        "document": "11263629059",
        "partnerCode": 0,
        "documentType": "cdtCPF"
      }
   },
  "return"{
     "code": 0
   },
  "execution": "cetContinue",
  "interpret"{
     "commandType": "cctGetValue",
     "value"{
       "title": "Leitura de codigo",
       "subtitle": "Teste Pagamento",
       "defaultValue": "4E639435-32FB-4386-8777-06E458EFCF8F",
       "dataType": "cvtQRCode",
       "size": 4000
      }
   }
}

Comprovante impresso no final da venda.

...