Payment with multiple payment methods confirmation service
After creating and authorizing a multiple payment methods payment pending confirmation, the merchant must call the multiple payment methods payment confirmation service to confirm or undo the payment using the same NIT obtained on the first step of the flow.
Flow
The multiple payment methods 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 multiple payment methods 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 e-SiTef predicted scenarios below.
Successful confirmation
First confirmation fails
When the first confirmation fails, the second transaction will be undone. An issue will be registered and the merchant may contact e-SiTef's support team if they find it necessary.
Response example
{
"code": "1013",
"message": "Error processing multiple payment methods",
"confirmations": [
{
"code": "259",
"message": "Denied transaction",
"payment": {
"authorizer_code": "409",
"authorizer_message": "Brand / card type is invalid or not supported [Cód.: 5996]",
"status": "PPC",
"acquirer_id": "414"
}
},
{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "200",
"authorizer_message": "Function performed error-free [Cód.: 00]",
"status": "PPN",
"acquirer_id": "414"
}
}
]
}
Second confirmation fails
When 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 e-SiTef's support team if they find it necessary.
Response example
{
"code": "1013",
"message": "Error processing multiple payment methods",
"confirmations": [
{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "200",
"authorizer_message": "Function performed error-free [Cód.: 00]",
"status": "CON",
"acquirer_id": "414"
}
},
{
"code": "259",
"message": "Denied transaction",
"payment": {
"authorizer_code": "409",
"authorizer_message": "Brand / card type is invalid or not supported [Cód.: 5996]",
"status": "PPC",
"acquirer_id": "414"
}
}
]
}
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 e-SiTef. The production and certification codes will be different. | < 15 AN | YES |
merchant_key | Merchant authentication key on e-SiTef. The production and certification keys will be different. | < 80 AN | YES |
Examples
Below is an example of the multiple payment methods payment confirmation service call using the cURL tool.
Requisição:
curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/payments/multiple/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr?confirm=true"
--header "merchant_id:xxxxxxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--verbose
Resposta:
{
"code": "0",
"message": "OK. Transaction successful.",
"confirmations": [
{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "130",
"status": "CON",
"acquirer_id": "5"
}
},
{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "130",
"status": "CON",
"acquirer_id": "5"
}
}
]
}
Request parameters
The table below describes the request parameters of the payment with multiple payment methods 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 parameters
If 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 | Multiple payment methods operation e-SiTef response code. Any code different from 0 means failure. [Learn more.](/api/docs/ing/codigos-da-api#response-codes | < 4 N |
message | Multiple payment methods operation e-SiTef response message. | < 500 AN |
confirmations[] | ||
code | e-SiTef response code for this payment method. Any code different from 0 means failure. Learn more.. | < 4 N |
message | e-SiTef response message for this payment method. | < 500 AN |
payment | ||
status | Status of the payment transaction on e-SiTef. 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 |