Checkout Integrations

Checkout Integrations #

Version: 6.4.4
Released: 2025/03/01

Copyrighted by lddPay

Introduction #


This document describes the Checkout integration procedures between Checkout service and the website for e-commerce merchants.
To make your integration easier, please download collection and try it out:
Postman Collection

General Information #


Checkout service is a fast and easy way to create a secure payment page. It allows collecting and submitting payments and sending them for processing.

To use the Checkout service on the site you have to perform integration. Checkout integration provides a set of APIs that allow customizing payment processing for the business. These protocols implement acquiring payments (purchases) using specific API interaction with the merchant websites.

The API requires request data as json string data and responds also with json string data.

Checkout process #

Checkout payment flow is shown below.

When a Customer wants to make a purchase on your site the following happens:

  1. Customer places an order and initiates payment on the site.
  2. Site confirms the order and sends the payment processing request to the Checkout system with information about the order, payment and hash.
  3. Checkout system validates the request and sends to the site the response with the redirect link.
  4. The site redirects the Customer on the Checkout page by redirect link.
  5. Customer selects the payment method, enters the payment data and confirms the payment. The payment method will be specifying automatically If only one method is available.
  6. The payment processes at Payment Gateway.
  7. Payment Gateway sends a callback to the site with the payment result.
  8. The payment result is shown to the Customer.

The payment could be declined in case of invalid data detection.

Protocol Mapping #

It is necessary to check the existence of the protocol mapping before using the Checkout integration. Merchants can’t make payments if the CHECKOUT protocol is not mapped.

Customer return after payment #

After completing the payment, the payer will be returned to the URL specified in the Authentication request in the “success_url” and “cancel_url” parameters. If you need to get additional parameters in the return URLs, you should configure it in the Protocol Mappings modules by enabling the “Return parameters” attribute. In that case, “success_url” and “cancel_url” will contain the following data:

ParameterDescription
payment_idPayment ID
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
trans_idTransaction ID
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
order_idOrder ID
Example: order-1234
hashSpecial signature, used to validate data. Addition in Signature section.
Must be SHA1 of MD5 encoded string (uppercased): payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass

⚠️ Pay attention

that for “cancel_url”, the payer’s return to the merchant with parameters is possible only after the decline has happened and the payer has closed the payment form (not the browser tab). If the payer closes the payment form without initiating the payment (pressing the PAY button), the redirection to “cancel_url” occurs without passing additional parameters.

DMS mode #

If you need to use Checkout integration to work with payments in DMS-mode (two-step payments), you should set the corresponding MID configuration in the admin panel. Specify DMS-mode for the MID attribute. In this case, the payment request will be processed as an authorization stage for DMS-mode. The capture requests will be generated and gathered in the queue. You could monitor and manage the capture request queue via the admin panel as well. For detailed information, please contact your administrator.

Checkout page description #


Checkout page is shown to the Customer after a payment initiation. There are the fields to enter the payment data.

Fields and Validation #

The list of the fields on the Checkout page depends on the request parameters and the specified payment method.

Your customers will not see the fields if the acquirer does not need the information that is transmitted in them. For example, if an alternative payment method is specified, the card data is not displayed on the Checkout page.

As well, pay attention to the conditional fields such as e-mail or billing address. If the e-mail and billing address (data object) parameters are specified in the request, the Checkout page will not contain them.

Additional fields can also be displayed if a payment method is selected that requests additional data from the Customer.

The Checkout page has the fields validation. In case of the invalid data the error message will be shown and the field will be highlighted.

The list of the general fields and possible errors on the Checkout page is below:

FieldsTypeLimitationsError
Card numberIntegralLun algorithm, length 14-19 numbersInvalid card number
Expirу DateDate2-2 numbers (in the format mm-yy),
after today’s date
The expiration date of card is expired
and not valid.
Security codeIntegralUp to 4 charactersInvalid security code
Name on cardStringUp to 32 charactersThe name on card field
Must contain at least 2 words: first name and last name. Allowed special characters: hyphens, apostrophes, diacritics
CountryList2-letters codeCountry is required.
Please enter a valid Country
State/RegionString
List – for USA,
Canada, Australia,
Japan, India
CityStringUp to 32 charactersCity is required.
Please enter a valid City
Address lineStringUp to 32 charactersAddress line is required.
Please enter a valid Address line
Zip codeStringUp to 32 charactersZip code is required.
Please enter a valid Zip code
Phone numberStringUp to 32 charactersPhone number is required.
Please enter a valid Phone number

Pre-routing #

To make payment method choice easier for the Customer, pre-routing is provided on the Checkout.

The functionality allows you to set up matches in the admin panel via the Custom routing module, which will determine the list of payment methods suitable for the current payment.

This way, you can restrict your Customers from randomly choosing a payment method that is not available in their region, for example. This will help you to increase the number of successful payments and reduce the risk of declined transactions.

Note that if the Authentication request contains a list of the payment methods in the methods array, then the pre-routing configurations will be ignored.

Card data tokenization #

For regular customers, we have made the payment page even more convenient and simple.

You can save the customer’s card data so that they can reuse it for future payments.

To do this, you need to send the req_token = true parameter in the Authentication request. And then, in the callback, you will receive a card token.

Use the token when sending the next Authentication request and your client will see anonymized card details on the payment form, which will greatly simplify the payment process.

Web information #

Checkout service gathers information about browser, which the Customer uses.

When the Customer is on the Checkout page, the service gets the data about the Customer’s OS, browser, and browser language. That information is sent to the acquirer in some cases.

iFrame option #

You can use iFrame option to show Checkout page on your domain. All you need is just to past in the code redirect url received in the response to the Authentication request.

Please follow the example:

<iframe src=redirect_url height="600" width="300"></iframe>

Note that screen size can be adjusted according to your requirements.

Important: cross-domain requests are prohibited by security policy of our service.

⚠️ Pay attention

By adding our Checkout Payment Page to the iframe on your site, ensure you ALLOW ACCESS TO COOKIE STORAGE.
This is required to avoid issues when redirecting the payer back to your site, such as after 3DS authentication. If you prohibit the storage of third-party data in your cookies, you will prevent the identification of the payer after returning from 3DS. This can cause interruptions in the payment session.

Page Customization #

The administration service provides the ability to stylize the Checkout page in accordance with the preferences of the merchant. The action is available for the authorized users only. To customize the payment page you need:

  1. Click the “Configuration → Branding” item on the menu bar. The settings are displayed in the work area.
  2. Select a page template to make changes.
  3. Change the settings:
    1. login icon selection;
    2. color selection for the following items:
      1. heading;
      2. background;
      3. buttons;
  4. Click the “Submit” button to apply the settings. The selected settings will be displayed to the Customers on the Checkout page.

Authentication request parameters #


The merchant submits an authorization request and as a result of successful response receives the redirect_url – link on the Checkout page.

/api/v1/session

The authentication performs when the payment is initiated.

You need to send an authentication POST request in JSON format on Checkout form URL (CHECKOUT_URL) to start checkout process for the Customers. As a result of the authentication request you will receive the following:

  • An authentication session is created with a unique identifier (Session ID). The session expires after one hour.
  • A link is generated to redirect to the Checkout page: one link corresponds to one payment. The link becomes invalid after a successful payment. The authentication request parameters are below.

If DMS-mode (two-stages payment) is available, after successful authentication it is necessary to capture. The capture would be performed automatically according to the settings or you can do it manually in the admin portal.

Request Parameters #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
operationStringRequiredDefines a payment transaction
Possible values: purchase, debit, transfer
Send the “purchase” value so that the payment page for sale initiation will be shown to the customer.
Send the “debit” value so that the payment page for debit initiation will be shown to the customer.
Send the “transfer” value so that the payment page for transfer initiation will be shown to the customer.
Example: purchase
methodsArrayOptionalAn array of payment methods. Limits the available methods on the Checkout page (the list of the possible values in the Payment methods section). In the case of parameter absence, the pre-routing rules are applied. If pre-routing rules are not configured, all available payment methods are displayed.
Condition: for purchase operation only
For purchase and debit operations.
Example: card, paypal, googlepay
session_expiryIntegerOptional
Values from 1 to 720 min
Session expiration time in minutes.
Default value = 60.
Could not be zero.
Example: 60
success_urlStringRequired
Valid URL
max: 1024
URL to redirect the Customer in case of the successful payment
Example: https://example.domain.com/success
The return of additional parameters can be configured for success_url. See the “Customer return after payment” section for details.
cancel_urlStringOptional
Valid URL
min: 0 max: 1024
URL to return Customer in case of a payment cancellation (“Close” button on the Checkout page). The logic of redirection on “cancel_url” could be configured in the admin panel (Configuration -> Protocol Mappings section): use the “Maximum count declines” field to set the payment failed attempts quantity before redirection. For example, if the field value is set to “1”, then after the first declined attempt, a payer will be redirected to “cancel_url.”
Example: https://example.domain.com/cancel
The return of additional parameters can be configured for cancel_url. See the “Customer return after payment” section for details.
expiry_urlStringOptional
Valid URL
min: 0 max: 1024
URL where the payer will be redirected in case of session expiration
Example: https://example.domain.com/expiry
url_targetStringOptional
Possible values: _blank, _self, _parent, _top or custom iframe name.
Find the result of applying the values in the HTML standard description (Browsing context names)
Name of, or keyword for a browsing context where Customer should be returned according to HTML specification.
Example: _parent
req_tokenBooleanOptional
default – false
Special attribute pointing for further tokenization
If the card_token is specified, req_token will be ignored.
For purchase and debit operations.
Example: false
card_tokenArray of StringsOptional
String 64 characters
Credit card token value
For purchase and debit operations.
Example: f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97
recurring_initBooleanOptional
default – false
Initialization of the transaction with possible following recurring
Only for purchase operation
Example: true
schedule_idStringOptional
It s available when recurring_init = true
Schedule ID for recurring payments
Only for purchase operation
Example: 57fddecf-17b9-4d38-9320-a670f0c29ec0
vat_calcBooleanConditional
true or false
default – false
Indicates the need of calculation for the VAT amount
• ‘true’ – if VAT calculation needed
• ‘false’ – if VAT should not be calculated for current payment.
Only for purchase operation
Example: false
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section.
Example: Must be SHA1 of MD5 encoded string (uppercased): order_number + order_amount + order_currency + order_description + password
orderObjectRequiredInformation about an order
numberStringRequired
max: 255
[a-z A-Z 0-9 -!”#$%&'()*+,./:;&@]
Order ID
Example: order-1234
amountStringRequired
Greater then 0
[0-9]
max: 255
Format depends on currency.
Send Integer type value for currencies with zero-exponent. Example: 1000
Send Float type value for currencies with exponents 2, 3, 4.
Format for 2-exponent currencies: XX.XX Example: 100.99
Pay attention that currencies ‘UGX’, ‘JPY’, ‘KRW’, ‘CLP’ must be send in the format XX.XX, with the zeros after comma. Example: 100.00
Format for 3-exponent currencies: XXX.XXX Example: 100.999.
Format for 4-exponent currencies: XXX.XXXX Example: 100.9999
For transfer operation:
Send amount if you want to show default value in the amount field on the Checkout. The customers can change the value manually on the payment form.Send “-1” value if you want to show empty amount field on the Checkout so that the Customers could enter the value manually.
currencyStringRequired
3 characters
[A-Z]
ISO 4217
Currency
Example: USD
descriptionStringRequired
min: 2 max: 1024
[a-z A-Z 0-9 !”#$%&'()*+,./:;&@]
Product name
Example: Very important gift – # 9
customerObjectConditionalCustomer’s information. Send an object if a payment method needs
nameStringConditional
min: 2 max: 32
Latin basic
[a-z A-Z]
Customer’s name
Condition: If the parameter is NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs) – the “Cardholder” field
Example: John Doe
emailStringConditional
min: 2 max: 255
email format
Customer’s email address
Condition: If the parameter is NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs) – the “E-mail” field
Example: example@mail.com
birth_dateStringConditional
format: yyyy-mm-dd
ISO 8601
Payer’s birth date
Example: 1970-02-17
billing_addressObjectConditionalBilling address information.
Condition: If the object or some object’s parameters are NOT specified in the request, then it will be displayed on the Checkout page (if a payment method needs)
countryStringConditional 2 characters
(alpha-2 code)
ISO 3166-1
Billing country
Example: US
stateStringOptional
min: 2 max: 32
[a-z A-Z]
It is 2-letters code for USA, Canada, Australia, Japan, India
Billing state address
Example: CA
cityStringConditional
min: 2 max: 40
[a-z A-Z]
Billing city
Example: Los Angeles
districtStringOptional
min: 2 max: 32
[a-z A-Z 0-9 – space]
City district
Example: Beverlywood
addressStringConditional
min: 2 max: 32
[a-z A-Z 0-9]
Billing address
Example: Moor Building
house_numberStringOptional
min: 1 max: 9
[a-z A-Z 0-9/ – space]
House number
Example: 17/2
zipStringConditional
min: 2 max: 10
[a-z A-Z 0-9]
Billing zip code
Example: 123456, MK77
phoneStringConditional
min: 1 max: 32
[0-9 + () -]
Customer phone number
Example: 347771112233
payeeObjectConditionalPayee’s information.
Specify additional information about Payee for transfer operation if it is required by payment provider.
nameStringRequired
min: 2 max: 32
Latin basic
[a-z A-Z]
Customer’s name.
Example: John Doe
emailStringConditional
email format
Customer’s email address.
Example: example@mail.com
payee_billing_addressObjectConditionalBilling address information for Payee.
countryStringConditional 2 characters
(alpha-2 code)
ISO 3166-1
Billing country
Example: US
stateStringOptional
min: 2 max: 32
[a-z A-Z]
It is 2-letters code for USA, Canada, Australia, Japan, India
Billing state address
Example: CA
cityStringConditional
min: 2 max: 40
[a-z A-Z]
Billing city
Example: Los Angeles
districtStringOptional
min: 2 max: 32
[a-z A-Z 0-9 – space]
City district
Example: Beverlywood
addressStringConditional
min: 2 max: 32
[a-z A-Z 0-9]
Billing address
Example: Moor Building
house_numberStringOptional
min: 1 max: 9
[a-z A-Z 0-9/ – space]
House number
Example: 17/2
zipStringConditional
min: 2 max: 10
[a-z A-Z 0-9]
Billing zip code
Example: 123456, MK77
phoneStringConditional
min: 1 max: 32
[0-9 + () -]
Customer phone number
Example: 347771112233
parametersObjectOptionalExtra-parameters required for specific payment method
Example:
"parameters": { "payment_method": { "param1":"val1", "param2":"val2" } }
custom_dataObjectOptionalCustom data
This block can contain arbitrary data, which will be returned in the callback.
Example:
“custom_data”: {“param1”:”value1”, “param2”:”value2”, “param3”:”value3”}

#

Request parameter #

  • Authentication (OK)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

      “merchant_key”: “xxxxx-xxxxx-xxxxx”,

      “operation”: “purchase”,

      “methods”: [

        “card”,

        “method1”

      ],

      “parameters”: {

        “card”: {

          “param1”: “val-1”,

          “param2”: “val-2”

        },

        “method1”: {

          “param1”: “val-3”,

          “param2”: “val-4”

        }

      },

      “session_expiry”: 60,

      “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “Important gift”

      },

      “cancel_url”: “https://example.domain.com/cancel”,

      “success_url”: “https://example.domain.com/success”,

      “expiry_url”: “https://example.domain.com/expiry”,

      “url_target”: “_blank”,

      “customer”: {

        “name”: “John Doe”,

        “email”: “test@gmail.com”

      },

      “billing_address”: {

        “country”: “US”,

        “state”: “CA”,

        “city”: “Los Angeles”,

        “disctrict”: “Beverlywood”,

        “address”: “Moor Building 35274”,

        “house_number”: “17/2”,

        “zip”: “123456”,

        “phone”: “347771112233”

      },

      “card_token”: [

        “f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97075ee5e539bb662fceff4dc1”

      ],

      “req_token”: true,

      “recurring_init”: true,

      “schedule_id”: “9d0f5cc4-f07b-11ec-abf4-0242ac120006”,

      “hash”: “{{session_hash}}”

    }

  • Debit Operation (OK)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

      “merchant_key”: “xxxxx-xxxxx-xxxxx”,

      “operation”: “debit”,

      “methods”: [

        “card”

      ],

      “parameters”: {

        “card”: {

          “param1”: “val-1”,

          “param2”: “val-2”

        },

        “session_expiry”: 60,

        “order”: {

          “number”: “order-1234”,

          “amount”: “0.19”,

          “currency”: “USD”,

          “description”: “Important gift”

        },

        “cancel_url”: “https://example.domain.com/cancel”,

        “success_url”: “https://example.domain.com/success”,

        “expiry_url”: “https://example.domain.com/expiry”,

        “url_target”: “_blank”,

        “customer”: {

          “name”: “John Doe”,

          “email”: “test@gmail.com”

        },

        “billing_address”: {

          “country”: “US”,

          “state”: “CA”,

          “city”: “Los Angeles”,

          “disctrict”: “Beverlywood”,

          “address”: “Moor Building 35274”,

          “house_number”: “17/2”,

          “zip”: “123456”,

          “phone”: “347771112233”

        },

        “card_token”: [

          “f5d6a0ab6fcfb6487a39e2256e50fff3c95aaa97075ee5e539bb662fceff4dc1”

        ],

        “req_token”: true,

        “hash”: “{{session_hash}}”

      }

    }

  • Transfer Operation (OK)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{  

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “operation”:”transfer”,

       “order”:{

          “number”:”order-1234″,

          “amount”: “100.55”,

          “currency”:”USD”,

          “description”:”Important gift”

       },

       “cancel_url”:”https://example.com/cancel”,

       “success_url”:”https://example.com/success”,

       “customer”:{

            “name”:”John Doe”,

            “email”:”success@gmail.com”

        },

        “payee”: {

            “name”:”John Doe”,

            “email”:”success@gmail.com”

            },

        “billing_address”:{

            “country”:”US”,

            “state”:”California”,

            “city”:”Los Angeles”,

            “address”:”Moor Building 35274 State ST Fremont. U.S.A”,

            “zip”:”94538″,

            “phone”:”0987654321″,

            “district”:”Brentwood”,

            “house_number”:”123″

        },

        “payee_billing_address”:{

            “country”:”US”,

            “state”:”New York”,

            “city”:”New York”,

            “address”:”Moor Building 35274 State ST Fremont. U.S.A”,

            “zip”:”94538″,

            “phone”:”0987654321″,

            “district”:”Brentwood”,

            “house_number”:”123″

        },

       “hash”:”{{session_hash}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TJ4V0RUQTBZQnhBLW5meUxCRHRJN0dPaVRWQjJ5cWd1Z1lBdGRfbWFQN2x2YTJpbVJWaHhxT0R5SlRiZThxcDdhWkw4bkJvTHZocnZDOHlv”

    }

Authentication request possible errors #


Parameter Values Validation #

Checkout service validates the request parameters and sends the error responses in case of an invalid data detection.

#

Parameter Values Validation #

  • Example Request – Validation (bad)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{  

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “operation”:”credit”,

       “methods”:[ “” ],

       “order”:{

          “number”:””,

          “amount”: “1.2”,

          “currency”:”Dollar”,

          “description”:””

       },

       “cancel_url”:”1.com”,

       “success_url”:””,

       “customer”:{

          “name”:”John Doe”,

          “email”:”example@mail.com”

       },

       “recurring_init”: “true”,

       “hash”:”728d13b95cf2b6b3ee04b20dc2fc9889ffff1cf4″

    }

  • Example Response – 400 Bad Request

    {

      “error_code”: 0,

      “error_message”: “Request data is invalid.”,

      “errors”: [

        {

          “error_code”: 100000,

          “error_message”: “operation: The value you selected is not a valid choice.”

        },

        {

          “error_code”: 100000,

          “error_message”: “methods: This value should not be blank.”

        },

        {

          “error_code”: 100000,

          “error_message”: “order.number: This value should not be blank.”

        },

        {

          “error_code”: 100000,

          “error_message”: “order.amount: This value should be greater than 0.”

        },

        {

          “error_code”: 100000,

          “error_message”: “order.currency: This value is not valid.”

        },

        {

          “error_code”: 100000,

          “error_message”: “order.description: This value should not be blank.”

        },

        {

          “error_code”: 100000,

          “error_message”: “cancel_url: This value is not a valid URL.”

        },

        {

          “error_code”: 100000,

          “error_message”: “success_url: This value should not be blank.”

        }

      ]

    }

Hash Validation #

The Checkout service always performs hash validation. The request will be rejected if the hash value is invalid.

#

Hash validation #

  • Example Request – Hash Validation

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{  

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “operation”:”purchase”,

       “methods”:[

          “card”

       ],

       “order”:{

          “number”:”order-1234″,

          “amount”: “0.19”,

          “currency”:”USD”,

          “description”:”Important gift”

       },

       “cancel_url”:”https://example.com/cancel”,

       “success_url”:”https://example.com/success”,

       “customer”:{

          “name”:”John Doe”

       },

       “hash”:”wrong hash”

    }

  • Example Response – Hash error

    {

      “error_code”: 0,

      “error_message”: “Request data is invalid.”,

      “errors”: [

        {

          “error_code”: 100000,

          “error_message”: “hash: Hash is not valid.”

        }

      ]

    }

Callback Notification #


Checkout service sends the callback on the merchant notification_URL as a result of an operation.

You can receive the callback for the next operation types:

  • SALE
  • 3DS
  • REDIRECT
  • REFUND
  • VOID
  • RECURRING
  • CHARGEBACK
  • DEBIT
  • TRANSFER

⚠️ Pay attention

Note that the notification URL may be temporarily blocked due to consistently receiving timeouts in response to the callback. If five timeouts accumulate within five minutes for a merchant’s notification URL, it will be blocked for 15 minutes. During this block, all merchants associated with the URL will not receive notifications. The block automatically lifts after 15 minutes. Additionally, it is possible to manually unblock the URL through the admin panel by navigating to Configuration → Merchants → Edit Merchant. In this case, the block will be removed immediately. The timeout counter resets if a callback response is successfully processed. For instance, if there are four timeouts within five minutes but a successful response on the sixth minute, the counter resets.

⚠️ Pay attention

In the case of cascading, the logic for sending callbacks differs.
If cascading is triggered for the order, in general case you will receive only callback for the last payment attempt, where the final status of the order (settled or declined) is determined. In the particular cases, you will receive callback for the first payment attempt with the data for customer’s redirection if it is required by payment provider. Callbacks for intermediate attempts (between the first decline and the last payment attempt) are not sent.

List of Possible Transaction Statuses #

The possible statuses are listed below:

Transaction StatusOperation typeDescription
SUCCESSsale, 3ds, redirect, refund, void, recurring, chargeback, debit, transferTransaction is successfully completed in Payment Platform
FAILsale, refund, void, recurring, debit, transferTransaction has the errors and is not validated by Payment Platform
WAITINGsale, refund, void, recurring, debit, transferTransaction is being processed by Payment Platform
UNDEFINEDsale, 3ds, redirect, refund, void, recurring, debit, transferUncertain payment status due to problems interacting with the payment provider

⚠️ Pay attention

that successful transaction does not mean successful final status for the payment.

For example:
Payment is successfully completed if transaction has status = success and type = sale. Payment is not completed if transaction has status = success and type = redirect.

Callback parameters #

Callback is HTTP POST request whcih includes the following data:

ParameterTypeMandatory, LimitationsDescription
idStringRequiredTransaction ID
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
order_numberStringRequired Up to 255 charactersOrder ID
Example: order-1234
order_amountFloatRequired Format: XX.XX, without leading zeroesProduct price
Example: 0.19
order_currencyStringRequired Up to 3 charactersCurrency (3-characters code)
Example: USD
order_descriptionStringRequired Up to 1024 charactersProduct description
Example: Important gift
order_statusStringRequired Up to 20 charactersPayment status: prepare, settled, pending, 3ds, redirect, decline, refund, reversal, chargeback
Example: 3ds
typeStringRequired Up to 36 charactersOperation type: sale, 3ds, redirect, refund, void, chargeback, debit, transfer
Example: sale
statusStringRequired Up to 20 charactersTransaction status: success, fail, waiting, undefined
Example: success
payment_statusStringRequired Up to 20 charactersPayment status: prepare, settled, pending, 3ds, redirect, decline, refund, reversal,chargeback
Example: 3ds
reasonStringOptional Up to 1024 charactersDecline or error reason. It displays only if the transaction has FAIL status.
Example: The operation was rejected. Please contact the site support
payee_nameStringOptionalPayee’s first and last name
Returns only for transfer operation
Example: John Rickher
payee_emailStringOptionalPayee’s e-mail
Returns only for transfer operation
Example: example@mail.com
payee_countryStringOptional
Up to 3 characters
Payee’s country
Returns only for transfer operation
Example: US
payee_stateStringOptional
Up to 32 characters
Payee’s state
Returns only for transfer operation
Example: California
payee_cityStringOptional
Up to 32 characters
Payee’s city
Returns only for transfer operation
Example: Los Angeles
payee_addressStringOptional
Up to 32 characters
Payee’s city
Returns only for transfer operation
Example: 123 Sample Street
rrnStringOptionalRetrieval Reference Number value from the acquirer system
approval_codeStringOptionalApproval code value from the acquirer system
cardStringOptional
Format: ХХХХХХ******ХХХХ
Card number mask
Example: 411111******1111
card_expiration_dateStringOptionalCard expiration date
Example: 12/2022
payee_cardStringOptionalPayee card number mask
Returns only for transfer operation
Example: 411111******1111
card_tokenStringOptionalCard token. It is available if the parameter req_token was enabled
It is available only for purchase operation
Example: VjFRaUxDSmhiR2NpT2lKU1V6STFO
customer_nameStringOptionalCustomer’s first and last name
Example: John Rickher
customer_emailStringOptional
Format: example@mail.com
Customer’s email address
Example: fdfd@dfsds.ds
customer_countryStringOptional
Up to 3 characters
Customer’s country
Example: US
customer_stateStringOptional
Up to 32 characters
Customer’s state
Example: California
customer_cityStringOptionalCustomer’s city
Example: Los Angeles
customer_addressStringOptional
Up to 32 characters
Customer’s address
Example: 123 Sample Street
customer_ipStringRequiredCustomer’s IP
Example: 255.41.45.57
dateDateOptional
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
recurring_init_trans_idStringOptionalReference to the first transaction that initializes the recurring (provided if recurring was initialized)
It is available only for purchase operation
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87099
recurring_tokenStringOptionalRecurring token (provided if recurring was initialized)
Example: e5f60b35485e
schedule_idStringOptionalIt is available if schedule is used for recurring sale
It is available only for purchase operation
exchange_rateDecimalOptionalRate used to make exchange.
It returns if the currency exchange has been applied for the payment.
exchange_rate_baseDecimalOptionalThe rate used in the double conversion to convert the original currency to the base currency.
It returns if the currency exchange has been applied for the payment.
exchange_currencyDictionaryOptionalOriginal currency.
It returns if the currency exchange has been applied for the payment.
exchange_amountIntegerOptionalOriginal amount.
It returns if the currency exchange has been applied for the payment.
vat_amountFloatOptional
Format: XX.XX, without leading zeroes
Product VAT
Returns if VAT has been calculated for the payment.
It is available only for purchase operation
Example: 0.09
custom_dataObjectOptionalCustom data
This block duplicates the arbitrary parameters that were passed in the payment request
Example:
“custom_data”: {“param1”:”value1”, “param2”:”value2”, “param3”:”value3”}
hashStringRequiredSpecial signature, used to validate callback Addition in Signature section.
Example: Must be SHA1 of MD5 encoded string (uppercased): payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass

Examples #

#

Callback Example #

  • Merchant successful sale callback

      id=f0a51dfa-fc43-11ec-8128-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=settled&type=sale&status=success&card=411111****1111&card_expiration_date=12/2022&schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007&recurring_init_trans_id=f0a51dfa-fc43-11ec-8128-0242ac120004&recurring_token=f0e24964-fc43-11ec-a7e0-0242ac120004&date=2022-07-05 09:22:09&hash=6d8d440e25bdfc5288616ce567496948d2562852&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2&exchange_rate_base=26.19&exchange_rate=6.47&exchange_currency=UAH&exchange_amount=100.00

  • Merchant successful debit callback

    id=f0a51dfa-fc43-11ec-8128-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=settled&type=debit&status=success&card=411111****1111&card_expiration_date=12/2022&date=2022-07-05+09:22:09&hash=6d8d440e25bdfc5288616ce567496948d2562852&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2

  • Merchant successful refund callback

     id=f0a51dfa-fc43-11ec-8128-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=settled&type=refund&status=success&card=411111****1111&card_expiration_date=12/2022&schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007&date=2022-07-05+09:28:01&hash=6d8d440e25bdfc5288616ce567496948d2562852&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2

  • Merchant successful transfer callback

    id=f0a51dfa-fc43-11ec-8128-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=settled&type=transfer&status=success&card=411111****1111&card_expiration_date=12/2022&payee_card=422222****2222&date=2022-07-05+09:22:09&hash=6d8d440e25bdfc5288616ce567496948d2562852&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35275&customer_ip=10.10.10.2&payee_name=D D&payee_email=success@gmail.com&payee_country=US&payee_state=California&payee_city=Los Angeles&payee_address=Moor Building 35274 State ST Fremont. U.S.A

  • Merchant unsuccessful sale callback

    id=1f34f446-fc45-11ec-a50f-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=decline&type=sale&status=fail&card=411111****1111&card_expiration_date=12/2022&reason=Declined by processing.&date=2022-07-05+09:30:35&hash=7f15d178e9b2c8507dea57f8ed1efddb9573fa6b&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2

  • Merchant unsuccessful debit callback

    id=1f34f446-fc45-11ec-a50f-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=decline&type=debit&status=fail&card=411111****1111&card_expiration_date=12/2022&reason=Declined by processing.&date=2022-07-05+09:30:35&hash=7f15d178e9b2c8507dea57f8ed1efddb9573fa6b&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2

  • Merchant unsuccessful refund callback

    id=ba290c62-fc45-11ec-9e91-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=decline&type=refund&status=fail&card=411111****1111&card_expiration_date=12/2022&reason=Declined by processing.&schedule_id=4e46866c-f84b-11ec-8b4c-0242ac120007&recurring_init_trans_id=ba290c62-fc45-11ec-9e91-0242ac120004&recurring_token=ba51844e-fc45-11ec-932c-0242ac120004&date=2022-07-05+09:38:00&hash=bcd78ff8b8e6b75aa1743910641217be6edc3a43&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35274 State ST Fremont. U.S.A&customer_ip=10.10.10.2

  • Merchant unsuccessful transfer callback

    id=1f34f446-fc45-11ec-a50f-0242ac120004&order_number=order-1234&order_amount=3.01&order_currency=USD&order_description=bloodline&order_status=decline&type=transfer&status=fail&card=411111****1111&card_expiration_date=12/2022&payee_card=422222****2222&date=2022-07-05+09:22:09&hash=6d8d440e25bdfc5288616ce567496948d2562852&customer_name=D D&customer_email=success@gmail.com&customer_country=US&customer_state=California&customer_city=Los Angeles&customer_address=Moor Building 35275&customer_ip=10.10.10.2&payee_name=D D&payee_email=success@gmail.com&payee_country=US&payee_state=California&payee_city=Los Angeles&payee_address=Moor Building 35274 State ST Fremont. U.S.A&vat_amount=0.3

Recurring #


Recurring payments are commonly used to create new transactions based on already stored cardholder information from previous operations. This request is sent by POST in JSON format.

RECURRING request

/api/v1/payment/recurring

Request Parameters #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
recurring_init_trans_idStringRequiredTransaction ID of the primary transaction in the Payment Platform
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
recurring_tokenStringRequiredRecurring token
Example: 9a2f-0242c0a87002
schedule_idStringOptionalSchedule ID for recurring payments
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section
Must be SHA1 of MD5 encoded string (uppercased): recurring_init_trans_id + recurring_token + order.number + order.amount + order.description + merchant_pass
orderObject
numberStringRequired
Not blank
max: 255
[a-zA-Z0-9-]
Order ID
Example: order-1234
amountFloatRequired
Not blank
Greater then 0
0-9
max: 255
Format depends on currency.
Send Integer type value for currencies with zero-exponent. Example: 1000
Send Float type value for currencies with exponents 2, 3, 4.
Format for 2-exponent currencies: XX.XX Example: 100.99
Pay attention that currencies ‘UGX’, ‘JPY’, ‘KRW’, ‘CLP’ must be send in the format XX.XX, with the zeros after comma. Example: 100.00
Format for 3-exponent currencies: XXX.XXX Example: 100.999.
Format for 4-exponent currencies: XXX.XXXX Example: 100.9999
descriptionStringRequired
min: 2 max: 1024
[a-zA-Z0-9!”#$%&'()*+,./:;&@]
Product name
Example: Very important gift – # 9

Response Parameters #

ParameterTypeMandatory, LimitationsDescription
statusStringRequiredPayment status
Example: SETTLED, PENDING, DECLINE
reasonStringOptionalDecline reason translation for unsuccessful payment.
It displays only if the transaction is unsuccessful
Example: The operation was rejected. Please contact the site support
payment_idStringRequired
Up to 255 characters
Transaction ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
dateStringRequired
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
schedule_idStringOptionalSchedule ID for recurring payments
orderObject
numberStringRequired
max: 255
Order ID
Example: order-1234
amountStringRequired
Format: XX.XX
Product price (currency will be defined by the first payment)
Example: 0.19
currencyStringRequired
3 characters
Currency
Example: USD
descriptionStringRequired
max: 1024
Product name
Example: Very important gift – # 9

#

Example Request #

  • Recurring (settled)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/payment/recurring’

    –header ‘Content-Type: application/json’

    –data-raw ‘{ 

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “order”:{

          “number”:”order-1234″,

          “amount”: “0.19”,

          “description”:”very important gift”

    },

        “customer”: {

            “name”: “John Doe”,

            “email”: “success@gmail.com”

        },     

           “recurring_init_trans_id”:”dc66cdd8-d702-11ea-9a2f-0242c0a87002″, 

           “recurring_token”:”9a2f-0242c0a87002″,

           “schedule_id”:”57fddecf-17b9-4d38-9320-a670f0c29ec0″, 

           “hash”:”{{session_hash}}”

    }’

  • Recurring (declined)

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/payment/recurring’

    –header ‘Content-Type: application/json’

    –data-raw ‘{ 

        “payment_id”: “1f34f446-fc45-11ec-a50f-0242ac120004”,

        “date”: “2022-07-05 09:30:34”,

        “status”: “decline”,

        “reason”: “Declined by processing.”,

        “order”: {

            “number”: “order-1234”,

            “amount”: “3.01”,

            “currency”: “USD”,

            “description”: “bloodline”

        },

        “customer”: {

            “name”: “John Doe”,

            “email”: “success@gmail.com”

        }

    }’

#

Example Response #

  • Status Declined

    {

      “status”: “declined”,

      “reason”: “declined by processing”,

      “payment_id”: “dc66cdd8-d702-11ea-9a2f-0242c0a87002”,

      “schedule_id”:”57fddecf-17b9-4d38-9320-a670f0c29ec0″,

      “date”: “2020-08-05 07:41:10”,

      “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “very important gift”

      }

    }

  • Status Settled

    {

      “status”: “settled”,

      “payment_id”: “dc66cdd8-d702-11ea-9a2f-0242c0a87002”,

      “date”: “2020-08-05 07:41:10”,

      “schedule_id”:”57fddecf-17b9-4d38-9320-a670f0c29ec0″,

      “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “very important gift”

      }

    }

Get transaction status #


This request is sent by POST in JSON format.

To get order status you can use one the identifiers:

payment_id – transaction ID in the Payment Platform
order_id – merchant’s transaction ID

/api/v1/payment/status

GET_TRANS_STATUS by payment_id

Request Parameters by payment_id #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
payment_idStringRequired
Up to 255 characters
Payment ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section.
Must be SHA1 of MD5 encoded string (uppercased): payment_id + merchant_pass

Response Parameters by payment_id #

ParameterTypeMandatory, LimitationsDescription
payment_idStringRequired
Up to 255 characters
Payment ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
dateStringRequired
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
statusStringRequiredPayment status: prepare, settled, pending, 3ds, redirect, decline, refund, reversal, void, chargeback
Example: settled
reasonStringOptionalDecline reason translation for unsuccessful payment. It displays only if the transaction is unsuccessful
Example: The operation was rejected. Please contact the site support
recurring_tokenStringOptionalRecurring token (provided if recurring was initialized)
Example: e5f60b35485e
shedule_idStringOptionalSchedule ID for recurring payments. Only for purchase operation
Example: 57fddecf-17b9-4d38-9320-a670f0c29ec0
orderObject
numberStringRequired
Up to 255 characters
Order ID
Example: order-1234
amountStringRequired
Format: XX.XX
Product price
Example: 0.19
currencyStringRequired
Up to 3 characters
Currency
Example: USD
descriptionStringRequired
Up to 1024 characters
Product name
Example: Very important gift
customerObject
nameStringRequiredCustomer’s name
Example: John Doe
emailStringRequiredCustomer’s email address
Example: example@mail.com

Example RequestExample Response

GET_TRANS_STATUS by order_id

Use this request to get the status of the most recent transaction in the order’s transaction subsequence.

It is recommended to send an unique order number (the order.number parameter) in the Authorization request. That way, it will be easier to uniquely identify the payment by order_id. This is especially important if cascading is configured. In this case, several intermediate transactions could be created within one payment.

Request Parameters by order_id #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
order_idStringRequired
Up to 255 characters
Merchant’s Order Number
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section.
Must be SHA1 of MD5 encoded string (uppercased): order_id + merchant_pass

Response Parameters by order_id #

ParameterTypeMandatory, LimitationsDescription
payment_idStringRequired
Up to 255 characters
Transaction ID in Payment Platform
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
dateStringRequired
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
statusStringRequired
Up to 20 characters
Payment status: prepare, settled, pending, 3ds, redirect, decline, refund, reversal, void, chargeback
Example: settled
reasonStringOptional
Up to 1024 characters
Decline reason translation for unsuccessful payment. It displays only if the transaction is unsuccessful
Example: The operation was rejected. Please contact the site support
recurring_tokenStringOptionalRecurring token (provided if recurring was initialized)
Example: e5f60b35485e
shedule_idStringOptionalSchedule ID for recurring payments. Only for purchase operation
Example: 57fddecf-17b9-4d38-9320-a670f0c29ec0
orderObject
numberStringRequired
Up to 255 characters
Merchant’s Order ID
Example: order-1234
amountStringRequired
Format: XX.XX
Product price (currency will be defined by the first payment)
Example: 0.19
currencyStringRequired
Up to 3 characters
Currency
Example: USD
descriptionStringRequired
Up to 1024 characters
Product name or other additional information
Example: Very important gift
customerObject
nameStringRequiredCustomer’s name
Example: John Doe
emailStringRequiredCustomer’s email address
Example: example@mail.com

#

Example Request Parameter by ID #

  • Example Request

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/payment/status’

    –header ‘Content-Type: application/json’

    –data-raw ‘{  

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “order_id”:”63c781cc-de3d-11eb-a1f1-0242ac130006″,

       “hash”:”{{operation_hash}}”

    }

#

Example Response Parameters by ID #

  • Status Settled

    {

        “payment_id”: “24f7401c-fc47-11ec-8d07-0242ac120015”,

        “date”: “2022-07-05 09:45:03”,

        “status”: “settled”,

        “recurring_token”: “e5f60b35485e”,

        “shedule_id “: “57fddecf-17b9-4d38-9320-a670f0c29ec0”,

        “order”: {

            “number”: “f0a51dfa-fc43-11ec-8128-0242ac120004-1”,

            “amount”: “3.01”,

            “currency”: “USD”,

            “description”: “bloodline”

        },

        “customer”: {

            “name”: “John Doe”,

            “email”: “success@gmail.com”

        }

    }

  • Status Decline

    {

      “payment_id”: “03e46e96-de42-11eb-aea7-0242ac140002”,

      “date”: “2021-07-06 10:07:47”,

      “status”: “decline”,

      “reason”: “Declined by processing”,

      “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “Important gift”

      },

      “customer”: {

        “name”: “John Doe”,

        “email”: “test@mail.com”

      }

    }

Refund #


To make refund you can use Refund request. Use payment public ID from Payment Platform in the request.

This request is sent by POST in JSON format.

Refund request

/api/v1/payment/refund

Request Parameters #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
payment_idStringRequired
Up to 255 characters
Payment ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
amountStringRequired
Format: XX.XX, without leading zeroes
Amount to refund. It is required for particular refund.
Example: 0.19
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section.
Must be SHA1 of MD5 encoded string (uppercased): payment.id + amount + merchant.pass

Response Parameters #

ParameterTypeMandatory, LimitationsDescription
payment_idStringRequired Up to 255 charactersTransaction ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
resultStringRequiredRefund request result Example: accepted

Example RequestExample Response: Refund request accepted

Void #


To make a void for an operation which was performed the same financial day you can use Void request.

The Void request is allowed for the payments in SETTLED status only.

Use payment public ID from Payment Platform in the request.

Void request

/api/v1/payment/void

Request Parameters #

ParameterTypeMandatory, LimitationsDescription
merchant_keyStringRequiredKey for Merchant identification
Example: xxxxx-xxxxx-xxxxx
payment_idStringRequired Up to 255 charactersPayment ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
hashStringRequiredSpecial signature to validate your request to Payment Platform Addition in Signature section.
Must be SHA1 of MD5 encoded string (uppercased): payment.id + merchant.pass

Response Parameters #

ParameterTypeMandatory, LimitationsDescription
statusStringRequiredPayment status
Example: VOID / SETTLED
payment_idStringRequired Up to 255 charactersTransaction ID (public)
Example: dc66cdd8-d702-11ea-9a2f-0242c0a87002
dateStringRequired
Format: YYYY-MM-DD hh:mm:ss
Transaction date
Example: 2020-08-05 07:41:10
reasonStringOptionalDecline or error reason (for “sale”, “void “and “refund” operation types). It displays only if the transaction has FAIL status
Example: The operation was rejected. Please contact the site support
orderObject
numberStringRequiredOrder ID
Example: order-1234
amountStringRequiredProduct price
Example: 0.19
currencyStringRequired Up to 3 charactersCurrency
Example: USD
descriptionStringRequired Up to 1024 charactersProduct name
Example: Very important gift

#

Void Example Request #

  • Example Request

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/payment/void’

    –header ‘Content-Type: application/json’

    –data-raw ‘{  

       “merchant_key”:”xxxxx-xxxxx-xxxxx”,

       “payment_id”:”63c781cc-de3d-11eb-a1f1-0242ac130006″,

       “hash”:”{{operation_hash}}”

    }

  • Example Response: Void successful

    {

      “status”: “SUCCESS”, 

      “payment_status”: “void”,

      “payment_id”: “dc66cdd8-d702-11ea-9a2f-0242c0a87002”,

      “date”: “2020-08-05 07:41:10”,

      “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “very important gift”

      }

    }

  • Example Response: Void failed

    {

      “status”: “FAIL”, 

      “payment_status”: “settled”,

      “payment_id”: “dc66cdd8-d702-11ea-9a2f-0242c0a87002”,

      “date”: “2020-08-05 07:41:10”,

      “reason”: “Declined by processing”,

       “order”: {

        “number”: “order-1234”,

        “amount”: “0.19”,

        “currency”: “USD”,

        “description”: “very important gift”

      }

    }

Signature #


Sign is signature rule used either to validate your requests to payment platform or to validate callback from payment platform to your system.

Authentication Signature #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

*sha1(md5(strtoupper(id.order.amount.currency.description.PASSWORD)))

// Use the CryptoJSvar

Example for JS #

var to_md5 = order.number + order.amount + order.currency + order.description + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Get Transaction Status Signature (by payment_id) #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

*sha1(md5(strtoupper))

// Use the CryptoJSvar

Example for JS #

var to_md5 = payment.id + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Get Transaction Status Signature (by order_id) #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

*sha1(md5(strtoupper))

// Use the CryptoJSvar

Example for JS #

var to_md5 = order.id + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Refund Signature #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString()); *sha1(md5(strtoupper))

// Use the CryptoJSvar

Example for JS #

var to_md5 = payment.id + amount + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Void Signature #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString()); *sha1(md5(strtoupper))

// Use the CryptoJSvar

Example for JS #

var to_md5 = payment.id + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Recurring Signature #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

*sha1(md5(strtoupper(recurring_init_trans_id.recurring_token.order_id.amount.description.merchant.pass)))

// Use the CryptoJS

Example for JS #

var to_md5 = recurring_init_trans_id + recurring_token + order.number + order.amount + order.description + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Signature for return #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString()); *sha1(md5(strtoupper(payment_public_id.order_id.amount.currency.description.PASSWORD)))

Example for JS

var to_md5 = payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Callback Signature #

It must be SHA1 of MD5 encoded string and calculated by the formula below:

hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString()); *sha1(md5(strtoupper(payment_public_id.order_id.amount.currency.description.PASSWORD)))

Example for JS #

var to_md5 = payment_public_id + order.number + order.amount + order.currency + order.description + merchant.pass;

// Use the CryptoJS

var hash = CryptoJS.SHA1(CryptoJS.MD5(to_md5.toUpperCase()).toString());

var result = CryptoJS.enc.Hex.stringify(hash);

Testing #


You can test your integration. To do the test you need to perform the actions with the API using (in test mode). For instance, send the request and receive the response with a link on the Checkout page.
To mark your transactions as test in the system, you should use Merchant Test Key as value of the merchant_key parameter. You can contact your administrator to make sure that you have the necessary settings to work with test transactions.

Use the following test data to emulate the different scenarios.

Scenario: SUCCESS payment

Card data:

Card number 4111 1111 1111 1111
Expiry Date 01/38
CVV2 any 3 digits

⚠️ Use that card data to create recurring payments and get a recurring token for the initial recurring. Testing recurring payments does not work with other test cards.

Result: customer is redirected to the “success_URL”

Scenario: FAILED payment (decline)

Card data:

Card number 4111 1111 1111 1111
Expiry Date 02/38
CVV2 any 3 digits

Result: customer gets an error message: Declined by processing.

Scenario: SUCCESS 3DS payment

Card data:

Card number 4111 1111 1111 1111
Expiry Date 05/38
CVV2 any 3 digits

Result: customer is redirected to the “success_URL” after 3DS verification

Scenario: FAILED 3DS payment

Card data:

Card number 4111 1111 1111 1111
Expiry Date 06/38
CVV2 any 3 digits

Result: customer gets unsuccessful sale after 3DS verification

Scenario: FAILED payment (Luhn algorithm)

Card data:

Card number 1111 2222 3333 4444
Expiry Date 01/38
CVV2 any 3 digits

Result: customer gets an error message: Bad Request. Brand of card does not support.

Payment methods #


You can choose the payment methods that you want to display on the payment form. Use methods array in the Authentication request and specify the values that correspond to the payment methods. As well, you can use the value of the payment method to add specific parameters to the Authentification request for the paramaters object. These parameters will be sent to the acquirer to pass the necessary data for successful payment.

card #

If the payer chooses the card payment method, fields with card data will be displayed on the Checkout page.

For some connector services, it is necessary to send additional parameters in the Authenticaion request for the paramaters object (for more information, contact your manager).

Additional parameters – Set 1 (BNG) #

ParameterTypeMandatoryDescription
bnrg_installm_defNumeric justified to 2 digitsRequiredIndicates the number of months that will elapse from the purchase until the total or partial charge is made to the cardholder’s account (initial deferral).
Possible values:
01 – one month
00 – no delay initial
bnrg_installm_monthsNumeric justified to 2 digitsRequiredIndicates the number of monthly payments in which the total amount of the transaction will be divided.
Example: 03 – 3 months
bnrg_installm_planNumeric justified to 2 digitsRequiredIndicates if the promotion It will be ́ with interest or without interest.
Possible values:
03 – no interest
05 – with interest
07 – defer only initial.

#

Card Authentication Request Example #

  • Authentication request example

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

        “merchant_key”: “xxxxx-xxxxx-xxxxx”,

        “operation”: “purchase”,

        “methods”: [

            “card”

        ],

            “parameters”: {

                    “card”: {

                “bnrg_installm_def”: “03”,

                “bnrg_installm_months”: “03”,

                “bnrg_installm_plan”: “03”

            }

        },   

        “order”: {

            “number”: “order-1234”,

            “amount”: “1000.19”,

            “currency”: “MXN”,

            “description”: “Important gift”

        },

        “cancel_url”: “https://example.com/cancel”,

        “success_url”: “https://example.com/success”,

         “customer”: {

            “name”: “John Doe”,

            “email”: “test@gmail.com”

        },

        “billing_address”: {

            “country”: “US”,

            “state”: “CA”,

            “city”: “Los Angeles”,

            “address”: “Moor Building 35274”,

            “zip”: “123456”,

            “phone”: “347771112233”

        },

        “hash”: “{{session_hash}}”,

    }

Additional parameters – Set 2 (FCP) #

ParameterTypeMandatoryDescription
document_typeStringRequiredType of the document number specified above. Possibe values: cpf
document_numberStringRequiredClient’s document number
social_nameStringRequiredClient’s social name
fiscal_countryStringRequiredAn alpha-2 country code of the customer’s tax country

#

Additional parameters – Set 2 (FCP) – Reuest Example #

  • Authentication request example

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

        “merchant_key”: “xxxxx-xxxxx-xxxxx”,

        “operation”: “purchase”,

        “methods”: [

            “card”

        ],

            “parameters”: {

                    “card”: {

                “document_type”: “cpf”,

                “document_number”: “231.002.999-00”,

                “social_name”: “Harry Potter”,

                “fiscal_country”: “BR”,

                “toBankAccountId”: “a1a1134a-32c6-442c-90c9-66b587d5be00”

            }

        },   

        “order”: {

            “number”: “order-1234”,

            “amount”: “1000.19”,

            “currency”: “BRL”,

            “description”: “Important gift”

        },

        “cancel_url”: “https://example.com/cancel”,

        “success_url”: “https://example.com/success”,

         “customer”: {

            “name”: “John Doe”,

            “email”: “test@gmail.com”

        },

        “billing_address”: {

            “country”: “US”,

            “state”: “CA”,

            “city”: “Los Angeles”,

            “address”: “Moor Building 35274”,

            “zip”: “123456”,

            “phone”: “347771112233”

        },

        “hash”: “{{session_hash}}”,

    }’

Additional parameters – Set 3 (LBP) #

ParameterTypeMandatoryDescription
descriptorString (20 characters)OptionalTransaction descriptor

#

Additional parameters – Set 3 (LBP) – Authentication #

  • Authentication request example

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

        “merchant_key”: “xxxxx-xxxxx-xxxxx”,

        “operation”: “purchase”,

        “methods”: [

            “card”

        ],

            “parameters”: {

                    “card”: {

                “descriptor”: “Testy International LTD”

            }

        },   

        “order”: {

            “number”: “order-1234”,

            “amount”: “1000.19”,

            “currency”: “BRL”,

            “description”: “Important gift”

        },

        “cancel_url”: “https://example.com/cancel”,

        “success_url”: “https://example.com/success”,

         “customer”: {

            “name”: “John Doe”,

            “email”: “test@gmail.com”

        },

        “billing_address”: {

            “country”: “US”,

            “state”: “CA”,

            “city”: “Los Angeles”,

            “address”: “Moor Building 35274”,

            “zip”: “123456”,

            “phone”: “347771112233”

        },

        “hash”: “{{session_hash}}”,

    }

Additional parameters – set 4 TWD #

ParameterTypeMandatoryDescription
customer_phoneStringOptionalPhone number of the customer.
customer_telnoccStringOptionalCountry phone code of the customer.
shipping_street1StringOptionalBuilding name, and/or street name of the customer’s shipping address.
shipping_cityStringOptionalCity of the customer’s shipping address.
shipping_stateStringOptionalState or region of the customer’s shipping address.
shipping_postcodeStringOptionalPostal code/ Zip code of the customer’s shipping address.
Max – 9 digits.
shipping_countryStringOptionalCountry of the shipping address.
3-digits code

#

Additional parameters – set 4 TWD – Authentication #

  • Authentication request example

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

      “merchant_key”: “xxxxx-xxxxx-xxxxx”,

      “operation”: “purchase”,

      “methods”: [

        “card”

      ],

      “parameters”: {

        “card”: {

          “customer_phone”: “1234567890”,

          “customer_telnocc “: “123”,

          “shipping_street1″: ” Moor Building 35274″,

          “shipping_ city”: “Los Angeles”,

          “shipping_state”: “CA”,

          “shipping_postcode”: “809654321”,

          “shipping_ country”: “US”

        }

      },

      “order”: {

        “number”: “order-1234”,

        “amount”: “1000.19”,

        “currency”: “USD”,

        “description”: “Important gift”

      },

      “cancel_url”: “https://example.com/cancel”,

      “success_url”: “https://example.com/success”,

      “customer”: {

        “name”: “John Doe”,

        “email”: “test@gmail.com”

      },

      “billing_address”: {

        “country”: “US”,

        “state”: “CA”,

        “city”: “Los Angeles”,

        “address”: “Moor Building 35274”,

        “zip”: “123456”,

        “phone”: “347771112233”

      },

      “hash”: “{{session_hash}}”

    }

Additional parameters – Set 5 (ERS) #

This set should be used for debit operation.

ParameterTypeMandatoryDescription
payer_identity_typeStringOptionalThe type of Senders identification document
payer_identity_idStringOptionalThe number of Senders identification document
payer_identity_countryStringOptionalThe country of issuance of the Senders identification document
payer_identity_exp_dateStringOptionalThe expiration date of the Senders identification document
payer_nationalityStringOptionalSenders nationality
payer_country_of_birthStringOptionalSenders country of birth
payee_first_nameStringOptionalReceivers first name
payer_last_nameStringOptionalReceivers last name
payee_middle_nameStringOptionalReceivers middle name
payee_addressStringOptionalReceivers street
payee_cityStringOptionalReceivers city
payee_stateStringOptionalReceivers state
payee_countryStringOptionalReceivers country
payee_zipStringOptionalReceivers postal code
payee_phoneStringOptionalReceivers phone number
payee_birth_dateStringOptionalReceivers date of birth
payee_identity_typeStringOptionalThe type of Receivers identification document
payee_identity_idStringOptionalThe number of Receivers identification document
payee_identity_countryStringOptionalThe country of issuance of Receivers identification document
payee_identity_exp_dateStringOptionalThe expiration date of Receivers identification document
payee_nationalityStringOptionalReceivers nationality
payee_country_of_birthStringOptionalReceivers country of birth

#

Additional parameters – Set 5 (ERS) – Authentication #

  • Authentication request example

    curl –location -g –request POST ‘{{CHECKOUT_HOST}}/api/v1/session’

    –header ‘Content-Type: application/json’

    –data-raw ‘{

      “merchant_key”: “xxxxx-xxxxx-xxxxx”,

      “operation”: “purchase”,

      “methods”: [

        “card”

      ],

      “parameters”: {

        “card”: {

          “payer_identity_type”: “Passport”,

          “payer_identity_id”: “ABC123456”,

          “payer_identity_country”: “KZ”,

          “payer_identity_exp_date”: “2026-05-15”,

          “payer_nationality”: “Kazakhstani”,

          “payer_country_of_birth”: “Kazakhstan”,

          “payee_first_name”: “John”,

          “payer_last_name”: “Doe”,

          “payee_middle_name”: “Smith”,

          “payee_address”: “123 Main Street”,

          “payee_city”: “Almaty”,

          “payee_state”: “Almaty Province”,

          “payee_country”: “Kazakhstan”,

          “payee_zip”: “050000”,

          “payee_phone”: “77123456789”,

          “payee_birth_date”: “1990-01-01”,

          “payee_identity_type”: “National ID”,

          “payee_identity_id”: “XYZ987654”,

          “payee_identity_country”: “Kazakhstan”,

          “payee_identity_exp_date”: “2030-12-31”,

          “payee_nationality”: “Kazakhstani”,

          “payee_country_of_birth”: “Kazakhstan”

        }

      },

      “order”: {

        “number”: “order-1234”,

        “amount”: “1000.19”,

        “currency”: “USD”,

        “description”: “Important gift”

      },

      “cancel_url”: “https://example.com/cancel”,

      “success_url”: “https://example.com/success”,

      “customer”: {

        “name”: “John Doe”,

        “email”: “test@gmail.com”

      },

      “billing_address”: {

        “country”: “US”,

        “state”: “CA”,

        “city”: “Los Angeles”,

        “address”: “Moor Building 35274”,

        “zip”: “123456”,

        “phone”: “347771112233”

      },

      “hash”: “{{session_hash}}”

    }

Apple Pay #

payment_method = applepay

To use applepay payment method, you should configure the Wallets setting in the admin dashboard. Make sure that the payment provider has confirmed the Apple Pay certificates and your domain, which has been verified in the Apple Pay account.

To provide the payers with the possibility of Apple Pay payments you can connect to the Checkout or work directly via S2S VPG protocol.

If you work via Checkout page you don’t need any additional development on your side.

If you work via S2S VPG protocol, you must pass you must be able to obtain Apple Pay payment token that must be passed in the SALE request.

Regardless of the protocol you have to make settings in the admin panel and set the following configurations:

• Merchant Identifier, Country and Shop Name – according to the merchant’s data from Apple Pay Developper account
• Certificate and Private Key – generated Apple Pay certificate and private key
• Merchant Capabilities and Supported Networks – configurations for Apple Pay payments
• Processing Private Key – private key that uses for payment token decryption (requires if payment provider supports).

⚠️ Pay attention

Before using Apple Pay via S2S VPG protocol, you should review next section carefully.
There is a description on how you can obtain Apple Pay payment token (it refers to the official Apple Pay documentation)

  1. Each payment must be checked for Apple Pay accessibility
  2. Show Apple Pay button to your payers
  3. Validate the merchant identity
  4. Provide a payment request and create a session
  5. Receive Apple Pay payment token (paymentData object)

After you implement Apple Pay payment tokens generation on your site, you need to pass for the SALE request:

brand = applepay
parameters[paymentToken] – Apple Pay payment token

#

Apple Pay Request Example #

  • Request example

    curl –d “action=SALE&client_key=c2b8fb04-110f-11ea-bcd3-0242c0a85004&brand=applepay&order_id=ORDER12345&order_amount=100

    &order_currency=USD&order_description=Product&payer_ip=127.0.0.0&return_url=https//:apple.com&identifier=0987654321

    &parameters[paymentToken]= {“paymentData”:{“data”:”sSnxW26Va2jj0+QqIrK6zyBve6z3L5j6mNk3iaVcfUwmz76/bu8008BfkRRp7wZvsUtmrMbaHv0MCNCTW70QLAvLCw61kNidMNEzu2r4rGOXUGJQMMvgPgjXuRafWA8628HcOrrrvAtoljlaAbm/8ucZVNhDdOFR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3T2EyN1H7EP7gAAAAAAAA”,”header”:{“publicKeyHash”:”nNc4Fl8dRqE+1J/ibwLTPoXuzYtF3ZJlu7D5CUBZc5w=”,”ephemeralPublicKey”:”MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6ah1mcW4JkG9jdptrUmprzlOjvF3iK7JOt3wom28HS1MLwrWIKNY7R3Mmp/tJqMeInAwZZWgXCXXmnujA3Bcig==”,”transactionId”:”d71de566079d19b44545fa7aa3be682f916f995f5de585021fa9af8cb115a461″},”version”:”EC_v1″},”paymentMethod”:{“displayName”:”Visa 6244″,”network”:”Visa”,”type”:”credit”},”transactionIdentifier”:”d71de566079d19b44545fa7aa3be682f916f995f5de585021fa9af8cb115a461″}”,”transactionId”:”5145cb84015f49a24e9add4752737b6b3124e9cf98f3ab247c4f4a8017f17286″},”version”:”EC_v1″},”paymentMethod”:{“displayName”:”Visa 0224″,”network”:”Visa”,”type”:”debit”},”transactionIdentifier”:”5145CB84015F49A24E9ADD4752737B6B3124E9CF98F3AB247C4F4A8017F17286″}

    [&hash=](http://client.site.com/return.php&recurring_init=Y&hash=02cdb60b5c923e06c1b1d71da94b2a39)”a1a6de416405ada72bb47a49176471dc”[ https://test.apiurl.com](https://test.apiurl.com/) -k

We also recommend checking out the demo provided by Apple for Apple Pay: https://applepaydemo.apple.com/

Google Pay #

To provide the payers with the possibility of Google Pay™ payment you can connect to the Checkout or work directly via S2S VPG protocol. Before using googlepay payment method, you should review this section carefully to meet all the Google Pay™ requirements:

  1. Overview the documentation on Google Pay Integration first:
    • for sites – Google Pay Web developer documentation
    • for Android app – Google Pay Android developer documentation
  2. Make sure you complete all the items on the integration checklist:
    • for sites – Google Pay Web integration checklist
    • for Android app – Google Pay Android integration checklist
  3. To brand your site with Google Pay elements, you must meet the requirements:
    • for sites – Google Pay Web Brand Guidelines
    • for Android app – Google Pay Android brand guidelines
  4. The merchants must adhere to the Google Pay APIs Acceptable Use Policy and accept the terms that the Google Pay API Terms of Service defines.

To work with Google Pay™ payments through gateway, you need to make settings in the admin panel. You can set the following configurations:
• choose the environment: TEST or PRODUCTION
• specify “Allowed Auth Method” – PAN_ONLY or CRYPTOGRAM_3DS
• determine “Supported Networks” – MASTERCARD, VISA, AMEX, DISCOVER, JCB
These configuration will be applied and used when platform interacts with Google Pay.
If you are using Checkout integration to work with googlepay payment method, it requires no additional code implementation.

If you are using S2S VPG integration to work with googlepay payment method, you need to pass the additional parameters in the SALE request:
brand = googlepay
parameters[paymentToken] – Google Pay payment token.
To obtain Google Pay payment token you should get the PaymentData according to the Google Pay API Integration documentation (see the links above).
Pass the following parameters to receive PaymentData:
allowPaymentMethods: CARD
tokenizationSpecification = { “type”: “PAYMENT_GATEWAY”}
allowedCardNetworks = [‘MASTERCARD’, ‘VISA’, ‘AMEX’, ‘DISCOVER’, ‘JCB’];
allowedCardAuthMethods = [‘PAN_ONLY’, ‘CRYPTOGRAM_3DS’];
gateway = value provided by your support manager
gatewayMerchantId = CLIENT_KEY (API key)

#

Google Pay PaymentData #

  • Example of data to get PaymentData

    {

        “apiVersionMinor”: 0,

        “apiVersion”: 2,

        “paymentMethodData”: {

            “description”: “Mastercard •••• 5179”,

            “tokenizationData”: {

                “type”: “PAYMENT_GATEWAY”,

                “token”: {

                    “signature”: “MEYCIQC+IHxUu9Wwra2Vu6tBa2wJPCMT3pWtN1VphLGYtNVLLwIhAOkdbNje//eLrXVc+n6LOlc4PqxWOUcqwrmki/CNA1ur”,

                    “intermediateSigningKey”: {

                        “signedKey”: “{“keyValue”:”MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEwhRrvGB0kZ1248MEJAPwX0YfrQInhyyRM7nyGFjQuzGSViZG3QC9NMvXR9Zd6uVcVzAz+6K/+NEGIWbX8zbk6A\u003d\u003d”,”keyExpiration”:”1571208568000″}”,

                        “signatures”: [

                            “MEUCIQCR6vIEiyHB8qmlho4/tLd7W8CIGrZDJlCI48CBHeFPvQIgLZJIe4cZv6pYtYYa56QCI/vvg1GqXTP3bTBjO49r5mI=”

                        ]

                    },

                    “protocolVersion”: “ECv2”,

                    “signedMessage”: {

                        “encryptedMessage”: “k85CGUMmd5PaGmQlHFqHc0HrDZmjM1yG82rFB/p31ZyUleN5nihzjOZif/BKXwg3XA2oLXqBSSWcAdfZwXxCEOqvAQE+kpTC7qVO4wTPip6RruraT6vO9M9FtIf0kcqzYSAN7pl1SUA5jC9rHrqucPoh0Sspup78SWBt8TnmVKC9O3sQhIZ3SMoGOG4mdjtIrgCwWH2cbrxUH0dHAqOe5ANGOY/mII4nTEp7xaKu41hK/kFE15zVyqgPJXP9bPxzMVk/ozEZSfhSzVTS+9stjkUkT5EibKB3O1bbxyybKcGQ5vxBOtNOBKKdNuqNmN2eEK3UbSKb1M3gv45gT9cCeEvlzO7Wg0N100vUBp9RPDN9TH4tj4w578sWFKfTi6FsSrZB27SGWcU0EaKHO9buo94mRBY5yqffF3bKg5mAMPzjDhyHSujqWKAs9C5fBzMEuEr2z7A23kfLqBceH5uS9LJMiZyVKCwfpY9u2XyCjKdp7Iu003d”,

                        “ephemeralPublicKey”: “BAMDAtfgcPNuzItrwGLigGj3rtxmyHhZLwx1B4RJZ2oo11jpFf3SA6a3utryCMmlCEcqLfLn6WDH2ArrNBGnEwu003d”,

                        “tag”: “TqhZXY53Fe4QBKafm6NqS6EzwVeiKXhRlp8NeWrAu003d”

                    }

                }

            },

            “type”: “CARD”,

            “info”: {

                “cardNetwork”: “MASTERCARD”,

                “cardDetails”: “5179”

            }

        }

    }

As a result you receive you will be returned a dataset with PaymentData.token object contains data that you need add to the SALE request as parameters[paymentToken] parameter.

#

Google Pay Request Example #

  • Request Example

    curl –d “action=SALE&client_key=c2b8fb04-110f-11ea-bcd3-0242c0a85004&brand=googlepay&order_id=ORDER12345&order_amount=100

    &order_currency=USD&order_description=Product&payer_ip=127.0.0.0&return_url=https//:apple.com&identifier=0987654321&

    parameters[paymentToken] = {“apiVersionMinor”:0,”apiVersion”:2,”paymentMethodData”:{“description”:”Visa u2006u2022u2022u2022u2022u20065237″,”tokenizationData”:{“type”:”PAYMENT_GATEWAY”,”token”:”{“signature”:”MEUCIQCmG9CSxMYyrdHr93/0VPjgM2tLy6t/+kwTngBtHCguNAIgfsh6MWiaYtoEfkWJp0KpmiyWTu6f/845UXU96ERnxT0\u003d”,”intermediateSigningKey”:{“signedKey”:”{\”keyValue\”:\”MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUDf+weSWhii31Exn8d3WHufrnsiQP4weDoRQgF8VlaBbdTxm5xlxrfseZU3IDaUGKwwpNTRhkWVo/+arRrXf1A\\u003d\\u003d\”,\”keyExpiration\”:\”1706136902000\”}”,”signatures”:[“MEYCIQDfIHM6RIj7HEE8y1T6oSOVbd8iDCtTFSmJidRphrOP/wIhAPRjdHe1ulwr1gUEzxLGdA73dEoc6IbqHoSJJqtEMSYk”]},”protocolVersion”:”ECv2″,”signedMessage”:”{\”encryptedMessage\”:\”gNZVNFqhgZc8WFPjCljFC4NtSWpLI9NyEEKuNnPoMtZM4yfELLf34vtfL1lWORuxup+sCQ+CPEdPFZJsFmZtox8sEsNTfDFP0sJOfGwA10+0/2b8NeewNjbzU5VIyc+nwtn2Au3XgoLDYgDyPBJ6exuaY2yjTR3/UpeHK5JEIgbmN+fdPCOPngIzRkGURTauIvDibQUZeNjDhzHgebcoWF5m0gs2jO1jkAaSrajDa8g6emin2aNXImt41Rk0+hk9kOi6QqZavo2wV4+Lf17o9HlNWERNVKFqhECJ57Rkp7MRlzQyFyaIhfGkynY/KHJNc8HZ04CWyx1Dco0lARiLNIfVF2mploPf8Va8DcCC67FbLLOH0YoY3UmWGLlGY8qNmpsMsL5ULEeSUGMLCxr4mhZZ/C4rBf7tDcz/Auh9qkbsz7rNsa/9l88jc5UcIMHVeTOOXjHnGR3yB4O5AFKvOob9XaDaKDJjXlUtycynCKu9Mo03C2AFGqkzBNh/I8pCLKiqzd4ntauyKeLDvNqTaLLbZOVoqRN4Z0gtUfL7yaYqmSiAgg0N+lOiM/qsqoKFrxiATduxl5kgxffXQAY\\u003d\”,\”ephemeralPublicKey\”:\”BPluTrJ3LqHzodjl0ZXjIRy2XKWWLibakj4hdf9vlnSsGR1kzdTpyFitSJ9DqyKdxmCbyAh2A7gcJf5XlcX3k9k\\u003d\”,\”tag\”:\”br8r3h8GF5jQwgfxAcNH/nQXt5+ySEUuaHRmpqYqWek\\u003d\”}”}”},”type”:”CARD”,”info”:{“cardNetwork”:”VISA”,”cardDetails”:”5237″}}}

    [&hash=](http://client.site.com/return.php&recurring_init=Y&hash=02cdb60b5c923e06c1b1d71da94b2a39)”a1a6de416405ada72bb47a49176471dc”[ https://test.apiurl.com](https://test.apiurl.com/) -k

       

⚠️ Pay attention

in the case of PAN_ONLY, the responsibility for passing 3ds is transferred to the acquirer, through which the payment is processed

paypal #

payment_method = paypal

pix #

If the payer chooses the pix payment method, the field for entering the document number will be additionally displayed on the Checkout page. After the Pay button is clicked, the QR-code could be displayed to the payer. The payer should use the code to finish the payment.

sepa #

If the payer chooses the sepa payment method, the redirection to another page will happen to finish the payment.

skrill #

If the payer chooses the skrill payment method, the redirection to another page will happen to finish the payment.

stripe-js #

If the payer chooses the stripe-js payment method, the redirection to another page will happen to finish the payment.

unipay #

payment_method = unipay

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top