Transaction creation service

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

ParameterDescriptionFormatMandatory
payment_jsMust be sent with the value true to enable the JavaScript payment flow.< 5 AYES

In response, the following parameter will be additionally returned:

ParameterDescriptionFormat
payment
pay_tokenToken related to the JavaScript payment.= 66 AN

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

Example#

Request: To use this example, don't forget to define 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
{
"merchant_usn":"12042142155",
"order_id":"12042142155",
"installments":"1",
"installment_type":"4",
"authorizer_id":"2",
"amount":"1000",
"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"
}
}

Payment with Store#

If it's desired to store the used card, just send the followings fields:

ParameterDescriptionFormatMandatory
store_cardMust be sent with the value true to enable the JavaScript payment with store flow.< 5 ANO
additional_data
.payer
.store_identification
Identification of the owner of the card to be stored. This field is mandatory if the store_card field is sent with the value true.< 20 NCOND

As response, the following parameter will be additionally returned:

ParameterDescriptionFormat
store
nitaStore transaction ID.= 65 AN

After performing the payment, the card information will be sent to the merchant via Store Notification.