Payment with two cards confirmation service
After creating and authorizing a two cards payment pending confirmation, the merchant must call the two cards payment confirmation service to confirm or undo the payment using the same NIT obtained on the first step of the flow.
#
FlowThe two cards payment confirmation flow has two differences when compared to the traditional confirmation.
The first difference is that there will be two transactions related to a single operation and each one of them is used to confirm the payment of one of the chosen payment methods.
The second difference is that two cards payment confirmation response is composed by each transaction response. It means that each of the transactions' responses can affect the results of the other one.
We will cover the Carat Portal predicted scenarios below.
#
Successful confirmation#
First confirmation failsWhen the first confirmation fails, the second transaction will be undone. An issue will be registered and the merchant may contact Carat Portal's support team if they find it necessary.
#
Response example#
Second confirmation failsWhen the second confirmation fails, the first transaction will be already confirmed. Therefore, it must be manually cancelled if the merchant finds it necessary by using either the REST cancellation call or the Merchant Web Page. An issue will be registered and the merchant may contact Carat Portal's support team if they find it necessary.
#
Response example#
Call details- Resource:
/v1/payments/multiple/{nit}
- HTTP Method:
PUT
- Request format:
query string
- Response format:
JSON
- Header parameters:
Parameter | Description | Format | Mandatory |
---|---|---|---|
merchant_id | Merchant code on Carat Portal. The production and certification codes will be different. | < 15 AN | YES |
merchant_key | Merchant authentication key on Carat Portal. The production and certification keys will be different. | < 80 AN | YES |
#
ExamplesBelow is an example of the two cards payment confirmation service call using the cURL tool.
Requisição:
To use this example, don't forget to define the variable {{url}}
with the value
esitef-homologacao.softwareexpress.com.br
Resposta:
Response codes
See reference on API codes - response codes
#
Request parametersThe table below describes the request parameters of the payment with two cards confirmation service:
Parameter | Description | Format | Mandatory |
---|---|---|---|
confirm | This field must be sent with the value true if you want to confirm the transaction, or false , if you want to undo it. | < 5 T/F | YES |
#
Response parametersIf successful, the HTTP response code will be 200
. Any other code must be interpreted as an error. The table below describes the response parameters of the payment confirmation service:
Parameter | Description | Format |
---|---|---|
code | Two cards payment operation Carat Portal response code. Any code different from 0 means failure. [Learn more.](/en/docs/e-sitef/codigos-da-api#response-codes | < 4 N |
message | Two cards payment operation Carat Portal response message. | < 500 AN |
confirmations[] | ||
code | Carat Portal response code for this payment method. Any code different from 0 means failure. Learn more.. | < 4 N |
message | Carat Portal response message for this payment method. | < 500 AN |
payment | ||
status | Status of the payment transaction on Carat Portal. Learn more. | = 3 AN |
authorizer_code | Authorizer response code. This field is not returned if this is not the first call to the operation. | < 10 AN |
authorizer_message | Authorizer response message. This field is not returned if this is not the first call to the operation. | < 500 AN |
acquirer_id | Code of the acquirer used on the transaction. This field is not returned if this is not the first call to the operation. | < 4 N |