Payment transactions

In this section, you will find all the technical specifications of the IDPay product REST APIs for managing payment transactions.


Before you begin


Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.

You can learn more about how to generate an access token here.

Transaction creation


The orderNumber field must be filled with the UNIQUE order number of that purchase in the e-commerce system, and using a distinct transactional ID is incorrect.

It is important to pay attention to this field, as it may negatively impact the user experience in the final flow, causing issues with product usage.

Possible impacts include:

  • Low Conversion:

    • The order number is used to help the end user complete the flow.

  • API Errors:

    • You might encounter errors such as "replicated transaction" if the same order number, BIN, and last4 digits are used.

Note: If the company is configured to reuse transactions with the same data, please refer to the "Transaction Reuse" section.

If the validations determine that biometric capture is not required, the response will have a different status, and a capture link will not be generated, as shown below:

{
    "id": "6ab1771e-dfab-4e47-8316-2452268e5481",
    "status": "fast-inconclusive"
}

This scenario will occur if you use the Pre or Super Pre modules, for cases where you use IDPay in the Checkout, as specified in the Features section.

Reuse of Transactions


It is possible to configure the company to reuse transactions that have the same data, avoiding "replicated transaction" errors. The reuse will occur under the following conditions:

  • A transaction is being created with the same orderNumber, identity.key, identity.value, company, card.binDigits, card.lastDigits, and value of a previously created transaction.

  • The previous transaction has not yet exceeded the expiration time configured for the company.

If the transaction to be created and the previous transaction do not meet these conditions, a new transaction will be created. Otherwise, the following are the possible responses:

If the previous transaction is in a final status, such as approved or inconclusive:

{
    // previous transaction information
    "id": "6ab1771e-dfab-4e47-8316-2452268e5481",
    "status": "approved"
}

If the previous transaction is still in an initial status, such as waiting or shared:

{
    // previous transaction information
    "id": "6ab1771e-dfab-4e47-8316-2452268e5481",
    "status": "waiting",
    "link": "https://aces.so/teste",
    "token": "eyJhbGciOiJIUzI1NiIsIn[...]dQssw5c"
}

In this last case, the transaction still in an initial status will have its expiration date recalculated, based on the date of this request.

Transaction status query


To see all possible statuses, refer to the Enumerated section.

To optimize the performance of your application, you can also implement our Webhook to know when to check the transaction status. See more in the Webhook section.

Obtaining the set of evidence for the transaction


The evidence set can only be generated for approved transactions.

The link returned for the evidence set is valid for five minutes after it is obtained. Therefore, it is important that this link is not saved, but rather used to download the evidence set.

Resending the transaction notification


It is also possible to configure the resending of notifications through the portal, without the need to implement it via API. To understand the possibilities, speak with the person responsible for your project.

Transaction cancellation


For a transaction to be canceled, it must be in the initial status (waiting).

To see all possible statuses, refer to the Enumerated section.


Still need help?

Didn't find something or still need help? If you're already a client or partner, you can reach out through our Help Center.

Last updated

Copyright © 2024 unico. All rights reserved.