Payment effectuation service

After consuming the transaction creation service and obtaining a NIT, it's possible to proceed to the next step of the flow: calling the payment effectuation service. This operation must also be consumed on payment with schedule flows. In this case, Carat Portal assures that the schedule will only be activated if the payment is confirmed.

Call details#

  • Resource: /v1/payments/{nit}
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on Carat Portal. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on Carat Portal. The production and certification keys will be different.< 80 ANYES
Content-TypeIt must be sent with the value application/json.= 15 ANYES

Examples#

Below are some examples of the payment effectuation service call using the cURL tool.

Payment with automatic confirmation#

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/payments/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"card":{
"number":"5555555555555555",
"expiry_date":"1222",
"security_code":"123"
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao OK",
"status": "CON",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "13034649671",
"customer_receipt": "====CUPOM COMPRADOR====",
"merchant_receipt": "====CUPOM ESTABELECIMENTO====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/07/2017T15:52",
"authorization_number": "132030",
"merchant_usn": "13034649671",
"esitef_usn": "170713097340300",
"sitef_usn": "132030",
"host_usn": "999132030",
"payment_date": "13/07/2017T15:52",
"amount": "1000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005"
}
}

Payment with late confirmation#

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/payments/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"card":{
"number":"5555555555555555",
"expiry_date":"1222",
"security_code":"123"
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao OK",
"status": "PPC",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "13035748930",
"customer_receipt": "==== CUPOM COMPRADOR ====",
"merchant_receipt": "==== CUPOM ESTABELECIMENTO ====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/07/2017T15:58",
"authorization_number": "132031",
"merchant_usn": "13035748930",
"esitef_usn": "170713097340340",
"sitef_usn": "132031",
"host_usn": "999132031 ",
"payment_date": "13/07/2017T15:58",
"amount": "1000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005"
}
}

Payment with schedule#

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/payments/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"card":{
"number":"5555555555555555",
"expiry_date":"1222",
"security_code":"123"
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao OK",
"status": "CON",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "13040222890",
"customer_receipt": "==== CUPOM COMPRADOR ====",
"merchant_receipt": "==== CUPOM ESTABELECIMENTO ====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/07/2017T16:03",
"authorization_number": "132032",
"merchant_usn": "13040222890",
"esitef_usn": "170713097340360",
"sitef_usn": "132032",
"host_usn": "999132032 ",
"payment_date": "13/07/2017T16:03",
"amount": "1000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005"
},
"schedule": {
"status": "ATV",
"sid": "qwertyuiopasdfghjklzxcvbnm0123456789qwertyuiopasdfghjklzxcvbnm01",
"schedule_usn": "170713000000020",
"amount": "900",
"initial_date": "03/08/2017",
"next_date": "03/08/2017",
"number_of_times": "3",
"installments": "1",
"installment_type": "4",
"soft_descriptor": "Subscription",
"show_times_invoice": "false"
}
}

Payment with stored card#

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/payments/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"card":{
"token":"g16hJtpdU6XEN3FP-ApQ9pKTGII5Fa9Y12tRX-qfyC-+BUCV5OaFn807zwwOR6rDtKoRnIJg0QbikaJqJqosyQ=="
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao OK",
"status": "CON",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "13034649671",
"customer_receipt": "====CUPOM COMPRADOR====",
"merchant_receipt": "====CUPOM ESTABELECIMENTO====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/07/2017T15:52",
"authorization_number": "132030",
"merchant_usn": "13034649671",
"esitef_usn": "170713097340300",
"sitef_usn": "132030",
"host_usn": "999132030",
"payment_date": "13/07/2017T15:52",
"amount": "1000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005"
}
}

Payment with prefixes#

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST "https://{{url}}/e-sitef/api/v1/payments/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"card":{
"expiry_date":"1222",
"security_code":"123",
"number":"5555555555555555"
},
"acquirer":{
"prefixes":{
"TRAT":"1"
}
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao OK",
"status": "CON",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "21105507366",
"customer_receipt": "====CUPOM COMPRADOR====",
"merchant_receipt": "====CUPOM ESTABELECIMENTO====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "21/11/2017T10:55",
"authorization_number": "211981",
"merchant_usn": "21105507366",
"esitef_usn": "171121108905100",
"sitef_usn": "211981",
"host_usn": "999211981 ",
"amount": "1000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005",
"payment_date": "21/11/2017T10:55"
}
}

Payment - Network Token#

Some card brands have a tokenization solution that offers the storage of cards in safes at the brand itself, in an encrypted form. This brand tokenization is intended to improve the security and quality of the transmitted card information, which leads to possible increases in the conversion of approval by issuing banks.

Request:

To use this example, don't forget to define the variable {{url}} with the value
sandbox.ecomm-bin.fiserv.com.br

curl
--request POST 'https://{{url}}/e-sitef/api/v1/payments/150533212ef1d2082ccff166fd2fb8d98ae645a541ad8ef54225c320bb0587a6' \
--header 'Content-Type: application/json' \
--header 'merchant_id: **********' \
--header 'merchant_key: **********' \
--data-raw '{
"amount": 3000,
"discount": 0,
"installments": 1,
"installment_type": 4,
"authorizer_id": "2",
"subtotal": 3000,
"card": {
"expiry_date": "1222",
"security_code": "123",
"number": "5555555555555555",
"cryptogram": "ALRzlt6NKQtPAAZAkOuIAAADFA==",
"wallet_type": "network_token"
}
}'
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "Transacao Aprov.",
"status": "CON",
"nit": "7aef0962f2d2ec05c4cd35fd0d91a11fb4a5ce77e9dff69bbb5fc0992d0bc017",
"customer_receipt": "====CUPOM COMPRADOR====",
"merchant_receipt": "====CUPOM ESTABELECIMENTO====",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "27/12/2022T17:06",
"authorization_number": "276147",
"esitef_usn": "221227000216620",
"sitef_usn": "276147",
"host_usn": "999276147 ",
"amount": "3000",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000005",
"terminal_id": "ES000023",
"payment_date": "27/12/2022T17:06"
}
}

Response codes

See reference on API codes - response codes

Request parameters#

The table below describes the request parameters of the payment effectuation service:

ParameterDescriptionFormatMandatory
authorizer_idCode of the authorizer on Carat Portal. Learn more.
If this field wasn't sent during the transaction creation phase, it will become mandatory when consuming the payment effectuation service.
< 3 NCOND.
customer_postal_codeUser's postal code (CEP in Brazil). It must be sent for iCards via SiTef routed transactions, if the is_customer_postal_code_required field in card query service is marked as true.< 8 NCOND.
mccThe MCC (Merchant Category Code) is a code that classifies the business by the type of goods or services it provides.< 4 NNO
subacquirer_merchant_idIt is the merchant identification for the subacquirer.< 22 NNO
cardCard data.
numberCustomer's card number (PAN).

Brand generated token (DPAN) for network token payment. Learn more
< 19 NYES
cryptogramCryptogram generated by the brand= 28 AYes for network token payments
expiry_dateCard expiry date in MMYY format. Its requirement depends on the selected acquirer. In most cases, this field is mandatory.= 4 NCOND.
security_codeCard security code. This field may not be mandatory if the company has an agreement in the contract established with the acquirers, only for payments of certain areas. However, it is possible to configure the mandatory field in the merchant settings, consult Carat support for more information.
Important: a payment with schedule implies on storing the customer's card data on Carat Portal's environment. However, for security reasons, the security code cannot be stored. Therefore, the scheduled payments will always be executed without the security code.
< 5 NCOND.
holderCard holder name. < 30 ANCOND.
tokenHASH of a card stored on Carat Portal. It's not allowed to send an ‘open' card number (number field) and a stored card (token field) on the same request.= 88 ANNO
wallet_transaction_idDigital wallet transaction ID. Currently, this functionality is only available to the Visa Checkout and VEE (via CardSE via SiTef) authorizer.
It isn't allowed to send an ‘open' card number (number field), a stored card (token field) and a wallet_transaction_id on the same request.
< 25 ANNO
initial_wallet_transaction_idInforms if the wallet id (wallet_transaction_id) is being used for the first time. If so, send the value true, otherwise send false.< 5 T/FNO
wallet_typeField that specifies whether the transaction is processed with PAN or DPAN. If “type” is empty, the default value is PAN (non-tokenized card number). If there is a tokenized transaction, you must send the value “network_token”.ANNO
external_authenticationThis element receives MPI authentication result fields.
version3DS version used in the authentication process (only version 2 is currently being accepted).< 1 ANNO
eciEletronic Commerce Indicator – Card holder authentication security level indicator.< 3 NNO
reference_idIdentifier of the cardholder's authentication transaction, performed in an external service to Carat (In our Web Checkout, the reference_id is referenced by ds.transId in the 3DS authentication response).< 40 NNO
cavvCardholder Authentication Verification Value - Codes that refers to card holder authentication result data.< 40 NNO
acquirerData required only to specific acquirers / routings.
financing_planFinancing Plan code used for Via Certa Financiadora routed payments, only in case of installments plan with interest.< 4 NNO
special_codeConductor/Renner SiTef routings general use code.< 6 NNO
recurrencyFlag that defines whether or not the payment is recurring. Accepted all routings via SiTef< 5 T/FNO
recurrency_tidFirst transaction's TID. This field tells the first and the subsequent transactions apart. Use only if it is a recurrent payment.< 16 ANNO
recurrency_original_amountOriginal value of the transaction that started the recurrency. This value must be informed in all subsequent recurrences. Used only for recurrence. Field used only in BIN routing, mandatory when recurrence< 18 ANNO
product_codeProduct code.
It is mandatory in routing via Marisa.
< 6 NCOND.
terminalSitef terminal code. In absence Carat Portal will generate a random terminal code.= 14 NNo
company_codeSitef company code. In absence Carat Portal will use company code from merchant configuration.= 8 NNo
authorization_numberAuthorization number. Mandatory for Bradescard Voucher authorizer.< 6 ANCOND.
acquirer.vouchers_filter[]Choice of vouchers that will not be accepted. Options of "Vouchers": 01 - Food, 02 - Meal, 03 - Culture, 04 - Fuel, 05 - Benefit.
Example:
You do not want to accept Vouchers: Culture, Fuel, Benefit. You must send:
"vouchers_filter": ["03", "04", "05"]
acquirer.prefixesElement for sending SiTef prefixes, like CICLOS, CPLANO and VLRADD. If the prefix that was sent is not supported by card, Carat Portal will invalidate the transaction, preventing that a false impression of the use of a functionality is given.

Example:
{ "key" : "value" } -> { "CICLO" : "01" }
keyPrefix name.< 1024 ANNO
valuePrefix value.< 1024 ANNO
acquirer.submerchant_split[]It consists of an array for split payments, unique to BIN and Sipag routing, both via SiTef. It allows the division of parts of the total amount of the payment among other merchants.
The maximum number of items allowed in this array is 5 items.
submerchant_codeBIN/Sipag merchant code< 51 ANNO
submerchant_amountTransaction amount related to the merchant< 12 NNO
acquirer.card_on_fileIt is intended for sending specific information such as card storage authorization, confirming that the cardholder has authorized the storage of the card.
Learn more.
usageIdentifies the usage.
For instance, in case of storage authorization: authorized
< 11 ANNO
reasonItentifies the reason.
For instance, in case of storage authorization: card
< 11 ANNO

WARNING: The terminal e company_code parameters must be used only for SiTef routings and must be sent simultaneously.
It is also necessary send a request to the Carat Portal Support Team for the permission Allows sending Company and SiTef Terminal via REST.

Response parameters#

If successful, the HTTP response code will be 201. Any other code must be interpreted as an error. The table below describes the response parameters of the payment effectuation service:

ParameterDescriptionFormat
codeCarat Portal response code. Any code different from 0 means failure. Learn more.< 4 N
messageCarat Portal response message.< 500 AN
payment
authorizer_codeAuthorizer response code.< 10 AN
authorizer_messageAuthorizer response message.< 500 AN
statusStatus of the payment transaction on Carat Portal. Learn more.= 3 AN
nitIdentifier of the payment transaction on Carat Portal.= 64 AN
order_idOrder code sent by the merchant on the creation of the transaction.< 40 AN
merchant_usnUnique sequential number sent by the merchant on the creation of the transaction.< 12 N
amountTotal price of the purchase specified by the merchant (in cents) on the creation of the transaction.< 12 N
sitef_usnUnique sequential number of the payment transaction on SiTef.= 6 N
esitef_usnUnique sequential number of the payment transaction on Carat Portal.= 15 N
customer_receiptCustomer's receipt.< 4000 AN
merchant_receiptMerchant's receipt.< 4000 AN
authorizer_idCode of the authorizer used on the transaction.< 4 N
acquirer_idCode of the acquirer used on the transaction.< 4 N
acquirer_nameName of the acquirer used on the transaction.< 100 AN
authorizer_datePayment authorization date returned by the authorizer in DD/MM/YYYY'T'HH:mm format. Example: 13/07/2017T16:03= 16 D
authorization_numberAuthorization number.< 6 AN
host_usnHost USN.
Caveat for effecting PIX payments. Learn more.
< 15 AN
tidID of the transaction on the acquirer. This field is only returned on transactions with acquirers that are external to SiTef.< 40 AN
payment_datePayment authorization date on Carat Portal in DD/MM/YYYY'T'HH:mm format. Example: 13/07/2017T16:03= 16 D
issuerIssuer code returned by the authorizer.< 5 AN
authorizer_merchant_idAffiliation code of the merchant on the authorizer.< 100 AN
xidXID field returned on 3DS authentications or certain acquirers.< 40 AN
balanceCurrent balance after payments with Gift cards.< 12 N
recurrency_tidFirst transaction's id (TID) on the card brand. Returned only if it is a recurrent payment. < 16 AN
retryable_codeReversibility indicator of a transaction whose authorization was denied by the authorizer. This field will be returned in the response to the card payment request and must be taken into account in the online store's transaction retry mechanism. Valid codes:
01 – Reversible Denied Transaction, Retain Later.
02 – Irreversible Denied Transaction, Non-Retentive.
= 2 N
payment.analysis
codeResponse code of the fraud analysis operation.< 4 N
messageResponse message of the fraud analysis operation.< 200 AN
statusStatus of the fraud analysis transaction on Carat Portal. This field can assume the following value:
NOV – New.
EXP – Expired.
ACC – Accepted
REJ – Rejected
REV – In review
INV – Invalid
= 3 AN
schedule
statusStatus of the schedule on Carat Portal. Learn more.= 3 AN
sidSchedule transaction identifier on Carat Portal.= 64 AN
schedule_usnUnique sequential number of the schedule on Carat Portal.= 15 N
authorizer_idCode of the authorizer to be used on the scheduled payments.

In operations with tokenized card, if the authorizer is not informed, the authorizer code used in the card storage will be used.
= 4 N
amountAmount of the scheduled payments specified by the merchant (in cents) on the creation of the transaction.< 12 N
order_idOrder code sent by the merchant on the creation of the transaction.< 40 AN
merchant_usnUnique sequential number sent by the merchant on the creation of the transaction.< 12 N
initial_dateExecution date of the first scheduled payment in DD/MM/YYYY format.= 10 D
next_dateExecution date of the next scheduled payment in DD/MM/YYYY format.= 10 D
number_of_timesTotal quantity of scheduled payments.< 3 N
installmentsNumber of installments to be used on the scheduled payments.< 2 N
installment_typeFinancing type to be used on the scheduled payments.< 2 N
soft_descriptorAdditional text that will be presented alongside the name of the establishment in the credit card invoice. This functionality is available to the acquirers Cielo e-Commerce, PayPal, e-Rede, ElavonWS and Stone.< 30 AN
show_times_invoiceFor finite time schedules, send this field with value true if you want to add at the end of the soft_descriptor field the current times/number of times (e.g. Subscription 3/12).< 5 T/F
terminal_idTerminal code used in the transaction< 8 AN
recurrency_tidFirst transaction's id (TID) on the card brand. Returned only if it is a recurrent payment. < 16 AN

Card-On-File Parameters#

Card on File refers to transactions that involve storing credit card information for future use. These transactions indicate that a card has been securely stored in a system, allowing it to be used later without having to re-enter card details. The option to store the card offers users convenience by allowing them to quickly and easily make payments on future transactions. Furthermore, storing card information can also be used by card issuers for risk analysis and fraud prevention, improving transaction security and increasing the conversion rate.

For Card on File operations, the following parameters must be sent:

acquirer.card_on_file
usageIdentifies the use- authorized
- first
- subsequent
reasonIdentify the reason- card
- recurring
- cardholder
- unscheduled

Note: usage and reason are complementary information and therefore it is possible to consult all valid combinations with usage details below.

Definitions#

The following values are accepted for parameters usagee reason, inside of acquirer.card_on_file:

usageDefinition
firstIndicate the first ocurrency
subsequentIndicates that the payment will be made with a previously stored card
authorizedTo be used together reason=card parameter indicating that the card holder has authorized the card storage
reasonDefinition
cardholderSubsequent purchases triggered by the cardholder
unscheduledSubsequent purchases without scheduling
recurringScheduled recurrent purchases
installmentInstalment thru recurrency
cardTo be used together usage=authorized parameter indicating that the card holder has authorized the card storage

MIT e CIT#

There are two types of card-on-file transactions: CIT (Cardholder Initiated Transaction) and MIT (Merchant Initiated Transaction)

SiglaDefinition
CITis any transaction where the cardholder is actively participating in the transaction, either at a terminal in-store or through a checkout experience online.
MITis a subsequent transaction with already-stored credentials, for which a cardholder has given prior consent to the merchant to store payment credentials for future use, without his or her active engagement. Such would be the case in the automatic billing for subscription services, to name one example.

Valid combinations#

usagereasonDefinitionMIT/CIT?
authorizedcardIndicates that the user has authorized the storage of the card when making a payment or zero dollar validation.CIT
firstunscheduledIndicates a single paymentMIT
firstrecurringIndicates the first the first occurrence of a recurrenceMIT
subsequentrecurringIndicates subsequent occurrences of a recurrenceMIT
subsequentcardholderIndicates a payment made by the user with the card already storedCIT
subsequentunscheduledIndicates a subsequent unscheduled occurrence initiated by the merchantMIT
subsequentinstallmentIndicates installment by recurrenceMIT

Recurrency#

Recurring payments are credit card transactions that occur periodically, repeating after a certain period of time. A common example is found in subscriptions, where the buyer wants to be charged automatically, without having to re-enter credit card details for each transaction. In this type of payment, the customer previously authorizes periodic charges, establishing the conditions and the time interval between transactions. This provides convenience for both the buyer, who doesn't have to worry about making repeated payments manually, and the seller, who maintains a constant source of income.

For recurrency operations, the following parameters must be sent:

Acquirer
recurrencyIndicates that this payment is part of a recurrence- true
- false
recurrency_tidTID of the first transaction that caused the recurrence.
recurrency_original_amountOriginal value of the transaction that originated the recurrence. This value must be informed in all subsequent recurrences. Required only for ELO
Acquirer.card_on_file
usageIdentifies the usage- first
- subsequent
reasonIdentifies the reason- recurring
Wallet IDDPAN/Digital Wallet

Example#

Original request

To use this example and the others, don't forget to set the variable {{url}} to the value
sandbox.ecomm-bin.fiserv.com.br

Request:

curl --location 'https://{{url}}/e-sitef/api/v2/payments/'
--header 'Content-Type: application/json'
--header 'merchant_id: xxxxxxxxxxxxxxxxxxxx'
--header 'merchant_key: xxxxxxxxxxxxxxxxxxxx'
--data '{
"merchant_usn": "12050620649",
"order_id":"1686661308079",
"installments": "1",
"installment_type": "4",
"authorizer_id": "41",
"amount": "1100",
"card": {
"expiry_date": "1222",
"security_code": "123",
"number": "5555555555555555",
"cryptogram": "ALRzlt6NKQtPAAZAkOuIAAADFA==",
"wallet_type": "network_token"
},
"acquirer": {
"card_on_file": {
"usage": "authorized",
"reason": "card"
}
}
}'

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "APROVADA",
"status": "CON",
"nit": "402b901d6e3a013467a466c954b8e1634e57ea297983ae9b064e75742cae6538",
"order_id": "1686661308079",
"customer_receipt": " ==== customer recepitp =====",
"merchant_receipt": " ==== merchant receipt =====",
"authorizer_id": "41",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/06/2023T10:01",
"authorization_number": "500335",
"merchant_usn": "12050620649",
"esitef_usn": "230613015919750",
"sitef_usn": "500335",
"host_usn": "006500335 ",
"amount": "1100",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000000",
"terminal_id": "ES000005",
"payment_date": "13/06/2023T10:01",
"recurrency_tid": "999988887777666"
}
}

The recurency_tid parameter from the previous request is used in all subsequent request. Also note the parameters of the card_on_file structure that change on the first request of the recurrency and on subsequent requests (second and subsequents).

First recurring payment

Request:

curl --location 'https://{{url}}/e-sitef/api/v2/payments/'
--header 'Content-Type: application/json'
--header 'merchant_id: xxxxxxxxxxxxxxxxxxxx'
--header 'merchant_key: xxxxxxxxxxxxxxxxxxxx'
--data '{
"merchant_usn": "12050620649",
"order_id":"1686665131999",
"installments": "1",
"installment_type": "4",
"authorizer_id": "41",
"amount": "1100",
"card": {
"expiry_date": "1222",
"security_code": "123",
"number": "5555555555555555",
"cryptogram": "ALRzlt6NKQtPAAZAkOuIAAADFA==",
"wallet_type": "network_token"
},
"acquirer": {
"card_on_file": {
"usage": "first",
"reason": "recurring"
},
"recurrency": "true",
"recurrency_tid": "999988887777666",
"recurrency_original_amount": "1100"
}
}'

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "APROVADA",
"status": "CON",
"nit": "599b99407d094e9e7f9a13fa6de2b492e7f7f251dca1db17893a94d1fc8d1690",
"order_id": "1686665131999",
"customer_receipt": " ==== customer receipt ====",
"merchant_receipt": " ==== merchant receipt ====",
"authorizer_id": "41",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/06/2023T11:05",
"authorization_number": "500337",
"merchant_usn": "12050620649",
"esitef_usn": "230613015921370",
"sitef_usn": "500337",
"host_usn": "006500337 ",
"amount": "1100",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000000",
"terminal_id": "ES000005",
"payment_date": "13/06/2023T11:05"
}
}

Recurrency subsequents request

Request:

curl --location 'https://{{url}}/e-sitef/api/v2/payments/'
--header 'Content-Type: application/json'
--header 'merchant_id: xxxxxxxxxxxxxxxxxxxx'
--header 'merchant_key: xxxxxxxxxxxxxxxxxxxx'
--data '{
"merchant_usn": "12050620649",
"order_id":"1686665569405",
"installments": "1",
"installment_type": "4",
"authorizer_id": "41",
"amount": "1100",
"card": {
"expiry_date": "1222",
"security_code": "123",
"number": "5555555555555555",
"cryptogram": "ALRzlt6NKQtPAAZAkOuIAAADFA==",
"wallet_type": "network_token"
},
"acquirer": {
"card_on_file": {
"usage": "subsequent",
"reason": "recurring"
},
"recurrency": "true",
"recurrency_tid": "999988887777666",
"recurrency_original_amount": "1100"
}
}'

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"payment": {
"authorizer_code": "000",
"authorizer_message": "APROVADA",
"status": "CON",
"nit": "396fce49041532b55d37898039225b6eaed936d1f331232e770475b3ce988809",
"order_id": "1686665569405",
"customer_receipt": " ==== customer receipt ==== ",
"merchant_receipt": " ==== merchant receipt ==== ",
"authorizer_id": "41",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_date": "13/06/2023T11:12",
"authorization_number": "500338",
"merchant_usn": "12050620649",
"esitef_usn": "230613015921490",
"sitef_usn": "500338",
"host_usn": "006500338 ",
"amount": "1100",
"payment_type": "C",
"issuer": "2",
"authorizer_merchant_id": "000000000000000",
"terminal_id": "ES000005",
"payment_date": "13/06/2023T11:12"
}
}