Transaction initiation
This endpoint receives the payment/preauthorization transaction data and returns the result.
Method: post
URL: http://{environment-domain}/api/v1/begin-transaction
HTTP Headers: Content-Type: application/json
Add authentication headers
Example:
{
"transactionType": "sale",
"merchantId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
"terminalId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
"styleId": "style1",
"urlNotification": "https://dominiocomercion/notificacionResultado",
"order": {
"merchantOrderId": "9a6ecf36-8265-11ee-b962-0242ac120002",
"amount": "100.00",
"currency": "484"
},
"recurringPayment": {
"saveCardOnfile": true
}
}
Field Description
Field | Description | Note |
---|---|---|
transactionType | Indicates the transaction type. In this case, it must be "sale" or "preauth". | |
merchantId | Unique identifier for the merchant on the payment gateway, assigned when the account is created. | |
terminalId | Unique identifier for the terminal, assigned when the account is created. | |
styleId | ID of the style to be applied to the payment form, which can be either a predefined style or a custom one using a CSS file according to the merchant’s needs | |
urlNotification | URL provided by the business where the result is notified. | |
order | Contains details about the purchase order. | |
merchantOrderId | Unique identifier for the order assigned by the merchant. | |
amount | Total amount of the order. | |
currency | Currency code following the ISO 4217 standard. | |
recurringPayment | Configuration for recurring payments. | Optional; if not sent, the default value is "false". |
saveCardOnfile | Indicates whether the card should be saved on file for future transactions. |
Example of a successful response
Http code 200
{
"id": "5c51bebd-5b21-4ef3-b980-d41eb0b83568",
"url": "https://{TODOdominio}/{proxy+}",
"integrity":"sha256-wiOdhYVfjuy3F0XwBIOtPqWfhN65naUwczrtjnkABys="
}
Field Description
Campo | Descripción |
---|---|
id | Unique ID of the transaction assigned by the payment gateway. It is used in the payment form. |
url | URL used in the payment form script. |
integrity | Character string used to validate the integrity of the script. |
Updated 3 months ago