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:
Parameter | Description | Format | Mandatory |
---|---|---|---|
payment_js | Must be sent with the value true to enable the JavaScript payment flow. | < 5 A | YES |
authenticate | Identifies the type of 3DS 2.0 authentication.
| = 1 N | YES |
additional_data | General transaction data. | ||
exponent | Number of decimal places for the currency as defined in ISO 4217. The default value will be 2 . | = 1 N | NO |
extra_info | Additional information about the account provided optionally by the 3DS Requestor. | < 64 AN | NO |
additional_data .payer | Cardholder information. | ||
email | Cardholder's email address. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication. | < 256 AN | NO |
name | Cardholder's name. | < 45 AN | NO |
additional_data .payer .phones[] | Cardholder's phone information. | ||
ddi | DDI of the phone. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication. | < 3 N | NO |
ddd | DDD of the phone. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication. | < 3 N | NO |
number | Phone number. It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication. | < 12 N | NO |
type | Phone type:
06 It is recommended to send this field, as it aids in risk assessment, contributing to a frictionless authentication. | < 12 N | NO |
additional_data .billing_data .address | Billing address. | ||
city | City. | < 50 AN | NO |
country | ISO 3166-1 three-digit numeric country code. | = 3 N | NO |
street_name | Street name. | < 50 AN | NO |
street_number | Street number. | < 50 AN | NO |
complement | Address complement. | < 50 AN | NO |
zip_code | Zip code. | < 16 AN | NO |
state | State acronym. | < 3 AN | NO |
additional_data .shipment .address | Delivery address. | ||
city | City. | < 50 AN | NO |
country | ISO 3166-1 three-digit numeric country code. | = 3 N | NO |
street_name | Street name. | < 50 AN | NO |
street_number | Street number. | < 50 AN | NO |
complement | Address complement. | < 50 AN | NO |
zip_code | Zip code. | < 16 AN | NO |
state | State acronym. | < 3 AN | NO |
In response, the following parameter will be additionally returned:
Parameter | Description | Format |
---|---|---|
payment | ||
pay_token | Token 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
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"
}
}
Updated 15 days ago