S2S VPG

S2S VPG #

Version: 3.3.4
Released: 2024/07/01

Copyrighted by lddPay

Introduction #


This document describes integration procedures and VIRTUAL PAYMENT GATEWAY protocol usage for e-commerce merchants.

VIRTUAL PAYMENT GATEWAY protocol implements acquiring payments (purchases) with using specific API interaction.

Integration Process #


Integration process #

With all Payment Platform POST requests at Notification URL the Merchant must return the string OK if he/she successfully received data or return ERROR.

⚠️ 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, you will receive callbacks for the first payment attempt, where the decline occurred and which caused the cascading, as well as for the last payment attempt, where the final status of the order (settled or declined) is determined. Additionally, for the last attempt, the callback will include only the final status. That is, callbacks regarding 3DS or redirects will not be sent. Callbacks for intermediate attempts (between the first decline and the last payment attempt) are not sent.

Client Registration #

Before you get an account to access Payment Platform, you must provide the following data to the Payment Platform administrator.

DataDescription
Callback URLURL which will be receiving the notifications of the processing results of your request to Payment Platform
Contact e-mailClient`s contact email
IP ListList of your IP addresses, from which requests to Payment Platform will be sent.

With all Payment Platform POST requests at Callback URL the Client must return the string “OK” if he/she successfully received data or return “ERROR”.

You should get the following information from administrator to begin working with the Payment Platform.

ParameterDescription
CLIENT_KEYUnique key to identify the account in Payment Platform (used as request parameter). In the administration platform this parameter corresponds to the “Merchant key” field
PASSWORDPassword for Client authentication in Payment Platform (used for calculating hash parameter). In the administration platform this parameter corresponds to the “Password” field
PAYMENT_URLURL to request the Payment

Protocol Mapping #

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

Payment Platform Interaction #

For the transaction you must send the server to server HTTPS POST request to the Payment Platform URL (PAYMENT_URL). In response Payment Platform will return the JSON (http://json.org/)) encoded string.

List of possible actions in Payment Platform #

When you make request to Payment Platform, you need to specify action that needs to be done. Possible actions are:

ActionDescription
SALECreates SALE transaction
CREDITVOIDCreates REFUND transaction
VOIDCreates VOID transaction
CREDIT2VIRTUALCreates CREDIT2VIRTUAL transaction
GET_TRANS_STATUSGets status of transaction in Payment Platform

List of possible transaction results and statuses #

Result – value that system returns on request. Possible results are:

ResultDescription
SUCCESSAction was successfully completed in Payment Platform
DECLINEDResult of unsuccessful action in Payment Platform
REDIRECTAdditional action required from requester
ACCEPTEDAction was accepted by Payment Platform, but will be completed later
ERRORRequest has errors and was not validated by Payment Platform

Status – actual status of transaction in Payment Platform. Possible statuses are:

StatusDescription
PREPAREStatus is undetermined, final status will be sent in callback
REDIRECTThe transaction awaits SALE
SETTLEDSuccessful transaction
VOIDTransaction for which void was made
REFUNDTransaction for which refund was made
DECLINEDNot successful transaction

Transactions requests #

SALE request #


Use SALE request to create a payment in the Payment Platform.

If you want to send a payment for the specific sub-account (channel), you need to use channel_id that specified in your Payment Platform account settings.

This request is sent by POST in the background (e.g. through PHP CURL).

Request Parameters #

ParameterDescriptionLimitationsRequired
actionAction to perform (=SALE)= SALE+
client_keyUnique client key (CLIENT_KEY)+
channel_idPayment channel (Sub-account)String up to 16 characters
brandBrand through which the transaction is performedString up to 36 characters(Appendix B)+
order_idTransaction ID in the Clients systemString up to 255 characters+
order_amountThe amount of the transactionFormat 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
+
order_currencyCurrency3-letter code+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
identifierExtra parameter for transaction. It could be token, account information, additional descriptor etcString up to 255 characters+
payer_first_nameCustomer’s nameString up to 32 characters
payer_last_nameCustomer’s surnameString up to 32 characters
payer_addressCustomer’s addressString up to 255 characters
payer_house_numberCustomer’s house or building numberString up to 9 characters
payer_countryCustomer’s country2-letter code
payer_stateCustomer’s stateString up to 32 characters
payer_cityCustomer’s cityString up to 40 characters
payer_districtCustomer’s district of cityString up to 32 characters
payer_zipZIP-code of the CustomerString up to 32 characters
payer_emailCustomer’s emailString up to 256 characters
payer_phoneCustomer’s phoneString up to 32 characters
payer_birth_dateCustomer’s birthdayDate format is “YYYY-MM-DD”
payer_ipIP-address of the Customer. Both versions, IPv4 and IPv6, can be used. If you are sending IPv6, make sure the payment provider that processes the payments supports it.XXX.XXX.XXX.XXX+
return_urlURL to which Customer should be returned after operation in third-party systemString up to 1024 characters+
parametersArray of the parameters for specific brand(Appendix B)+
custom_dataArray with the custom data
This block duplicates the arbitrary parameters that were passed in the payment request
Format:
custom_data [param1]: value1
custom_data [param2]: value2
custom_data [paramN]: valueN
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Sale signature.+

Response Parameters #

You will get JSON encoded string with transaction result.

Successful sale response

ParameterDescription
actionSALE
resultSUCCESS
statusSETTLED
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customers support web-site
amountOrder amount
currencyCurrency

Unsuccessful sale response

ParameterDescription
actionSALE
resultDECLINED
statusDECLINED
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined
amountOrder amount
currencyCurrency

Redirect transaction response

ParameterDescription
actionSALE
resultREDIRECT
statusREDIRECT
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
redirect_urlURL to which the Client should redirect the Customer
redirect_paramsArray of specific parameters
redirect_methodThe method of transferring parameters (POST or GET)
amountOrder
currencyCurrency

Undefined sale response

ParameterDescription
actionSALE
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank. In most cases, this is the Customers support web-site
amountOrder amount
currencyCurrency

Callback parameters #

Successful sale response

ParameterDescription
actionSALE
resultSUCCESS
statusSETTLED
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Client’s system
trans_dateTransaction date in the Payment Platform
descriptorThis is a string which the owner of the credit card will see in the statement from the bank.In most cases, this is the Customers support web-site
exchange_rateRate used to make exchange
exchange_rate_baseThe rate used in the double conversion to convert the original currency to the base currency
exchange_currencyOriginal currency
exchange_amountOriginal amount
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request

Unsuccessful sale response

ParameterDescription
actionSALE
resultDECLINED
statusDECLINED
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Client’s system
trans_dateTransaction date in the Payment Platform
descriptorTransaction date in the Payment Platform
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request

Redirect transaction response

ParameterDescription
actionSALE
resultREDIRECT
statusREDIRECT
order_idTransaction ID in the Client’s system
trans_idTransaction ID in the Client’s system
trans_dateTransaction date in the Payment Platform
redirect_urlURL to which the Client should redirect the Customer
redirect_paramsArray parameters
redirect_methodThe method of transferring parameters (POST or GET)
hashSpecial signature to validate callback. See Appendix A, Callback signature.
amountOrder amount
currencyCurrency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request

Undefined sale response

ParameterDescription
actionSALE
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorTDescriptor from the bank, the same as cardholder will see in the bank statement
amountOrder amount
currencyOrder currency
custom_dataObject with the custom data.
This block duplicates the arbitrary parameters that were passed in the payment request
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

CREDIT2VIRTUAL request #


CREDIT2VIRTUAL request is used to create CREDIT2VIRTUAL transaction in Payment Platform.

This operation transfers money from merchants account to customer account.

If you want to send a payout for the specific sub-account (channel), you need to use channel_id that specified in your Payment Platform account settings.

This request is sent by POST in the background (e.g., through PHP CURL).

Request Parameters #

ParameterDescriptionValuesRequired
actionCREDIT2VIRTUALCREDIT2VIRTUAL+
client_keyUnique client key (CLIENT_KEY)+
channel_idPayment channel (Sub-account)String up to 16 characters
brandBrand through which the transaction is performedString up to 36 characters+
order_idOrder ID in the Clients systemString up to 255 characters+
order_amountThe amount of the transactionFormat 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
+
order_currencyCurrency3-letter code+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
parametersArray of the parameters for specific brand(Appendix C)+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Credit2Virtual signature.+

Response Parameters #

You will get JSON encoded string with transaction result.

Successful response

ParameterDescription
actionCREDIT2VIRTUAL
resultSUCCESS
statusSETTLED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
amountOrder amount
currencyCurrency

#

CREDIT2VIRTUAL Response Parameter #

  • Response Example (Successful result)

    {

    “action”: “CREDIT2VIRTUAL”,

    “result”: “SUCCESS”,

    “status”: “SETTLED”,

    “order_id”: “1613117050”,

    “trans_id”: “e5098d62-6d08-11eb-9da3-0242ac120013”,

    “trans_date”: “2021-02-12 08:04:15”,

    “amount”: “0.19”,

    “currency”: “USD”

    }

Unsuccessful response

ParameterDescription
actionCREDIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined
amountOrder amount
currencyCurrency

#

CREDIT2VIRTUAL Unsuccessful Response #

  • Response Example (Unsuccessful result)

    {

    “action”: “CREDIT2VIRTUAL”,

    “result”: “DECLINED”,

    “status”: “DECLINED”,

    “order_id”: “1613117050”,

    “trans_id”: “e5098d62-6d08-11eb-9da3-0242ac120013”,

    “trans_date”: “2021-02-12 08:04:15”,

    “decline_reason”: “Declined by procesing”,

    “amount”: “0.19”,

    “currency”: “USD”

    }

Undefined response

ParameterDescription
actionCREDIT2VIRTUAL
resultUNDEFINED
statusPREPARE
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
amountOrder amount
currencyCurrency

#

CREDIT2VIRTUAL Undefined Response #

  • Response Example (Undefined result)

    {

    “action”: “CREDIT2VIRTUAL”,

    “result”: “UNDEFINED”,

    “status”: “PREPARE”,

    “order_id”: “1613117050”,

    “trans_id”: “e5098d62-6d08-11eb-9da3-0242ac120013”,

    “trans_date”: “2021-02-12 08:04:15”,

    “amount”: “0.19”,

    “currency”: “USD”

    }

Callback parameters #

Successful response

ParameterDescription
actionCREDIT2VIRTUAL
resultSUCCESS
statusSETTLED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
hashSpecial signature to validate callback. See Appendix A, Credit2Virtual callback signature
amountOrder amount
currencyCurrency

#

Credit2virtual Callback Successful Result #

  • Response Example (Successful result)

    action=CREDIT2VIRTUAL&result=SUCCESS&status=SETTLED&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19&currency=USD

Unsuccessful response

ParameterDescription
actionCREDIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction ID in the Payment Platform
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature to validate callback. See Appendix A, Credit2Virtual callback signature
amountOrder amount
currencyCurrency

#

Credit2virtual Unsuccessful Result #

  • Response Example (Unsuccessful result)

    action=CREDIT2VIRTUAL&result=DECLINED&status=DECLINED&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19&currency=USD&decline_reason=reason

Undefined response

ParameterDescription
actionCREDIT2VIRTUAL
resultUNDEFINED
statusPREPARE
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
trans_dateDate of CREDIT2CARD action
hashSpecial signature to validate callback. See Appendix A, Formula 6
amountOrder amount
currencyCurrency

#

Credit2virtual Callback Undefined Result #

  • Response Example (Undefined result)

    action=CREDIT2VIRTUAL&result=UNDEFINED&status=PREPARE&order_id=64401210&trans_id=2732359c-3b21-11ef-8a36-ca7f64825086&hash=73a796d264052625286faf12245b8489&trans_date=2024-07-05+22%3A51%3A46&amount=0.19&currency=USD

CREDITVOID request #


CREDITVOID request is used to complete REFUND transactions.

REFUND transaction is used to return funds to account, previously submitted by SALE transactions.

This request is sent by POST in the background (e.g. through PHP CURL).

Request parameters #

ParameterDescriptionLimitationsRequired
actionAction to perform= CREDITVOID+
client_keyUnique client keyCLIENT_KEY
trans_idTransaction ID in the Payment PlatformString up to 255 characters+
amountThe amount for partial refund. Several partial refunds allowed.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
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Creditvoid signature.+

Response parameters #

ParameterDescription
actionCREDITVOID
resultACCEPTED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform

Callback parameters #

Successful refund response

ParameterDescription
actionCREDITVOID
resultSUCCESS
statusREFUND (full refund) / SETTLED (partial refund)
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
creditvoid_dateDate of the refund/reversal
amountAmount of refund
hashSpecial signature, used to validate callback. See Appendix A, Creditvoid signature.

Unsuccessful refund response

ParameterDescription
actionCREDITVOID
resultDECLINED
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature, used to validate callback. See Appendix A, Creditvoid signature.

Undefined refund response

ParameterDescription
actionCREDITVOID
resultUNDEFINED
statusSETTLED
order_idTransaction ID in the Transaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
creditvoid_dateTransaction date in the Payment Platform
amountAmount of refund
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

VOID request #


The VOID request is used to cancel the operation which was performed the same financial day.

The cancellation is possible for the SALE operation.

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

This request is sent by POST in the background (e.g. through PHP CURL).

Request parameters #

ParameterDescriptionLimitationsRequired
actionAction to perform= VOID+
client_keyUnique client keyCLIENT_KEY+
trans_idTransaction ID in the Payment PlatformString up to 255 characters+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Void signature.+

Response parameters #

You will get JSON encoded string with transaction result.

Successful void response #

ParameterDescription
actionVOID
resultSUCCESS
statusVOID
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform

Unsuccessful void response #

ParameterDescription
actionVOID
resultDECLINED
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined

Undefined void response #

ParameterDescription
actionVOID
resultUNDEFINED
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform

Callback parameters #

Successful void response

ParameterDescription
actionVOID
resultSUCCESS
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Unsuccessful void response

ParameterDescription
actionVOID
resultDECLINED
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
decline_reasonThe reason why the transaction was declined
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Undefined void response

ParameterDescription
actionVOID
resultUNDEFINED
statusSETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

DEBIT request #

Use debit actions to create debit transactions. When conducting a debit transaction, merchants can utilize commissions for payments by configuring the appropriate settings in the admin panel.

Debit transactions can be executed in two ways:

One-step debit

This option enables payment processing with a single request – DEBIT2VIRTUAL. If commissions are set for debits, they will be applied immediately upon payment. The commission amount can be viewed in the callback (commission parameter).

Two-steps debit

This option involves initiating the debit using the DEBIT2VIRTUAL_CALC request first, followed by confirming the operation through the DEBIT2VIRTUAL_COMPLETE request. In this scenario, if commissions are configured for debits, the commission amount will be returned in the response (commission parameter) after executing the DEBIT2VIRTUAL_CALC request.

DEBIT2VIRTUAL request parameters #

Use DEBIT2VIRTUAL action to create debit transaction in one step.

ParameterDescriptionValuesRequired
actionAction that you want to perform. Fixed value.DEBIT2VIRTUAL+
client_keyUnique key (CLIENT_KEY)UUID format value+
order_idTransaction ID in the Merchants systemString up to 255 characters+
order_amountThe amount of the transactionNumbers in the form XXXX.XX+
order_currencyCurrency3-letter code+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
identifierExtra parameter for transaction.
It could be token, account information, additional descriptor etc.
String up to 255 characters+
brandBrand through which the transaction is performedString up to 36 characters+
payer_first_nameCustomer’s nameString up to 32 characters
payer_last_nameCustomer’s surnameString up to 32 characters
payer_middle_nameCustomer’s middle nameString up to 32 characters
payer_birth_dateCustomer’s birthdayformat yyyy-MM-dd, e.g. 1970-02-17
payer_addressCustomer’s addressString up to 255 characters
payer_address2The adjoining road or locality (if required) of the customer’s addressString up to 255 characters
payer_countryCustomer’s country2-letter code
payer_stateCustomer’s stateString up to 32 characters
payer_cityCustomer’s cityString up to 32 characters
payer_zipZIP-code of the CustomerString up to 10 characters
payer_emailCustomer’s emailString up to 256 characters
payer_phoneCustomer’s phoneString up to 32 characters
payer_ipIP-address of the CustomerXXX.XXX.XXX.XXX+
payer_return_urlCustomer return URLString up to 256 characters+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Debit signature+

DEBIT2VIRTUAL response parameters #

You will get JSON encoded string with transaction result. If your account supports 3D-Secure, transaction result will be sent to your Notification URL.

Successful response

ParameterDescription
actionDEVIT2VIRTUAL
resultSUCCESS
status3DS / REDIRECT / SETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
decline_reasonThe reason why the transaction was declined

Undefined response

ParameterDescription
actionDEVIT2VIRTUAL
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyOrder currency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission

DEBIT2VIRTUAL callback parameters #

Successful response

ParameterDescription
actionDEBIT2VIRTUAL
resultSUCCESS
statusREDRIECT / 3DS / SETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Undefined response

ParameterDescription
actionDEBIT2VIRTUAL
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyOrder currency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

DEBIT2VIRTUAL_CALC request parameters #

Use DEBIT2VIRTUAL_CALC action to initiate DEBIT transaction and to get commission value.

ParameterDescriptionValuesRequired
actionAction that you want to perform. Fixed value.DEBIT2VIRTUAL_CALC+
client_keyUnique key (CLIENT_KEY)UUID format value+
order_idTransaction ID in the Merchants systemString up to 255 characters+
order_amountThe amount of the transactionNumbers in the form XXXX.XX+
order_currencyCurrency3-letter code+
order_descriptionDescription of the transaction (product name)String up to 1024 characters+
identifierExtra parameter for transactionIt could be token, account information, additional descriptor etc.+
brandBrand through which the transaction is performedString up to 36 characters+
payer_first_nameCustomer’s nameString up to 32 characters
payer_last_nameCustomer’s surnameString up to 32 characters
payer_middle_nameCustomer’s middle nameString up to 32 characters
payer_birth_dateCustomer’s birthdayformat yyyy-MM-dd,
e.g. 1970-02-17
payer_addressCustomer’s addressString up to 255 characters+
payer_address2The adjoining road or locality (if required) of the customer’s addressString up to 255 character
payer_countryCustomer’s country2-letter code
payer_stateCustomer’s stateString up to 32 characters
payer_cityCustomer’s cityString up to 32 characters
payer_zipZIP-code of the CustomerString up to 10 characters
payer_emailCustomer’s emailString up to 256 characters
payer_phoneCustomer’s phoneString up to 32 characters
payer_ipIP-address of the CustomerXXX.XXX.XXX.XXX+
payer_return_urlCustomer return URLString up to 256 characters+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Debit signature+

DEBIT2VIRTUAL_CALC response parameters #

You will get JSON encoded string with transaction result.

Successful response

ParameterDescription
actionDEBIT2VIRTUAL_CALC
resultSUCCESS
statusPREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL_CALC
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
decline_reasonThe reason why the transaction was declined

DEBIT2VIRTUAL_CALC callback parameters #

Successful response

ParameterDescription
actionDEBIT2VIRTUAL_CALC
resultSUCCESS
statusPREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL_CALC
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

DEBIT2VIRTUAL_COMPLETE request parameters #

Use DEBIT2VIRTUAL_COMPLETE action to confirm initiated debit transaction.

ParameterDescriptionValuesRequired field
actionAction that you want to perform. Fixed value.DEBIT2VIRTUAL_COMPLETE+
client_keyUnique key (CLIENT_KEY)UUID format value+
trans_idInitiated transfer transaction ID in the Payment PlatformUUID format value+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, Complete Debit signature+

DEBIT2VIRTUAL_COMPLETE response parameters #

You will get JSON encoded string (see an example on Appendix B) with transaction result. If your account supports 3D-Secure, transaction result will be sent to your Notification URL.

Successful response

ParameterDescription
actionDEBIT2VIRTUAL_COMPLETE
resultSUCCESS
status3DS / REDIRECT / SETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL_COMPLETE
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
decline_reasonThe reason why the transaction was declined

Undefined response

ParameterDescription
actionDEBIT2VIRTUAL_COMPLETE
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyOrder currency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission

DEBIT2VIRTUAL_COMPLETE callback parameters #

Successful response

ParameterDescription
actionDEBIT2VIRTUAL
resultSUCCESS
status3DS / REDIRECT / SETTLED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Unsuccessful response

ParameterDescription
actionDEBIT2VIRTUAL
resultDECLINED
statusDECLINED
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyCurrency
commissionCommission for transaction
total_amountTotal amount for transaction
decline_reasonDescription of the cancellation of the transaction
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

Undefined response

ParameterDescription
actionDEBIT2VIRTUAL
resultUNDEFINED
statusREDIRECT / PREPARE
order_idTransaction ID in the Merchant’s system
trans_idTransaction ID in the Payment Platform
trans_dateTransaction date in the Payment Platform
descriptorDescriptor from the bank, the same as payer will see in the bank statement
amountOrder amount
currencyOrder currency
commissionCommission for transaction
total_amountTotal amount for transaction: total_amount = amount + commission
hashSpecial signature, used to validate callback, see Appendix A, Formula 2

GET_TRANS_STATUS request #


Gets order status from Payment Platform. This request is sent by POST in the background (e.g., through PHP CURL).

Request parameters #

ParameterDescriptionValuesRequired
actionGET_TRANS_STATUSGET_TRANS_STATUS+
client_keyUnique client key (CLIENT_KEY)+
trans_idTransaction ID in the Payment PlatformString up to 255 characters+
hashSpecial signature to validate your request to Payment PlatformSee Appendix A, GET_TRANS_STATUS signature+

Response parameters #

ParameterDescription
actionGET_TRANS_STATUS
resultSUCCESS
statusREDIRECT / PREPARE / DECLINED / SETTLED / REFUND / VOID
order_idOrder ID in the Client’s system
trans_idTransaction ID in the Payment Platform
decline_reasonReason of transaction decline. It shows for the transactions with the “DECLINED” status

Errors #


In case error you get synchronous response from Payment Platform:

ParameterDescription
resultERROR
error_messageError message

Testing #


You can make test requests using data below. Please note, that all transactions will be processed using Test engine.

Customer’s emailTesting / Result
success@gmail.comThis email must be used for testing successful sale.
Response on successful SALE request:
{action: SALE, result: SUCCESS, status: SETTLED}
fail@gmail.comThis email date must be used for testing unsuccessful sale
Response on unsuccessful SALE request:
`{action: SALE, result: DECLINED, status: DECLINED}

Supported brands #

Use the following brand`s names as value for brand parameter in the requests:

applepay (see Appendix B for Sale operation details)
googlepay (see Appendix B for Sale operation details)
paypal
sepa
stripe-js

Appendix A #


Hash is signature rule used either to validate your requests to payment platform or to validate callback from payment platform to your system. It must be md5 encoded string calculated by rules below:

Sale signature #

Hash is calculated by the formula:

_md5(strtoupper(strrev(identifier + order_id + order_amount + order_currency + PASSWORD)));_

Creditvoid signature #

Hash is calculated by the formula:

_md5(strtoupper(strrev(trans_id + PASSWORD)));_

Void signature #

Hash is calculated by the formula:

$hash = md5(strtoupper(strrev($trans_id)) . $ PASSWORD);

Credit2Virtual signature #

Hash is calculated by the formula:

$hash = md5(strtoupper(strrev($order_id . $order_amount . $order_currency)) . $PASSWORD);

Debit signature #

Hash is calculated by the formula:

_md5(strtoupper(strrev(identifier + order_id + order_amount + order_currency + PASSWORD)));_

Complete Debit signature #

Hash is calculated by the formula:

$hash = md5(strtoupper(strrev($trans_id)) . $ PASSWORD);

GET_TRANS_STATUS signature #

Hash is calculated by the formula:

$hash = md5(strtoupper(strrev($trans_id)) . $ PASSWORD);

Callback signature #

Hash is calculated by the formula:

array_walk_recursive($params, static function (&$value) {
$value = strrev($value);
});
$params['hash'] = md5(strtoupper(convert($params) . PASSWORD));
function convert($params)
{
foreach ($params as &$value) {
if (is_array($value)) {
$value = $this->convert($value);
}
}
ksort($params);
return implode($params);
}

Sale callback signature #

Hash calculation for notification in S2S VPG based on the next formula:
• output array has to be sorted alphabetically;
• joint all values;
• applying uppercase;

For example, for callback like this:

result=SUCCESS
amount=9.22
transactions=[ctrans1 = 123, atrans2 =32, itrans2 =325]

formula will be looking like this:

hash = reverse(action) + reverse(amount) + reverse(result) + reverse(transactions.atrans2) + reverse(transactions.ctrans1) + reverse(transactions.itrans2) + PASSWORD

and string_result:

string_result = ELASSSECCUS22.923321523PASSWORD

and hash:

hash = md5(string_result)

Credit2Virtual callback signature #

Hash is calculated by the formula:

$hash = md5(strtoupper(strrev($trans_id . $order_id . $status)) . $ PASSWORD);

Appendix B #


You have to add to your SALE request specific list of parameters which is determined by the value for the brand parameter.

You should get additional information from account manager.

To simulate success scenario use identifier parameter value success@gmail.com and fail@gmail.com for decline.

Apple Pay #

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 #

  • 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/8ucZVNhDdOFRgfCENqI13GVXhit2sNsN9MsgMsN4odCl7qX837RfJoXgCv7OC00L9ciqpqlMV0pc7jXb2XWN47DCyyRwja5OGMMHuD+heQ8OwCDq5g1mDBww6Neeubl6zpksdNafBjhtEl4nDJ1nPH6IJET4uPgcbgii9rkaEIHXbKVILB0AjUbX4X8Adk91jG7scRAYmB92H75/6uRvREFvhqvIAlc8C4F5b3ObiB1MpwZt7DwcZIpWz3QJ2WSUGwmc+Qiv4pRV8d5Xw2sSGiEG”,”signature”:”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”,”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[googlepay_token] – 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 Example of data #

  • 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[googlepay_token] parameter.

#

Google Pay Example Request #

  • 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

Leave a Reply

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

Scroll to Top