Transactions

There are two kinds of transaction events:

Event
Description

transaction/categorized

Duopen has successfully received and categorized a transaction.

transaction/deleted

A previously categorized transaction was canceled.

Request Body

Transaction related requests can have the following parameters in the request body:

  • type: event type (transaction/categorized, transaction/deleted)

  • document: Document (CPF) of who made the purchase. Always sent as digits only.

  • establishmentName: Name of the establishment where the transaction happened.

  • establishmentDocument: Document (CNPJ) of the establishment where the transaction happened. Always sent as digits only.

  • location: For shopping administrators, this refers to the exact shopping mall where the transaction was made.

  • amount: Transaction amount.

  • date: Transaction date.

  • inInstallments: Boolean value that indicates if a transaction was made in installments or not.

  • transactionId: A transaction identifier following the UUID-v7 format.

Here are examples of possible events:

{
  "status": "Data sent successfully",
  "data": {
    "type": "transaction/categorized",
    "document": "12345678901",
    "establishmentName": "Loja XYZ",
    "establishmentDocument": "49731778000160",
    "location": "SHOPPING XYZ",
    "amount": "100.0",
    "date": "2024-07-10T19:51:00.000-03:00",
    "inInstallments": false,
    "transactionId": "0190b81b-11d5-7b70-b7eb-598445102d7e"
  }
}

Transactions in Installments

transaction/categorized events have a inInstallments field that indicates if a transaction was made in installments or not.

For transactions in installments, the amount field will be equal to the total value of the purchase. In addition, all other installments of the purchase will not be sent.

A purchase of 300 reais made in 3 installments of 100 reais, for example, will fire a single transaction/categorized event with the amount field having the value of 300.0.

Last updated