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 creation service

Consuming this service is mandatory to the cancel flow. As a result from this operation, the merchant will obtain a NIT, which will be necessary for the next step of the flow.

NIT has a time limit for its use. This deadline is configured on e-SiTef, and if it's exceeded, the cancel transaction will go from status NOV (new) to EXP (expired), which blocks future operations with this transaction, making it necessary to consume the cancel creation service again.

Authenticity POST x signature

e-SiTef has two methods of merchant authentication on the REST cancel interface: authenticity POST or signature.

In the authenticity POST method, e-SiTef will send the data of the newly created cancel transaction to the registered authenticity URL of the merchant.

In the signature method, the merchant must have a public RSA encryption key registered on e-SiTef and prepare a JWT signature (JSON Web Tokens) to be sent in the Authorization header. In this case, the cancel transaction information will be returned directly in the response. Learn more.

Call details

  • Resource: /v1/cancellations
  • HTTP Method: POST
  • 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
AuthorizationMerchant's signature in the Bearer {signature} format. Example: Bearer JHVGytfdgauygdauiw78264284527852897hagdg.< 2000 ANNO

Examples

Below are some examples of the cancel creation service call using the cURL tool.

Cancel creation with authenticity POST

Request:

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

E-SiTef will then answer through the merchant's URL using a HTTPS POST request (x-www-form-urlencoded) with the necessary information for further cancellation:

Authenticity POST:

curl -X POST \
  https://dominiodaloja.com.br \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Postman-Token: 8306e1f9-dc45-4cb9-926e-8aeef97229b1' \
  -H 'cache-control: no-cache' \
  -d 'nsu=9055020677&nit=1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr&pedido=09055020677&codigoLoja=xxxxxxxxxxxxxxx'

Response:

{
   "code":"0",
   "message":"OK. Transaction successful."
}

Cancel creation with signature

Request:

curl
--request POST "https://esitef-homologacao.softwareexpress.com.br/e-sitef/api/v1/cancellations"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxxxxx"
--header "merchant_key: xxxxxxxxxxx"
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6IkxPFGFURVNURSIsIm1lcmNoYW50X2tleSI6IkYxOURFMDAxNzdDMzAxREYyNEE4NjVGMTFBQTlCMjU2N0Y2MDQ4OTFGMEY0NEREQUVGRDY5RTMzOTlFMEI3RTEiLCJvcmRlcl9pZCI6IjEzMDE0ODU4NjYzIiwibWVyY2hhbnRfdXNuIjoiMTQ0NjY4MTAxNiIsInRpbWVzdGFtcCI6IjE2MDUzMDM1ODA5MzEifQ.JoYz8mQ8PZ8MCr5QXygbivAy2x9fvdUEGu_jSeOYF-BtSGm7ZSYWFVokyowabk1FM2NCklubb5eEB_-g9lCi1ntRQ9iqKhdldm-U8pl0V98u7Mv_hR-pcp6MHfqql0T-mhkOv1WkfYO1igck4N6EfsNu9iO126BwgvJQC456WjAUW5jgjRHboc6htvaak9NBs6yRVLNZY03cR9gKtQXMoHeXiCGeNU55_2W1SOeRJPk-OsyBzvVlZBX5RdfUjB2BOdRI7H2TDBBS-GZaMV3b2eS5_84JTySFnriCTXJ-Y1FzBnH60e4fTfAiYy1P_J-j9hyXjLYgtRu8jQd8ITfiFG3h4ZIysb4CA_lJNg_d4YuCqhBiZcpculcbfXlcrcfPV-CpDytfiLz34FDWH0Q7Vlna1YuSNOKPzDIUx1MOMZO9bpwaE6Q3kClkqri92-42yeLoUKH6PUrlMpE3JrfuBelALE4ce7QzCrNjcvoqR_KVmCm6ozBjPn9qY0s7x7qe6ZLur7hNUoX79JdWGZy1-bx8dSqqpLrU0SXbMBqtvch5FvdUkktbkJpZAr7q6e0nR13_mK3RTV7adOEw03E_ocUk__rEmjGDAHMSWGmiPowu14jD1-VZ2Yf8FeoKzHYcXmIbEReTVHshk9faBICMQzMS3SXaqow4WXqULZiLTwc"
--data-binary
{
   "esitef_usn":"123451234512345"
}
--verbose

Response:

{
   "code":"0",
   "message":"OK. Transaction successful.",
   "cancellation":{
      "nit":" 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "order_id":"09062259711",
      "merchant_usn":"9062259711"
   }
}

Request parameters

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

ParameterDescriptionFormatMandatory
esitef_usnUSN of the payment to be reversed. This information is returned by e-SiTef after the payment is approved. This field mustn't be sent in case of cancel external origin= 15 NCOND
order_idOrder ID of the payment to be cancelled. This field must only be sent in case of cancel via host or cancel external origin.< 40 ANNO
merchant_usnUSN generated by the merchant for the payment to be cancelled. This field must only be sent in case of cancel via host or cancel external origin.< 12 NNO
is_transaction_origin_externalIndicates if the transaction was originated outside e-SiTef. It is mandatory to send this field with a value of 'true' to cancel external origin.< 5 ANCOND

Authenticity POST parameters

The table below describes the parameters sent by e-SiTef on the authenticity POST:

ParameterDescriptionFormat
nitIdentifier of the cancel transaction to be used in the next step of the flow.= 64 AN
pedidoOrder ID of the payment to be cancelled.< 20 AN
nsuUSN generated by the merchant for the payment to be cancelled.< 12 N
codigoLojaMerchant code on e-SiTef.< 15 AN

e-SiTef may also send new parameters without previous warning, which means that the merchant's application must be prepared to receive extra parameters and simply ignore them.

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 cancel creation 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 These fields are only returned when using signature authentication.
nitIdentifier of the cancel transaction to be used in the next step of the flow.= 64 AN
order_idOrder ID of the payment to be cancelled.< 20 AN
merchant_usnUSN generated by the merchant for the payment to be cancelled.< 12 N
← Cancel external originCancel service →
  • Authenticity POST x signature
  • Call details
  • Examples
    • Cancel creation with authenticity POST
    • Cancel creation with signature
  • Request parameters
  • Authenticity POST 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