e-SiTef

e-SiTef

  • Portal do Desenvolvedor
  • Fale Conosco
  • English

›General Information

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

Signature authentication

In order to guarantee convenience and security to its customers, e-SiTef offers, in addition to the authenticity POST to the merchant's registered URL (learn more), the option of signing messages, in which content and sender are guaranteed integrity and authenticity, respectively. Thus, the store receives the information of the created transaction directly in response to its REST call and no longer through the authenticity POST.

What you'll need

  • Active registration on e-SiTef's homologation environment (obtained with our support team);
  • The creation of a public key and the management of its respective private key;
  • Public key registration on e-SiTef (done through our support team).

Creating private and public keys

Examples of how to create the private and public keys:

  • On Linux (using the terminal):
# creating private key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key

# creating a public key using the created private key
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
  • On Windows:

Use ssh-keygen at the command prompt

# creating private key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key

Use a version of openssl for windows, run as administrator and run the following command:

# creating a public key using the created private key
rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub

Important:

The jwtRS256.key.pub file is the only one you'll send to our support team. Always keep safe your private key and your password - if you've assigned one.

Signature algorithm

The algorithm supported by the application is RS256 along with the JWT (RFC 7519) standard.

When using this standard, a signature consists of three parts: header, data (payload) and signature verification. Base64 encoding is applied to each of these parts.

First part (header)

The header must contain the following fixed content:

{
  "alg": "RS256",
  "typ": "JWT"
}

Base64 header:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9

Second part (payload)

The payload segment varies according to the operation to be signed. e.g.:

{
  "merchant_id":"XXXXX",
  "merchant_key": "XXXXXXXXXXXXXXX",
  "order_id": "182367r12831t29b",
  "merchant_usn" : "92837429837",
  "timestamp": "1605034925174"
}

Base64 payload:

eyJtZXJjaGFudF9pZCI6IlhYWFhYIiwibWVyY2hhbnRfa2V5IjoiWFhYWFhYWFhYWFhYWFhYIiwib3JkZXJfaWQiOiIxODIzNjdyMTI4MzF0MjliIiwibWVyY2hhbnRfdXNuIjoiOTI4Mzc0Mjk4MzciLCJ0aW1lc3RhbXAiOiIxNjA1MDM0OTI1MTc0In0

Payload composition

Depending on the service called, the payload fields will be different. Below are described the required fields for each service.

Merchant creation and listing services

ParameterDescriptionFormatMandatory
merchant_idMerchant code on e-SiTef.= 15 ANYES
merchant_keyMerchant authentication key on e-SiTef.< 80 ANYES
timestampRepresents the moment the signature is generated in milliseconds. The timestamp field has a validity limit of 10 minutes.< 13 NYES
{
  "merchant_id":"XXXXX",
  "merchant_key": "XXXXXXXXXXXXXXX",
  "timestamp": "1605034925174"
}

Merchant editing and query services

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
timestampRepresents the moment the signature is generated in milliseconds. The timestamp field has a validity limit of 10 minutes.< 13 NYES
registered_merchant_idMerchant code created or to be created on e-SiTef. The production and certification codes will be different.= 15 ANYES
{
  "merchant_id":"XXXXX",
  "merchant_key": "XXXXXXXXXXXXXXX",
  "registered_merchant_id": "YYYYYYY",
  "timestamp": "1605034925174"
}

Transaction creation services

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
order_idOrder code defined by the merchant.< 40 ANYES
merchant_usnUnique sequential number for each order, created by the merchant.< 12 NYES
timestampRepresents the moment the signature is generated in milliseconds. The timestamp field has a validity limit of 10 minutes.< 13 NYES

Example:

{
  "merchant_id":"XXXXX",
  "merchant_key": "XXXXXXXXXXXXXXX",
  "order_id": "182367r12831t29b",
  "merchant_usn" : "92837429837",
  "timestamp": "1605034925174"
}

Other services

ParameterDescriptionFormatMandatory
nitTransaction identifier on e-SiTef.= 64 ANYES
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
timestampRepresents the moment the signature is generated in milliseconds. The timestamp field has a validity limit of 10 minutes.< 13 NYES

Example:

{
  "nit":"asdfghjk12345678asdfghjk12345678asdfghjk12345678asdfghjk12345678",
  "merchant_id":"XXXXX",
  "merchant_key": "XXXXXXXXXXXXXXX",
  "timestamp": "1605034925174"
}

Third part (verification)

The third and final part is the result of the encryption of the two previous parts separately coded in Base64 and concatenated by a period (".").

Two previous parts coded separately in Base64 and concatenated by a period ("."), where the first segment of the text - before the period - corresponds to the header and the second corresponds to the payload:

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6IlhYWFhYIiwibWVyY2hhbnRfa2V5IjoiWFhYWFhYWFhYWFhYWFhYIiwib3JkZXJfaWQiOiIxODIzNjdyMTI4MzF0MjliIiwibWVyY2hhbnRfdXNuIjoiOTI4Mzc0Mjk4MzciLCJ0aW1lc3RhbXAiOiIxNjA1MDM0OTI1MTc0In0

Finally, this content must be RSA encrypted using the merchant's private key. Example:

LLQ2kaC3dG0tsu78JyEIbvd8c1G05lo-1qLDBb0lBXsS2lrJ98-rcusEhuodhHDBE701a_RZwCfOH9ebPZXYdEtuLldqp_Q47y_AYOBYuz3eexuVC0sH3MvmljjHEiMYEIKtFyhsSFrBuQBFvBOT4tJCA779j_cP-JnW4MeDazDehsydEa6phsmkGg_0YfN2xdRzaaTrQqldYibUeI7_YEwLTYrZg0Ys7r45quT7veAzNFLEL4I3iJmMJUcBaCfIQl6NKvX7meoSBeFBaj_MRw8WwXnNTjCFXjU6w_iUiYPg0VVAAKGaEYKP7sHUcw1hn-BawMDMorLcvT9YwP4OxQ

Final signature

The final signature is the concatenation of the 3 parts separated by ("."):

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6IkxPSkFURVNURSIsIm1lcmNoYW50X2tleSI6IkYxOURFMDAxNzdDMzAxREYyNEE4NjVGMTFBQTlCMjU2N0Y2MDQ4OTFGMEY0NEREQUVGRDY5RTMzOTlFMEI3RTEiLCJvcmRlcl9pZCI6IjE4MjM2N3IxMjgzMXQyOWIiLCJtZXJjaGFudF91c24iOiI5MjgzNzQyOTgzNyIsInRpbWVzdGFtcCI6IjE2MDUwMzQ5MjUxNzQifQ.tCRZhbix7x2X_Iz7FBgQOBa18hutPqm3t3mJAnW3_2o

These three parts of the signature, represented by the previous example, must be sent in the Authorization header with value Bearer <signature>. Thus, e-SiTef will be able to validate the signature using the merchant's public key.

Using JWT site for testing

You can use the JWT website to create a valid signature for testing. For that, it is necessary to select the RS256 algorithm and pass the respective payload and a public and private key. "Jwt"

If the public key is not valid, the message "Invalid Signature" will be displayed. "Jwt"

← Soft DescriptorBatch Store Registration →
  • What you'll need
  • Creating private and public keys
  • Signature algorithm
  • First part (header)
  • Second part (payload)
    • Payload composition
  • Third part (verification)
  • Final signature
  • Using JWT site for testing
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