Pre-Authorization Capture Service

The capture of the Pre-Authorization is intended to effect the Pre-Authorization, which may be in the total amount or lower than the total value of the Pre-Authorization. This will depend on the business rule of the Virtual Store application.

The flow should be: do the pre-authorization operation and if the result is approved, the capture service should be called to complete the flow. The capture will be accomplished in the moment defined by the application business rule.

In the capture operation, the parameter amount may have a value equal to or less than the pre-authorization parameter amount.

For GetNetLac via SiTef routing, the installment can also be done at the pre-authorization and in this case, the capture should expect a installmente number equal or more than the sent previously. If the pre-auth is a sale spot, the capture can not be installed.

Call details#

  • Resources: /v1/preauthorizations/capture/{nit}
  • HTTP Method: POST
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
Content-TypeFixed value application/json= 15 ANYES
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

Example#

Request:

To use this example, don't forget to define the variable {{url}} to the value
esitef-homologacao.softwareexpress.com.br

curl
--request POST "https://{{url}}/e-
sitef/api/v1/preauthorizations/capture/1234567890abcdefghijklmnopqrstuvwx
yz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
"amount":"100",
"installments":"1",
"installment_type":"4",
"card":{
"number":"xxxxxxxxxxxxxxxx",
"expiry_date":"1225",
"security_code":"123"
}
}
--verbose

Response:

{
"code": "0",
"message": "OK. Transaction successful.",
"capture": {
"status": "CON",
"nit": "1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
"order_id": "orderID",
"customer_receipt": "=== CUSTOMER RECEIPT ===",
"merchant_receipt": "=== MERCHANT RECEIPT ===",
"authorizer_id": "2",
"acquirer_id": "229",
"acquirer_name": "Bin",
"authorizer_code": "000",
"authorizer_message": "Transacao OK.",
"authorizer_date": "09/11/2018T19:40",
"authorizer_merchant_id": "000000000000000",
"authorization_number": "212195",
"esitef_usn": "180921015287704",
"merchant_usn": "20190101",
"sitef_usn": "212195",
"host_usn": "999212195",
"amount": "100",
"payment_type": "C",
"issuer": "2"
},
"card":{
"suffix":"5555",
"bin": "544444"
}
}

Response codes

See reference on API codes - response codes

Request parameters#

Sending card data is mandatory on SiTef routed transactions with the exception of the Cetelem acquirer. Only one of these fields must be used: number, token or wallet_transaction_id
ParameterDescriptionFormatMandatory
amountPurchase amount specified by store (in cents) on transaction creation.< 12 NYES
discountDiscount amount in cents. In case of pre-authorizations with promotional values when using Visa Checkout, VISA suggests that this field should be submitted additionally.< 12 NNO
installments (*)Installments number, 1 for sale spot< 2 NYES
installment_typeAlong with the installments field, indicates installment. Possible values for installment_type are:
  • 3: Installments with interest
  • 4: Installments without interest (adopt this as default on spot sales)
= 1 NYES
promo_codeVisa Checkout promotion code used in pre-authorization. In case of pre-authorizations with promotional values when using Visa Checkout, VISA suggests that this field should be submitted additionally.ANNO
subtotalSubtotal amount, in cents. In case of pre-authorizations with promotional amounts by using Visa Checkout, VISA suggests that this field be submitted additionally.< 12 NNO
card
numberCustomer's card number (PAN).< 19 NCOND.
tokenUsed for recurring pre-authorizations, when the card is already stored at Carat Portal database.= 88 ANCOND.
wallet_transaction_idWallet Visa Checkout transaction ID.< 25 ANCOND.
initial_wallet_transaction_idInforms if the Wallet ID (wallet_transaction_id) is being used for the first time. If it's the first time, send true, otherwise, send false. Required only for Visa Checkout.
Default value: true
< 5 ANCOND.
expiry_dateCard expiry date in MMYY format.= 4 NCOND.
security_codeCard security code.< 5 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 ANNO
ecomm_pos_refThis field will send and identification that will appear in the PDV field of the SiTef Web report for e-commerce transactions.< 8 AFNO

Response parameters#

ParameterDescriptionFormat
codeCarat Portal response code. Anything besides 0 means failure. See more information at the Response Code document< 4 N
messageCarat Portal response message.< 500 AN
capture
acquirer_idAcquirer/routing ID used in transaction.< 4 N
acquirer_nameAcquirer/routing name used in transaction.< 100 AN
amountPurchase amount specified by store (in cents) on transaction creation.< 12 AN
authorization_numberAuthorization number< 6 AN
authorizer_codeAuthorizer responde code.< 10 AN
authorizer_dateAuthorizer pre-auth effectuation date, returned by the authorizer on the format DD/MM/AAAA’T’HH:mm. Example: 13/07/2017T16:03= 16 AN
authorizer_idAuthorizer ID use in transaction.< 4 N
authorizer_merchant_idMerchant ID from authorizer.< 100 AN
authorizer_messageReponse message from authorizer.< 500 AN
customer_receiptCustomer receipt.< 4000 AN
eciEletronic Commerce Indicator (pre-authorization security level indicator on transactions).< 3 AN
esitef_usnCarat Portal pre-authorization's unique sequential number.= 15 N
host_usnAuthorizer NSU.< 15 AN
issuerIssuer code returned by the authorizer.< 5 AN
merchant_receiptMerchant receipt.< 4000 AN
merchant_usnUnique sequential number sent by store at the transaction creation.< 12 AN
nitCarat Portal pre-authorization transaction ID.= 64 AN
order_idOrder ID sent by the store at transaction creation.< 40 AN
payment_typePayment type from the selected authorizer: B = boleto, C = credit, D = debit, P = Private Label credit card, T = bank transfer, G = gift card, O = other payment methods, W = Boleto NR via Web Service= 1 AN
sitef_usnSiTef pre-authorization's unique sequential number.= 6 N
statusCarat Portal pre-authorization transaction status.= 3 AN
tidAcquirer/routing transaction ID. This field is only returned in transactions with external acquirer's.< 40 AN
xidXID field returned on 3DS authentications or certain acquirers/routings.< 40 AN
card
suffixLast 4 digits of the customer’s card number.= 4 AN
binFirst 6 digits of the customer’s card.= 6 AN