e-SiTef

e-SiTef

  • Portal do Desenvolvedor
  • Fale Conosco
  • English

›JavaScript Payment

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

Virtual store's payment page

The merchant's payment page must contain the e-SiTef's script. Below are the URL's for download:

URL for Production environment:
https://esitef-ec.softwareexpress.com.br/js/esitefpayment-1.0.min.js

URL for Homologation environment:
https://esitef-homologacao.softwareexpress.com.br/js/esitefpayment-1.0.min.js

Fields with card data

The card fields must contain the classes specified below:

ParameterDescriptionFormatMandatory
esitef-cardnumberCustomer's card number (PAN).< 19 NYES
esitef-cardexpirydateCard expiry date in MMYY format.= 4 NYES
esitef-cardexpirymonth
& esitef-cardexpiryyear
Card expiry month and year, in MM and YY format, respectively. These fields can be sent instead of esitef-cardexpirydate. If all these fields are sent at the same time, the split date (esitef-cardexpirymonth and esitef-cardexpiryyear) will have priority.= 2 NYES
esitef-cardsecuritycodeCard security code.< 5 NYES
esitef-cardholderCard holder name. Only mandatory for payments with e-Rede, GetNet WS and VR (SmartNet).< 30 ANCOND.

Calling e-SiTef's script

When the customer fills the card data and clicks "pay", the merchant's page must call the esitefDoPayment JavaScript function, passing as argument a request with the following fields:

ParameterDescriptionFormatMandatory
nitTransaction identification in e-SiTef. The field nit received by the transaction creation service.= 64 ANYES
payTokenThe field pay_token received by the transaction creation service. This token can only be used once.= 66 ANYES
merchantIdMerchant code on e-SiTef. The production and certification codes will be different.< 15 ANYES
localeLanguage of the messages returned in validation errors (onInvalid callback). It can receive the following values:
pt - Portuguese
en - English
es - Spanish
If the locale is not sent, pt will be used.
= 2 ANO
isCardSecurityCode
Optional
Defines if the card security code will be validated as a mandatory or optional field. Send true if it's an optional field. If this field is not sent, the value false will be used (mandatory security code).< 5 T/FNO
onSuccessCallback function the will be called after a successful payment on e-SiTef. This function receives as argument the payment response described in Success and failure callbacks response.FYES
onFailureCallback function the will be called after an unsuccessful payment on e-SiTef. This function receives as argument the payment response described in Success and failure callbacks response.FYES
onInvalidCallback function that will be called after a JavaScript validation error. This function receives as argument the error list described in Validation error callback responseFYES

Success and failure callbacks response

The onSuccess and onFailure callback functions receive as argument an object containing information related to the payment. Below are the descriptions of these fields:

ParameterDescriptionFormat
codee-SiTef response code. Any code different from 0 (zero) means failure. For further information, refer to the Response codes.< 4 N
messagee-SiTef response message.< 500 AN
payment
authorizer_codeAuthorizer response code.< 10 AN
authorizer_messageAuthorizer response message.< 500 AN
statusStatus of the payment transaction on e-SiTef.= 3 AN
nitIdentifier of the payment transaction on e-SiTef.= 64 AN
order_idOrder code sent by the merchant on the creation of the transaction.< 40 AN
customer_receiptCustomer's receipt.< 4000 AN
authorizer_idCode of the authorizer used on the transaction.< 4 N

Validation error callback response

The onInvalid callback function receives as argument a list of error objects, containing the fields below:

ParameterDescriptionFormat
fieldName of the field in error.< 30 AN
causeError message.< 100 AN

Example

Below is an example of a page integrated with e-SiTef's JavaScript payment:

HTML
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<script type="text/javascript" src="https://esitef-
homologacao.softwareexpress.com.br/js/esitefpayment-1.0.min.js"
>
</script>
<script>
function myPay() {
var request = {
onSuccess: function(response) {
console.log(response.code);
console.log(response.message);
console.log(response.payment.authorizer_code);
console.log(response.payment.authorizer_message);
console.log(response.payment.status);
console.log(response.payment.nit);
console.log(response.payment.order_id);
console.log(response.payment.customer_receipt);
console.log(response.payment.authorizer_id);
},
onFailure: function(response) {
console.log(response.code);
console.log(response.message);
console.log(response.payment.authorizer_code);
console.log(response.payment.authorizer_message);
console.log(response.payment.status);
console.log(response.payment.nit);
console.log(response.payment.order_id);
console.log(response.payment.authorizer_id);
},
onInvalid: function(errors) {
for (var i = 0; i < errors.length; i++) {
console.log(errors[i].field);
console.log(errors[i].cause);
}
},
nit: ‘1234567890123456789012345678901234567890123456789012345678901234',
payToken: ‘123456789012345678901234567890123456789012345678901234567890123456',
merchantId: 'xxxxxxxx',
locale: 'pt',
isCardSecurityCodeOptional: false
};
esitefDoPayment(request);
}
</script>
</head>

<body>
<form method="POST">
<input type="text" class="esitef-cardnumber" />
<input type="text" class="esitef-cardexpirymonth" />
<input type="text" class="esitef-cardexpiryyear" />
<input type="text" class="esitef-cardsecuritycode" />
<input type="button" onclick="myPay()" />
</form>
</body>

</html>
← Transaction creation serviceTransaction query service →
  • Fields with card data
  • Calling e-SiTef's script
  • Success and failure callbacks response
  • Validation error callback response
  • Example
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