Docs
Docs

Payment or Preauthorization

Description of the Direct Sale Process (sale)

The direct sale process in a payment gateway is a flow that enables merchants to process transactions for the purchase of goods or services immediately, without the need for preauthorizations or additional confirmation steps.

📘

Important Notes

  • This process is suitable for transactions where no waiting period or additional confirmation is necessary before completing the purchase.

Description of the Preauthorization and Capture Process (preauth)

The preauthorization and capture flow in a payment gateway is a process that allows merchants to obtain approval for a transaction but postpones the actual capture of funds until a later time. This is useful in situations where it is necessary to confirm the validity of a credit card and the availability of funds before completing the transaction.


📘

Important Notes

  • The waiting period between preauthorization and capture varies by issuer and may be subject to specific time limits.
  • Preauthorization allows the merchant to ensure that funds are available before fully committing to the transaction.
  • This flow is commonly used in industries such as hospitality or car rentals, where ensuring fund availability before a client’s arrival is essential.

Description of the 3DS Transaction Process

A 3DS (3D Secure) transaction is an online transaction that uses the 3D Secure security protocol to authenticate the identity of a credit or debit cardholder during a purchase on a website or application. This protocol adds an extra layer of security to the online payment process and is designed to reduce the risk of card fraud. During a 3DS transaction, cardholders are prompted to authenticate themselves with an additional verification step, such as entering a one-time password, a code sent via SMS, or biometric data, depending on the specific implementation by the card issuer.


📘

Important Notes

  • A more detailed description of how to perform authentication on our platform can be found in the section "3DS Authentication."
  • The terminal must have the option to send 3DS authentication parameters enabled. For more information, please contact support.

This endpoint receives the transaction data for payment/preauthorization and returns the result.
Method: post
URL:http://{environment-domain}/api/v1/make-payment
HTTP Headers:Content-Type: application/json
Add authentication headers.

Example:

{
    "transactionType": "sale",
    "merchantId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
    "terminalId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
    "order": {
        "merchantOrderId": "9a6ecf36-8265-11ee-b962-0242ac120002",
        "amount": "100.00",
        "currency": "484"
    },
    "card": {
        "cardNumber": "4111111111111111",
        "expiryMonth": "01",
        "expiryYear": "2025",
        "cvv2": "123",
        "holderName": "Clark Parker",
        "email": "[email protected]"
    },
    "recurringPayment": {
        "saveCardOnfile": true
    },
    "installments": {
        "initialDiferement": 0,
        "numberInstallments": 0,
        "planType": "0"
    },
    "threeDsAutentication": {
        "eci": "05",
        "cavv": "AAUBAAAHCQAAAAAAAAAAAQAAAAA=",
        "ucaf": null,
        "xid": "AAUBAAAHCQAAAAAAAAAAAQAAAAA=",
        "version": "2.2.0",
        "dsTransactionId": "01e4de9c-4d4a-4f0a-bfc3-6cd3ae780446",
        "protocolType": "6"
    }
}

Field Description

FieldDescriptionNote
transactionTypeIndicates the transaction type. In this case, it must be "sale" or "preauth".
merchantIdUnique identifier for the merchant on the payment gateway, assigned when the account is created.
terminalIdUnique identifier for the terminal, assigned when the account is created.
orderContains details about the purchase order.
merchantOrderIdUnique identifier for the order assigned by the merchant.
amountTotal amount of the order.
currencyCurrency code following the ISO 4217 standard.
cardInformation related to the customer's card.
cardNumberCard number.
expiryMonthCard expiration month.
expiryYearCard expiration year.
cvv2Card security code.
holderNameName of the cardholder.
emailEmail address associated with the card.
recurringPaymentConfiguration for recurring payments.Optional; if not sent, the default value is "false".
saveCardOnfileIndicates whether the card should be saved on file for future transactions.
installmentsDetails about installment payments.Optional; if not sent, the transaction will be processed without installments or deferred payments.
initialDiferementInitial deferral.
numberInstallmentsNumber of installments.
planTypePayment plan type ("0" for regular plan).
threeDsAuthenticationInformation for 3D Secure authentication.Optional; if not sent, the transaction will be processed without 3D Secure protection.
eciIndicates the ECI (Electronic Commerce Indicator) value.
cavvValue of the CAVV (Cardholder Authentication Verification Value).
ucafUCAF (Universal Cardholder Authentication Field).
xidValue of the XID (Transaction ID).
versionVersion of the 3D Secure protocol used.
dsTransactionIdUnique identifier of the transaction in the 3D Secure authentication system.
protocolTypeIndicates the protocol type used.

Example of successful response

Http code 200

{
  "id": "5c51bebd-5b21-4ef3-b980-d41eb0b83568",
  "order": {
    "merchantOrderId": "9a6ecf36-8265-11ee-b962-0242ac120002",
    "amount": "100.00",
    "currency": "484"
  },
  "payload": {
    "responseCode": "00",
    "responseDescription": "Approved or completed successfully (if balances are available)",
    "authorizationNumber": "280188",
    "referenceNumber": "000027389440",
    "status": "Paid"
  },
  "recurringPayment": {
    "token": "2b43f315-b053-4cd2-bff0-14dd2e7da52a"
  },
  "isApproved": true,
  "isFailure": false,
  "errors": null
} 

Field Description

FieldDescription
idUnique ID of the transaction assigned by the payment gateway.
orderContains details about the purchase order.
merchantOrderIdUnique identifier for the order assigned by the merchant.
amountTotal amount of the order.
currencyCurrency code following the ISO 4217 standard.
payloadContains detailed information about the transaction.
responseCodeResponse code indicating the result of the transaction (in this case, "00" indicates approval).
responseDescriptionDescription associated with the response code.
authorizationNumberAuthorization number of the transaction.
referenceNumberReference number associated with the transaction.
statusTransaction status; in this case, "paid" indicates that the transaction was successfully completed.
recurringPaymentIndicates if card details have been stored.
tokenUnique identifier for the card to process future recurring payments or scheduled payments.
isApprovedIndicates whether the transaction was approved. In this example, it is "true," meaning the transaction was approved.
isFailureIndicates whether the transaction failed. In this example, it is "false," meaning the transaction did not fail.
errorsContains details such as error number and description, if any. In this case, it is "null," meaning no errors occurred in the transaction.