e-SiTef

e-SiTef

  • Portal do Desenvolvedor
  • Fale Conosco
  • English

›REST Cancel

REST Payment

  • Overview
  • Quick start
  • Transaction creation service
  • Payment effectuation service
  • Payment confirmation service
  • Transaction status query
  • Multiple transactions status query
  • Card query service
  • Payment with multiple payment methods service
  • Payment with multiple payment methods confirmation service
  • External origin payment confirmation service

REST Store

  • Overview

REST Cancel

  • Flow
  • Quick start
  • Cancel via host
  • Cancel external origin
  • Cancel creation service
  • Cancel service

REST Pre-Authorization

  • Overview
  • Quick start
  • Pre-Authorization Creation Service
  • Pre-Authorization effectuation service
  • Pre-Authorization Status Query
  • Pre-Authorization Editing Service
  • Pre-Authorization Editing External Origin Service
  • Pre-Authorization Increment Service
  • Card Query Service
  • Pre-Authorization Capture Service
  • Pre-Authorization Capture External Origin Service

REST Schedule

  • Overview
  • Quick start
  • Transaction creation service
  • Schedule activation service
  • Execution of the scheduled payments
  • Schedule editing flow
  • Quick start: schedule editing
  • Schedule editing creation service
  • Schedule editing service

REST Recharge

  • Overview
  • Quick start
  • Recharge creation service
  • List dealers service
  • List branch data service
  • Recharge effectuation service
  • Recharge confirmation service
  • Recharge query service

HTML Payment

  • Overview
  • Quick start
  • Initializing a payment transaction
  • Status notification
  • Transaction status query
  • Payment with card storage
  • Pages Customization
  • Payment link
  • Split Payment
  • Payment with multiple payment methods
  • 3DS 2.0 Integration

HTML Pre-Authorization

  • Overview

HTML Recharge

  • Overview
  • Quick start
  • Initializing a Recharge transaction

REST Generic Operations

  • Overview
  • Token creation service
  • Generic operation service

JavaScript Payment

  • Overview
  • Quick start
  • Transaction creation service
  • Virtual store's payment page
  • Transaction query service

JavaScript Store

  • Overview
  • Quick start
  • Transaction creation service
  • Virtual store's page

Merchant Web Page

  • Introduction
  • Access to web page
  • Two-Factor Authentication
  • User Configuration
  • Configure Authorizers
  • Transaction Report
  • Daily Summary Report
  • Store Report
  • Recharge Report
  • Analytical Report
  • Transaction Cancellation
  • Schedule
  • Configure Risk Analysis
  • Configure Order Authorizers
  • Users Administration
  • Generate Payment Link

Retry

  • Overview
  • Flow
  • Retry and Schedule

SiTef Routings

  • Bradescard
  • Cetelem
  • GetnetLac
  • Orbitall
  • Vero
  • Bin
  • Sipag

Non SiTef Routings

  • Banco do Brasil
  • Banrisul Vero
  • Cielo e-Commerce
  • EPX
  • e.Rede Rest
  • Fepas HUB
  • Getnet WS
  • GlobalPayments WS
  • IPG
  • Itaú Shopline
  • Mercado Pago
  • PagSeguro
  • PayPal
  • SafraPay
  • Stone WS

Digital Wallet

  • Overview
  • VEE Digital Wallet via CardSE
  • Pix via CardSE
  • Google Pay
  • Visa Checkout
  • Masterpass
  • Samsung Pay
  • Apple Pay
  • Configuration for Digital Wallets

Anti-Fraud Integration

  • Overview
  • Risk analysis service on the HTML Interface
  • Risk analysis response
  • Manual review flow
  • Fraud notification service
  • ClearSale
  • CyberSource
  • Konduto
  • Fraud Detect

General Information

  • Authorizers
  • Digital Certificates
  • API codes
  • Soft Descriptor
  • Signature authentication

Batch Registrations

  • Batch Store Registration
  • Batch Routing Configuration

REST Merchants Registration

  • Overview
  • Quick start
  • Token creation service
  • Merchant creation service
  • Merchant editing service
  • Merchant query service
  • Merchant status query service
  • List merchants service
  • API codes

3DS Server

  • Overview
  • Quick start
  • Transaction creation service
  • Authentication service
  • Transaction query service
  • Challenge messages
  • Decoupled notification
  • Initiating a 3DS Method
  • API codes

Cancel service

After obtaining a cancel NIT in the previous step, the merchant will be able to reverse the desired payment.

After a successful cancellation, the payment transaction will change its status to EST (reversed). Depending on the acquirer, it may be possible to do partial reversals, which means cancelling a smaller amount than what was paid. In this case, the payment transaction will keep the CON status.

Call details

  • Resource: /v1/cancellations/{nit}
  • HTTP Method: PUT
  • Request format: JSON
  • Response format: JSON
  • Header parameters:
ParameterDescriptionFormatMandatory
merchant_idMerchant code on e-SiTef. The production and certification codes will be different.< 15 ANYES
merchant_keyMerchant authentication key on e-SiTef. 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 cancel service calls using the cURL tool.

Cancelling a payment via SiTef

Request:

curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/cancellations/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr**"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
   "card":{
      "security_code":"123",
      "number":"5555555555555555",
      "expiry_date":"1222"
   },
   "amount":"1000"
}
--verbose

Response:

{
   "code":"0",
   "message":"OK. Transaction successful.",
   "cancellation":{
      "authorizer_code":"000",
      "authorizer_message":"Transacao OK",
      "status":"CON",
      "nit":" 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "order_id":"09062259711",
      "customer_receipt":"=== COMPROVANTE ===",
      "merchant_receipt":"=== COMPROVANTE ===",
      "authorizer_id":"2",
      "acquirer_id":"1005",
      "acquirer_name":"Redecard",
      "authorizer_date":"09/11/2017T18:23",
      "authorization_number":"092423",
      "merchant_usn":"9062259711",
      "esitef_usn":"171109108051261",
      "sitef_usn":"092424",
      "host_usn":"999092424   ",
      "amount":"1000",
      "payment_type":"C",
      "issuer":"2",
      "authorizer_merchant_id":"000000000000005",
      "esitef_date":"09/11/2017T18:23",
      "is_host_cancel":"false"
   }
}

Cancelling a payment via Cielo e-Commerce

Request:

curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/cancellations/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{}
--verbose

Response:

{
   "code":"0",
   "message":"OK. Transaction successful.",
   "cancellation":{
      "authorizer_code":"0",
      "authorizer_message":"Operation Successful",
      "status":"CON",
      "nit":"1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "order_id":"10022938077",
      "customer_receipt":"=== COMPROVANTE ===",
      "merchant_receipt":"=== COMPROVANTE ===",
      "authorizer_id":"2",
      "acquirer_id":"201",
      "acquirer_name":"Cielo e-Commerce",
      "merchant_usn":"10022938091",
      "esitef_usn":"171110108163221",
      "amount":"1000",
      "payment_type":"C",
      "authorizer_merchant_id":"zzzzzzzzzzzzzzzzzz",
      "esitef_date":"10/11/2017T14:29",
      "is_host_cancel":"false"
   }
}

Cancel via host

Request:

curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/cancellations/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
   "card":{
      "expiry_date":"1222",
      "number":"455182001234512345"
   },
   "amount":"2000",
   "acquirer":{
      "host_usn":"123123123",
      "sitef_usn":"123123",
      "authorizer_date":"090917",
      "authorizer_id":"1",
      "tef_product_code":"0001",
      "tef_flow_code":"01",
      "authorization_number":"123456"
   }
}
--verbose

Response:

{
   "code":"0",
   "message":"OK. Transaction successful.",
   "cancellation":{
      "authorizer_code":"000",
      "authorizer_message":"Transacao OK!",
      "status":"CON",
      "nit":"1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "customer_receipt":"=== COMPROVANTE ===",
      "merchant_receipt":"=== COMPROVANTE ===",
      "authorizer_id":"1",
      "acquirer_id":"1125",
      "acquirer_name":"Cielo",
      "authorizer_date":"09/11/2017T18:42",
      "authorization_number":"092425",
      "esitef_usn":"171109108051271",
      "sitef_usn":"092425",
      "host_usn":"000092425   ",
      "amount":"2000",
      "payment_type":"C",
      "authorizer_merchant_id":"020001355570001",
      "esitef_date":"09/11/2017T18:42",
      "is_host_cancel":"true"
   }
}

Cancel external origin

Request:

curl
--request PUT "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/cancellations/1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--data-binary
{
   "card":{
      "expiry_date":"1222",
      "number":"455182001234512345"
   },
   "amount":"2000",
   "acquirer":{
      "host_usn":"123123123",
      "sitef_usn":"123123",
      "authorizer_date":"090917",
      "authorizer_id":"2",
      "authorization_number":"123456"
   }
}
--verbose

Response:

{
   "code":"0",
   "message":"OK. Transaction successful.",
   "cancellation":{
      "authorizer_code":"000",
      "authorizer_message":"Transacao OK!",
      "status":"CON",
      "nit":"1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "customer_receipt":"=== COMPROVANTE ===",
      "merchant_receipt":"=== COMPROVANTE ===",
      "authorizer_id":"2",
      "acquirer_id":"1005",
      "acquirer_name":"Redecard",
      "authorizer_date":"09/11/2017T18:42",
      "authorization_number":"092425",
      "esitef_usn":"171109108051271",
      "sitef_usn":"092425",
      "host_usn":"000092425   ",
      "amount":"2000",
      "payment_type":"C",
      "authorizer_merchant_id":"020001355570001",
      "esitef_date":"09/11/2017T18:42"
   }
}

Request parameters

The table below describes the request parameters of the cancel service:

ParameterDescriptionFormatMandatory
amountAmount in cents to be cancelled. It’s important to note that not every acquirer supports cancellations with an amount smaller than the payment amount (partial reversal).
If this field is not sent, e-SiTef will assume the total amount of the payment.
< 12 NNO
soft_descriptorAdditional text that will be presented alongside the name of the establishment in the credit card invoice. Learn more< 30 ANNO
card
numberCustomer card number (PAN). Mandatory when cancelling payments via SiTef.< 19 NCOND.
expiry_dateCard expiry date in MMYY format. Its requirement depends on the selected acquirer.= 4 NCOND.
security_codeSecurity code. It’s mandatory depending on the contract signed with the acquirer.< 5 NCOND.
tokenHASH of a card stored on e-SiTef. 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
acquirer The fields of this element should only be sent in cases of cancel via host, cancel external origin or cancel PayPal transactions.
host_usnHost/authorizer USN of the transaction to be cancelled. Mandatory for cancel via host and cancel external source.< 20 NCOND.
sitef_usnSiTef USN of the transaction to be cancelled. Mandatory for cancel via host and cancel external source.= 6 NCOND.
authorizer_datePayment authorization date returned by the authorizer in DD/MM/YYYY format. Mandatory for cancel via host and cancel external source.= 10 DCOND.
authorizer_idCode of the authorizer on e-SiTef. It must be the same value sent on the payment. Mandatory for cancel via host and cancel external source.< 3 NCOND.
tef_product_codeTEF product code obtained on the payment. This field can receive the following values:
0001 - Visa
0080 - Mastercard
These values can be altered by Cielo without previous warning. Mandatory for cancel via host and cancel external source via Cielo routing.
< 4 NCOND.
tef_flow_codeTEF flow code obtained on the payment. Currently, this field can only receive the value 01 (credit flow). Mandatory for cancel via host and cancel external source via Cielo routing.< 2 NCOND.
authorization_numberAuthorization number of the transaction to be cancelled. Mandatory for cancel via host and cancel external source.< 60 NCOND.
product_codeProduct code.
It is mandatory in routing via Marisa.
< 6 NCOND.
refund_typeType of cancellation you want to make about payment.
It is mandatory and only used for routing via Paypal.

Allowed values:

Full - Full payment chargeback is desired.

Partial - Partial payment chargeback is desired
< 7 ANCOND.
currency_codeCurrency code to be used in chargeback according to ISO 4217. For Real, the code used is BRL.
It is mandatory and only used for routing via Paypal.
< 3 ANCOND.
invoice_idMerchant's own chargeback order code for future reference or tracking.
Used for Paypal routing only.
< 127 ANNO
notePersonalized message for chargeback reminders.
Used for Paypal routing only
< 256 ANNO
retry_untilData and timeout until a chargeback attempt is made. Format: AAAA-MM-DDTHH:MM:SS.
Used for Paypal routing only.
< 20 ANNO
refund_sourceMerchant funds source that will be used to perform the chargeback.
Used for Paypal routing only.

Allowed values:

any - The merchant has no preference. Any available source of funds will be used.

default - The funds source set up in the merchant's account will be used.

instant - Merchant's balance will be used as a source of funds.

eCheck - The “eCheck” option will be used as a source of funds. If the retailer's balance can cover the chargeback, the balance sheet will be used.
< 7 ANNO
merchant_store_detailsMerchant's establishment information.
Used for Paypal routing only.
< 50 ANNO
refund_adviceIndicator for customer who has already received a chargeback of the given transaction.
Used for Paypal routing only.
< 5 ANNO
refund_item_detailsDetails of individual item handled on chargeback.
Used for Paypal routing only.
NO
msg_sub_idThis ID will uniquely identify the message and can be used to request the latest results from a previous request without the need to create a new request. This can be done, for example, on calls that have been timeout canceled or errors during the process.
Used for Paypal routing only.
< 38 ANNO
terminal_idUsed if it is a Point of Sale.
Used for Paypal routing only.
< 50 ANNO
store_idUsed if it is a Point of Sale.
Used for Paypal routing only.
< 50 ANNO
terminalSitef terminal code. In absence e-SiTef will generate a random terminal code.= 14 NNO
company_codeSitef company code. In absence e-SiTef will use company code from merchant configuration.= 8 NNO
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_amoutTransaction amount related to the merchant< 12 NNO

WARNING: The terminal e company_code parameters must be used only in Cancel external origin. In this case, they must be sent simultaneously.
It is also necessary send a request to the e-SiTef Support Team for the permission Permite envio de Empresa e Terminal Sitef via REST.

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 cancel service:

ParameterDescriptionFormat
codee-SiTef response code. Any code different from 0(zero) means failure. Learn more.< 4 N
messagee-SiTef response message.< 500 AN
cancellation
authorizer_codeAuthorizer response code.< 10 AN
authorizer_messageAuthorizer response message.< 500 AN
statusStatus of the payment transaction on e-SiTef. Learn more.= 3 AN
nitIdentifier of the cancel transaction on e-SiTef.= 64 AN
order_idOrder code of the transaction sent by the merchant.< 40 AN
merchant_usnUnique sequential number of the transaction sent by the merchant.< 12 N
amountAmount of the cancel transaction as specified by the merchant (in cents).< 12 N
sitef_usnUnique sequential number of the cancel transaction on SiTef.= 6 N
esitef_usnUnique sequential number of the cancel transaction on e-SiTef.= 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_dateCancel 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.< 20 AN
tidID of the transaction on the acquirer. This field is only returned on transactions with acquirers that are external to SiTef.< 40 AN
esitef_dateCancel authorization date on e-SiTef 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
is_host_cancelThis field will return the value true in case of cancel via host.< 5 T/F
← Cancel creation serviceOverview →
  • Call details
  • Examples
    • Cancelling a payment via SiTef
    • Cancelling a payment via Cielo e-Commerce
    • Cancel via host
    • Cancel external origin
  • Request parameters
  • Response parameters
e-SiTef
Relacionamento com o cliente
+55 (11) 3170-5300+55 (11) 4766-8000comercial@softwareexpress.com.br
Acessos
Portal do DesenvolvedorPortal e-SiTefVersão para impressão
Copyright © 2021 Software Express Informática Ltda - Todos os direitos reservados