Transaction creation service

The consumption of this service is mandatory in the JavaScript payment flow. In addition to the REST payment request parameters, the following parameters must also be sent:

ParameterDescriptionFormatMandatory
payment_jsMust be sent with the value true to enable the JavaScript payment flow.< 5 AYES
authenticateIdentifies the type of 3DS 2.0 authentication.
  • 1 = Enable the use of 3DS. However, if the 3DS server does not support the card brand or fails to authenticate, the payment will be declined
  • 2 = Enable the use of 3DS. However, if the 3DS server does not support the card brand, it won't authenticate with the 3DS server. If the card brand is supported and authentication is denied, the payment will be declined.
  • 3 = Enable the use of 3DS. However, even if authentication fails, the payment will not be declined due to authentication, except in cases where the user cancels or abandons the challenge before it is completed.
= 1 NYES
additional_dataGeneral transaction data.
exponentNumber of decimal places for the currency as defined in ISO 4217. The default value will be 2.= 1 NNO
extra_infoAdditional information about the account provided optionally by the 3DS Requestor.< 64 ANNO
additional_data
.payer
Cardholder information.
emailCardholder's email address. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication.< 256 ANNO
nameCardholder's name.< 45 ANNO
additional_data
.payer
.phones[]
Cardholder's phone information.
ddiDDI of the phone. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication.< 3 NNO
dddDDD of the phone. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication.< 3 NNO
numberPhone number. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication.< 12 NNO
typePhone type:
  • 1: residential (fixed)
  • 2: commercial
  • 6: mobile
When not sent, default value is assigned 06 It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication.
< 12 NNO
additional_data
.billing_data
.address
Billing address.
cityCity.< 50 ANNO
countryISO 3166-1 three-digit numeric country code.= 3 NNO
street_nameStreet name.< 50 ANNO
street_numberStreet number.< 50 ANNO
complementAddress complement.< 50 ANNO
zip_codeZip code.< 16 ANNO
stateState acronym.< 3 ANNO
additional_data
.shipment
.address
Delivery address.
cityCity.< 50 ANNO
countryISO 3166-1 three-digit numeric country code.= 3 NNO
street_nameStreet name.< 50 ANNO
street_numberStreet number.< 50 ANNO
complementAddress complement.< 50 ANNO
zip_codeZip code.< 16 ANNO
stateState acronym.< 3 ANNO

In response, the following parameter will be additionally returned:

ParameterDescriptionFormat
payment
pay_tokenToken associated with the JavaScript payment.= 66 AN

For more details about this call, refer to REST Payment.

Example#

Request:

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

curl
--request POST "https://{{url}}/e-sitef/api/v1/transactions"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxx"
--data-binary
{
"authenticate": "1",
"merchant_usn":"12042142155",
"order_id":"12042142155",
"installments":"1",
"installment_type":"4",
"authorizer_id":"2",
"amount":"10004",
"payment_js":"true"
}
--verbose

Response:

{
"code":"0",
"message":"OK. Transaction successful.",
"payment":{
"status":"NOV",
"nit":"1234567890123456789012345678901234567890123456789012345678901234",
"order_id":"12042142155",
"merchant_usn":"12042142155",
"amount":"1000",
"pay_token":"123456789012345678901234567890123456789012345678901234567890123456"
}
}