Working with merchant's API - bypass 3D Secure

Mutt

Professional
Messages
1,057
Reputation
7
Reaction score
597
Points
113
In this guide, you will learn how to install a merchant (payment gateway) on your website and bypass 3D Secure (disable/block 3D Secure).

What is merchants API
API is designed for merchants interested in accessing a flexible and flexible solution for automating electronic payments with bank cards.
API provides the integration of the merchant's service with merchants payment gateway, which guarantees high reliability and security of customers' payment transactions.

Content:
  • Ways of payment
    • The basics
    • ApplePay
    • Google pay
    • QR Code (SBP)
  • Embedded solutions
    • Installing merchants Widget
    • merchants payment form
  • Ready modules for CMS
    • Bitrix
    • WordPress (WooCommerce plugin)
  • Payments
    • Recurring payments
    • Using 3DS Verification
    Service of notifications
  • Additionally
    • Order statuses
    • Error codes
    • Test Cards
  • Description of API methods
    • Block - blocking funds on the card
    • Init - Create a payment session
    • createPayment - Call a payment form
    • Charge - Write-off of blocked funds
    • Unblock - Unlocking funds on the card
    • Refund
    • Pay - One-step payment
    • getState - Get the status of the payment
    • createUser - Create a new user
    • storeCard - Register (save) card
    • removeCard - Remove card
    • listCard - Request a list of registered cards
    • Block3DS - Using 3D Secure Technology
    • Payout - Crediting funds to the card
    • getReceipt - request fiscal data for an order
    • Using 3-D Secure technology version 1
    • Using 3-D Secure technology version 2
  • Requirements for posting information on the company's website

The basics

Bank cards
You can accept bank cards of International Payment Systems for payment: Visa (including Electron), Mastercard, Maestro, MIR, and optionally JCB, Amex, UnionPay, DinersClub, BelKart, Arka.
By default, the user will enter bank card details on merchants payment gateway page, but you can embed the form on your website or mobile application.

Apple Pay, Google Pay
Thanks to merchant, the user can pay using Apple Pay and Google Pay.

QR Code (SBP)
Thanks to merchant, a user can pay for a product/service using a new method - QR Code payment (QR Code), both from a mobile device and from the Web version.

ApplePay
merchants provides the ability to write off funds from the Buyer's card using the Apple Pay token instead of the card details.

To make a payment using Apple Pay, you must:
  1. Register for the Apple Developer Program
  2. In case of using a mobile app, get Apple approval
  3. Verify Domain Ownership
  4. Get a Certificate Signing Request (CSR) file from merchant
  5. Using the received CSR, create a certificate in the Apple Partner Center
  6. Submit the generated certificate to merchant

Google pay
Google Pay™ allows customers to make payments in your app or website using any credit or debit card stored in their Google account, including from Google Play, YouTube, Chrome, or Android device.
Google Pay™ is fully compatible with merchants products and features, allowing you to use it instead of the traditional form of payment whenever possible. Use it to accept payments for physical or digital goods, donations, subscriptions, and more. Payments for digital goods only apply to Web and mobile Web payments.

Principle of operation
  1. The customer selects the Google Pay button. Using the Google API, your system initiates a Google Pay request identifying the cyber resource as your payment gateway, passing your CyberSource merchant ID as the gateway merchant ID.
  2. The client confirms the payment. The Google API communicates with Google Pay services. A token is generated on the payment network.
  3. Google generates encrypted payment data using a special gateway key that is provided in the wallet request and includes it in the Google API response.
  4. Your system prepares Google Pay data to be sent to merchant. The PaymentData received from the Google API is base64 encrypted and passed as a GooglePayToken parameter to the Pay and Block methods.
  5. merchant returns an authorization response for your system.
  6. Your system returns an authorization response to the payment application / site. The payment app / site displays a confirmation or opt-out message to the customer.

Integration
To receive payments, fill out the registration form, after which a Google representative will contact you and instruct you on the next steps. Integration examples:

WEB-site
  • Website Integration Guide.
  • Use the checklist to verify that you have completed all the necessary steps in your Web integration.
  • Follow the steps to help you place your Google Pay branding elements on your websites.

An example of tokenization:
Code:
const tokenizationSpecification = {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'merchant's',
'gatewaymerchantId': 'exampleGatewaymerchantId'
}
}

  • gateway: merchant's
  • gatewaymerchantId: Public ID, issued via merchant's support

An example of installing payment systems supported by Google Pay and merchant:
Code:
const allowedCardNetworks = ["AMEX", "JCB", "MASTERCARD", "VISA"];

Android App
  • Android Application Integration Guide.
  • Use the checklist to check that you have completed all the necessary steps in Android integration.
  • Follow the steps to help you correctly place Google Pay brand elements in Android mobile apps.

An example of tokenization:
Code:
private static JSONObject getTokenizationSpecification() {
JSONObject tokenizationSpecification = new JSONObject();
tokenizationSpecification.put("type", "PAYMENT_GATEWAY");
tokenizationSpecification.put(
"parameters",
new JSONObject()
.put("gateway", "themerchantname")
.put("gatewaymerchantId", "examplemerchantId"));
return tokenizationSpecification;
}

  • gateway: merchant's
  • gatewaymerchantId: Public ID, issued via merchant's support

An example of installing payment systems supported by Google Pay and merchant:
Code:
private static JSONArray getAllowedCardNetworks() {
return new JSONArray()
.put("AMEX")
.put("JCB")
.put("MASTERCARD")
.put("VISA");
}

Interaction with merchant's
As a result of tokenization, you should receive a Google Pay token, which looks something like this:
Code:
{
"protocolVersion":"ECv2",
"signature":"MEQCIH6Q4OwQ0jAceFEkGF0JID6sJNXxOEi4r+mA7biRxqBQAiAondqoUpU/bdsrAOpZIsrHQS9nwiiNwOrr24RyPeHA0Q\u003d\u003d",
"intermediateSigningKey":{
"signedKey": "{\"keyExpiration\":\"1542323393147\",\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw\\u003d\\u003d\"}",
"signatures": ["MEYCIQCO2EIi48s8VTH+ilMEpoXLFfkxAwHjfPSCVED/QDSHmQIhALLJmrUlNAY8hDQRV/y1iKZGsWpeNmIP+z+tCQHQxP0v"]
},
"signedMessage":"{\"tag\":\"jpGz1F1Bcoi/fCNxI9n7Qrsw7i7KHrGtTf3NrRclt+U\\u003d\",\"ephemeralPublicKey\":\"BJatyFvFPPD21l8/uLP46Ta1hsKHndf8Z+tAgk+DEPQgYTkhHy19cF3h/bXs0tWTmZtnNm+vlVrKbRU9K8+7cZs\\u003d\",\"encryptedMessage\":\"mKOoXwi8OavZ\"}"
}

The token must be Base64 encoded without any modifications and sent to merchant's. An example of a Base64 encoded token:
Code:
ewogICJwcm90b2NvbFZlcnNpb24iOiJFQ3YyIiwKICAic2lnbmF0dXJlIjoiTUVRQ0lINlE0T3dRMGpBY2VGRWtHRjBKSUQ2c0pOWHhPRWk0cittQTdiaVJ4cUJRQWlBb25kcW9VcFUvYmRzckFPcFpJc3JIUVM5bndpaU53T3JyMjRSeVBlSEEwUVx1MDAzZFx1MDAzZCIsCiAgImludGVybWVkaWF0ZVNpZ25pbmdLZXkiOnsKICAgICJzaWduZWRLZXkiOiAie1wia2V5RXhwaXJhdGlvblwiOlwiMTU0MjMyMzM5MzE0N1wiLFwia2V5VmFsdWVcIjpcIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRS8xKzNIQlZTYmR2K2o3TmFBcmRnTXlvU0FNNDN5UnlkenFkZzFUeG9kU3pBOTZEajRNYzFFaUtyb3h4dW5hdlZJdmR4R25KZUZWaVR6RnZ6RlJ4eUN3XFx1MDAzZFxcdTAwM2RcIn0iLAogICAgInNpZ25hdHVyZXMiOiBbIk1FWUNJUUNPMkVJaTQ4czhWVEgraWxNRXBvWExGZmt4QXdIamZQU0NWRUQvUURTSG1RSWhBTExKbXJVbE5BWThoRFFSVi95MWlLWkdzV3BlTm1JUCt6K3RDUUhReFAwdiJdCiAgfSwKICAic2lnbmVkTWVzc2FnZSI6IntcInRhZ1wiOlwianBHejFGMUJjb2kvZkNOeEk5bjdRcnN3N2k3S0hyR3RUZjNOclJjbHQrVVxcdTAwM2RcIixcImVwaGVtZXJhbFB1YmxpY0tleVwiOlwiQkphdHlGdkZQUEQyMWw4L3VMUDQ2VGExaHNLSG5kZjhaK3RBZ2srREVQUWdZVGtoSHkxOWNGM2gvYlhzMHRXVG1adG5ObSt2bFZyS2JSVTlLOCs3Y1pzXFx1MDAzZFwiLFwiZW5jcnlwdGVkTWVzc2FnZVwiOlwibUtPb1h3aThPYXZaXCJ9Igp9

merchant's API supports the transfer and processing of a token in two methods: Block and Pay in the GooglePayToken parameter. An example of a request for a one-step payment Pay:
Code:
Key=GooglePayTestTerminal&GooglePayToken=ewogICJwcm90b2NvbFZlcnNpb24iOiJFQ3...&OrderId=GooglePayTestOrder-001&Amount=101

As a result of the successful execution of the scenario from the example above, the client's funds will be authorized and debited using merchant's and Google Pay. An example of a successful response:
Code:
{
"Success": true,
"OrderId": "GooglePayTestOrder-001",
"Amount": 101,
"ErrCode": ""
}

If you receive an erroneous response, please check the correctness of the Base64-encoded token, the correctness of its transmission and other parameters. If the data is correct, refer to merchant error dictionary

Google Pay Terms of Service
Please read these guidelines to properly use Google Pay technology and brand in mobile apps and websites.
  1. Google Pay cannot be used to pay for goods / services that are prohibited for sale on the Internet
  2. Google Pay Brand Guidelines
  3. Before you start working with Google Pay, you need to go through the registration procedure and check the WEB-site and / or mob. apps on Google.

QR Code (SBP)
The UBS QR code is a graphic image, when decrypted, all the necessary payment information becomes available - bank details, the amount and purpose of the payment. Thanks to graphical security, payment information is encrypted and protected from reading without the special software that is available in the mobile phone.
The UBS QR-code can be of two types: QRS - static QR-code ("QR-sticker") and QRD - dynamic QR-code ("QR at the checkout").

Interaction scenarios:
  • Entering data on the Seller's side
  • Entering data on merchant payment form

Entering data on the Seller's side
The interface offers the ability to receive a payment link or generate a QR code for payment using the Fast Payment System (FPS).
After confirmation of payment by the Client, the Seller receives a notification of the result of the payment in the form of a POST request.
To make a payment using the UBS QR code, the User must have a mobile application of a bank participating in the Fast Payments System.

Available methods:
  • Formation of the QR-code of the SBP
  • Obtaining a previously generated QR-code of the UPS
  • Refunds
  • Receiving payment status

Embedded solutions

Installing merchant Widget
In order to start accepting payments, the merchant needs to place a simple script on his page that will create a session and generate a payment page. An example of how the merchant's solution interacts with merchant payment gateway with Easy Integration:

To install the widget, you need to register a script on the site in the head section:
Code:
<script type="text/javascript" src="https://static-stage.mapisacard.com/static/widget/merchant-widget.js"></script>

Further, for any event (for example, pressing the payment button), a call to the widget is prescribed. For example:
Code:
<button id="pay_button" onclick="openWidget()">Pay</button>

Calling the widget with the necessary parameters should be placed on the page before the closing tag </body>
Code:
<! - The openWidget function can look like this ->

function openWidget() {
var widget = new merchantWidget({
Token: "Jms7xd95Cv30S3Mri7Xfp3md8cn3lxmD5Xb47Hg8Bl9Dm8cF6Hbsl3VgP21KioIo",
OrderID: "merchant_widget_2021",
Amount: 1999000,
Currency: "EUR",
ProductName: "Telephone",
Receipt: true,
Email: "[email protected]",
AutoClose: true
})
}

Widget options:
Widget parameters that are passed to its constructor
NameDescriptionFormatMandatory
TokenSession keyLineYes
OrderIDPayment ID in the merchant's systemString (maximum 50 characters)Yes
AmountTransaction amount in minimum currency unitsDigits with no decimal or other separatorsYes
CurrencyTerminal currencyLineYes
ProductName of productString (maximum 50 characters)Not
ReceiptRequire the indication of the user's e-mail address in the widgettrue / falseNot
EmailUser email addressLineNot
AutoCloseAuto-close the widget. Default valuefalsetrue / falseNot

Progress
After launching the constructor with parameters, it checks for the device screen size and checks whether the page is open on a mobile device. The page is scaled for correct and convenient display of the widget.
The HTML code of the widget is generated. The code is embedded in the body section by adding it as a child node to the tag. The elements are given a large z-index style attribute so that they overlap the page when displayed. Initially, all items are hidden.
Loading the widget. A POST request is created with the data contained in the widget. The answer is a template that contains fields to fill out and a payment button. This template is loaded into the <iframe>widget element.
After the payment is made, the widget is closed and sent postMessagewith the result of the payment paymentResult. Its HTML code is removed from the main page.

Marchant payment form
This guide describes how to work with templates for entering payment card data on the gateway side. We have tried to create a flexible tool that will allow you to quickly create your own payment scenarios.

Attention! Templates should not contain links to third-party resources. If you would like to add your own scripts, images or styles, you must send them to merchant support team.
The default payment form template consists of two files:
  • index.html (card data entry page)
  • result.html (payment result page)
A script with template settings is inserted in each file. Basic parameters are inserted into the template using the template compiler. Their value is substituted from the transmitted parameters during the initialization of the payment session or the terminal settings. All parameters are case sensitive.

Form template settings
NameDescriptionFormatDefault
SecretSession key. Required parameter.{{.Secret}}
AmountAmount of payment. Transmitted during the initialization of the payment session{{. Amount}}
CurrencyTerminal currency. Taken from the terminal settings{{.Currency}}EUR
SessionTypeSession type. Pay - payment session. Add - card binding{{.SessionType}}Pay
AllowNewCardPossibility to pay with a new card, if there are linked cards{{.AllowNewCard}}true
IsReceiptIncludes the email field if the terminal supports data transfer for fiscalization in accordance {{.IsReceipt}}false
EmailEmail that was passed during session initialization in CustomParams. Substituted in the email field{{.Email}}
HasUserCredDetermines whether the session is authorized during initialization by user / customer.{{.HasUserCred}}false
AddCardA parameter that specifies whether to save the card after payment. The value is taken from the transmitted AddCard value when initializing the session{{.AddCard}}false
ShowOrderIdShow / hide order numberBooleantrue
ShowDescriptionShow / hide order description passed in CustomParamsBooleantrue
ShowAmountShow / hide order amountBooleantrue
ShowCVVShow / hide the CVV field if there is a corresponding setting in the terminalBooleantrue

Payment result template settings
NameDescriptionFormatDefault
RedirectUrlThe user's return address. Sent when initializing a session (or terminal). Required parameter{{.RedirectUrl}}
StatePage typeStringResult
ResultThe result of the payment. Required parameter{{.Success}}
RedirectDelayDelay in milliseconds before redirecting the user to the return pageNumber1000
ResultTextPayment result textObject{success: "Payment was successful",
fail: "Payment error"}

You can make a payment template without entering the cardholder. In this case, in the template settings, you must add a key Holderand set a string with a stub for transferring data to processing. The string must contain at least three Latin characters.
Code:
{
...
Holder: "Mr Cardholder",
...
}

You can change the text on the button, for this you need to pass a parameter ButtonTextwith the text for the session type
Code:
{
...
ButtonText: {
Pay: "Pay",
Add: "Add card"
}
...
}

or if PayButtonCustomText is specified on Init in CustomParams (For example, )PayButtonCustomText=Activate Promo Code
Code:
{
// ...
ButtonText: {
Pay: "{{index .CustomParams "PayButtonCustomText"}}",
}
// ...
}

To display additional parameters on the payment template, transferred during the initialization of the payment session, you must specify the parameter name in quotation marks.
Code:
{{index .CustomParams "Test"}}

Ready modules for CMS
merchants offers a turnkey solution for online stores based on CMS Bitrix and WordPress (plugin WooCommerce). In order to start accepting payments, the merchant needs to install the merchant Payment plugin on his page, with which the User will be redirected to merchant payment form. Upon successful payment, the User will be returned back to the store's website.

Bitrix
Installation instructions for the CMS 1C-Bitrix module.
Go to Administration Tab, Marketplace Solution Catalog.
Install the merchant payment acceptance module.
After successful installation, go to Store> Settings> Payment systems.
Add payment system.
In the "Handler" field, select merchant.
Payment type - "Non-cash", Encoding - "utf-8"
The values of the parameters "merchant ID", "Password", "Payment gateway address" will be provided in a letter from merchant.

WordPress (WooCommerce plugin)
Installation instructions for CMS WordPress module (WooCommerce plugin).
Download and install the WooCommerce plugin.
Unpack merchant.zip archive.
Go to WooCommerce> Settings> Payments.
Configure merchant Method.
The values of the "Payment gateway address", "merchant ID" and "Password" parameters will be sent in an email from merchant.

Payments

Recurring payments
merchant provides the ability to make regular debits from the user's card without entering the card details. A prerequisite for making recurring payments is preliminary registration of the User in merchant's system and saving the card from which recurring payments will be made. To save the card, the storeCard method is used - in the case of using the payment form on the merchant's side, or the Init, Type = Pay, AddCard = True method - in the case of using the payment form on merchant side. In this case, when saving the map, you must pass the parameters Recurrent = true, as well as OrderId and BlockAmount to perform the first operation that initiates the recurrent.
Subsequent debits are performed without entering the full card details.

Using 3DS Verification
The 3-D Secure technology minimizes the risks of card fraud for merchants, since the issuing bank is responsible for the transaction performed with 3DS verification. At the same time, the payment scheme and the format of requests are slightly changed. When initiating a payment, the payment gateway checks the card's involvement in the 3-D Secure technology and receives the necessary parameters for user authentication. Then the user is redirected to the page of the issuing bank to enter the password, after which the system generates the PaRes parameter to complete the authorization. A detailed description is provided in Block3DS.

Service of notifications
Notifications are notifications (POST) containing information about the performed operation, sent to the URL specified by the merchant in advance in a letter to merchant. The service sends the following types of notifications:
Notification typeDescription
BlockFunds blocking notification
Block3DSNotice of blocking funds in case of using 3D Secure technology
UnblockUnlock notification
ChargeDebit notification
RefundReturn notice
PayOne-step debit notification (Pay method)
Pay3DSNotification of a one-stage write-off in case of using 3D Secure technology (Pay3DS method)
AddCardCard save notification

Composition of notification fields:
ParameterDescriptionFormat
merchantContractSeller ID.Line
OriginalOrderIdPayment ID in the merchant's systemLine
merchantOrderIdUnique payment identifier in merchant's systemLine
AmountTransaction amountCorresponds to the one passed in the request
AuthCodeAuthorization codeLine
RRNRRN operationsLine
SuccessOperation success flagtrue / false
CardNumberMasked card number411111xxxxxx1111
BankNameThe parameter is optional. Issuing bank nameLine
ErrCodeError codeLine
StateOrder status at the time of sending the notificationLine
NotificationNotification typeLine
CardUIDID of the card in the merchant's system. Notifications with the AddCard type are transmitted, as well as in the case of payment using CardUIDLine
CustomParamsThe parameter is optional. List of additional parameters of the operationLine
FeePercentThe parameter is optional. Acquiring commission rateNumber (hundredths of a percent)
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
SignatureThe parameter is optional. String - the result of hashing according to the HMAC-SHA-256 algorithm, URL encoded parameter strings that are sent in notifications, sorted alphabeticallyLine

Based on the result of sending notifications, in agreement with the merchant, an active action on the order can be configured. For example, in case of receipt of the 422nd response code for the Block notification, or failure to receive a response within the specified period, merchant independently initiates the unblocking of funds. The functionality is optional.

Additionally

Order statuses
StatusOrder status in LCDescription
NewNewThe payment was registered in the gateway, but its processing in processing has not started
PreAuthorized3DS3DS pre-authorizationThe user started authentication using the 3-D Secure protocol, at which the payment operations were completed
AuthorizingAuthorizationFunds blocking process started
AuthorizedAuthorizedFunds are blocked, but not debited (2-stage payment)
VoidingCancellationFunds unblocking process started
VoidedCanceledFunds on the card have been blocked and unblocked (2-stage payment)
ChargingWrite-offThe process of debiting the blocked amount has been started
ChargedDecommissionedThe funds were debited from the User's card, the payment was completed successfully
RefundingReturnsThe process of returning the debited amount has been launched
RefundedReturnedA full refund has been successfully made to the User's card
Verifying payout opportunityChecking the possibility of paymentCard verification for enrollment
Payout readyReady to payCard verification for enrollment has been successfully completed
PayingPayPayment process started
PaidPaid outEnrollment to the card has been successfully completed
RejectedRejectedOrder declined

Error codes
ErrorDescription
ACCESS_DENIEDAccess from the current IP or the specified parameters is denied
AMOUNT_ERRORIncorrect transaction amount
AMOUNT_EXCEEDThe transaction amount exceeds the available balance of the selected account
AMOUNT_EXCEED_BALANCEThe transaction amount exceeds the available balance of the selected account
AUTHENTICATION_ERROR3DS Authentication Error
CARD_NOT_ACTIVECard is not active
COMMUNICATE_ERRORAn error occurred when transferring data to the MPS
CUSTOMER_NOT_FOUNDCard holder not found
DATABASE_TIMEOUTDatabase timeout
DUPLICATE_CARDCard is already registered
DUPLICATE_ORDER_IDThe order number has already been used before
DUPLICATE_PROCESSING_ORDER_IDThe order number was previously used in bank processing
DUPLICATE_TERMINALTerminal is duplicated
DUPLICATE_TRANSACTION_TRACEDuplicate transaction status
EMPTY_RESPONSEProcessing error
ENCODING_ERRORError decoding secondary system response
FRAUD_ERRORInvalid transaction according to anti-fraud filter settings
ILLEGAL_ORDER_STATEAn attempt was made to perform an invalid operation for the current state of the payment
INTERNAL_ERRORIncorrect transaction format from the point of view of the network
INVALID_AUTHENTICATIONInvalid authentication
INVALID_ENROLLMENTThe card has not passed the 3D Secure engagement test
INVALID_FORMATIncorrect transaction format from the point of view of the network
ISSUER_BLOCKED_CARDThe cardholder is trying to perform a transaction that is not allowed for him by the issuing bank, or an internal issuer error has occurred
ISSUER_CARD_FAILThe issuing bank has banned Internet card transactions
ISSUER_FAILThe cardholder is trying to perform a transaction that is not allowed for him by the issuing bank, or an internal error of the issuer
ISSUER_LIMIT_AMOUNT_FAILAn attempt was made to complete a transaction in excess of the (daily) limit set by the issuing bank
ISSUER_LIMIT_COUNT_FAILExceeded the limit on the number of transactions: the client has completed the maximum allowed number of transactions during the limit cycle and is trying to conduct another
ISSUER_LIMIT_FAILAn attempt was made to exceed the limits of the issuing bank by the amount or the number of transactions in a certain period of time
ISSUER_TIMEOUTNo connection with the issuing bank
LIMIT_EXCHAUSTTime or number of attempts allotted for data entry is exhausted
merchant_NOT_FOUNDmerchant not found
merchant_RESTRICTIONThe Store limit has been exceeded or transactions are prohibited by the Store
NO_CHAINInitiating recurrent not found
NO_SESSIONSession not found
NO_TRANSACTION_IDTransaction_id not found
NONEOperation completed without errors
NOT_ALLOWEDRefusal of the issuer to conduct the transaction. Most often occurs when prohibitions are imposed on the map
NOT_AUTHEDAuthentication error
NOT_FOUNDNot found
ORDER_NOT_FOUNDTransaction not found
SESSION_EXPIREDPayment (session) timed out
PAYMENT_ENGINE_ERRORUnidentified payment gateway error
PROCESSING_ERRORA general error in the functioning of the system. Fixed by the payment network or the issuing bank
PROCESSING_FRAUD_ERRORInvalid transaction according to the Antifraud filter settings in the Acquiring Bank
PROCESSING_TIME_OUTProcessing timeout
REAUTH_NOT_ALOWEDAuthorization amount change cannot be performed
REFUND_NOT_ALOWEDRefund could not be completed
TERMINAL_NOT_FOUNDTerminal not found
THREE_DS_FAILUnable to execute 3DS transaction
THREE_DS_TIME_OUTThe validity period of the transaction was exceeded by the time the card data was entered
TRANSACTION_NOT_3DS_PREAUTHORIZEDAttempted 3DS authorization with a card that does not support 3DS technology
TRANSACTION_NOT_AUTHORIZEDTransaction not authorized
TRANSACTION_NOT_CHARGEDTransaction not debited
TRANSACTION_NOT_FOUNDTransaction not found
TRANSACTION_REFUNDED_OR_REFUNDINGTransaction has been returned or is in the process of being returned
TRANSACTION_STATE_CHARGED_OR_CHARGINGTransaction status has been debited or in the process of being debited
TRANSACTION_STATE_REJECTEDTransaction declined
TRANSACTION_TRACE_NOT_FOUNDTransaction status not found
TRANSACTION_VOIDED_OR_VOIDINGThe transaction is unlocked or in the process of unlocking
UNKNOWN_STATEUnknown status
USER_NOT_FOUNDUser is not found
WRONG_AMOUNTInvalid amount
WRONG_CARDInvalid card parameters were transferred, or the card is in an invalid state
WRONG_CARD_EXPIncorrect card expiration date
WRONG_CARD_INFOIncorrect card information
WRONG_CARD_PANInvalid card number
WRONG_CARDHOLDER_NAMEInvalid cardholder name
WRONG_CURRENCYInvalid currency
WRONG_PARAMSInvalid parameter set or format
WRONG_PAY_INFOIncorrect PayInfo parameter (incorrectly formed or broken cryptogram)
WRONG_PHONEInvalid phone number

Test Cards
Payment amount - From 0.1 to 1 euro/usd.
Cardholder - any name, in this case only Latin characters or a space should be used. The cardholder's name must be at least three characters long.
Using the parameters of valid bank cards during testing is strictly prohibited!
Card numberCVVValidityResult
41111111111111121232021/12successful payment without 3DS
41111111111000311232021/12successful payment without 3DS
41111111111000231232021/12successful payment without 3DS
54867320588644711232021/12successful payment with 3DS
41111111111111111232021/12successful payment with 3DS
41111111111111141232021/12unsuccessful payment with 3DS
41111111111111151232021/12unsuccessful payment with 3DS
41111010000000461232021/12unsuccessful payment ("insufficient funds") during blocking (if the amount exceeds 1 euro (Amount = 101))
41111111111006271232021/12"PROCESSING_ERROR" during unlocking

Description of API methods
Interaction of the merchant's solution with merchant payment gateway during integration is based on a request-response scheme.
A request with the necessary parameters is formed on the Seller's side and is transmitted by the POST method (GET - for the createPayment method) in the JSON or x-www-form-urlencoded format over the HTTPS (TLS 1.2) protocol.
For example: https://{domain}/{Command} where {domain}is the URL address of the payment gateway, {Command}is the name of the command (method).
The results of processing requests are issued by the payment gateway synchronously in JSON format, UTF-8 encoding.
Parameter names in queries are case sensitive.
merchant also provides the ability to use asynchronous notifications.

Block - blocking funds on the card
Performed using the Block command. This request allows you to block funds on the Buyer's card for subsequent debiting. The identifier of the registered card or the full details of the card can be specified as a card. Blocked funds can then be debited by the Charge command or unblocked by the Unblock command.

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
PayInfoParameters for making a transactionUrl Encoded string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal)Mandatory if there is no CardUID
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)Yes
AmountBlocked amount in minimum currency unitsDigits with no decimal or other separatorsYes
Login *Login of the cardholder registered in the merchant's systemString (maximum 50 characters)Not
Password *Password of the cardholder registered in the merchant's systemString (maximum 50 charactersNot
CardUIdMap ID in merchant's system or "Random" value **String (maximum 50 characters)Mandatory if PayInfo is absent
TerminalPassword ***Terminal password for transactionsString (maximum 50 charactersNot
merchant ****Seller nameString (maximum 50 charactersNot
merchantPassword ****merchant password for transactionsString (maximum 50 charactersNot
GoodsList of names of goods / services to be sent to the OFD (54-FZ)A string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal). The total amount of all goods must correspond to the Amount. Length of one name - no more than 128 charactersNot
ParamsList of additional parameters of the operationA string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal)Not
SplitUsed to divide the amount of the write-off made into its component parts for subsequent settlements with counterpartiesA string containing groups of key-value pairs, where groups are enclosed in curly braces {}, key-value pairs are separated by a “,” (comma). Key and value are separated by ":" (colon). The line is enclosed by square brackets "[]". The parameters of keys and values are issued to the Seller with the parameters of test / combat access. The total sum of all components must correspond to the AmountNot
* - are used only if the card is saved to a specific user ** - when the “Random” value is specified, a random card is selected from those linked to this user *** - are used only if the card is saved for the terminal **** - are used only if the card is kept by the merchant

The composition of the keys of the PayInfo parameter:
NameDescriptionFormat
PANCard number or its identifierPAN - digits without spaces
EMonthCard expiration month2 digits with a leading zero
EYearCard expiration year2 digits (last digits of the year)
CardHolderSurname and name of the cardholderstring (maximum 30 characters, Latin letters or space)
SecureCodeCVC2 / CVV2. The parameter is optionalNumbers

Format of the parameter:
Code:
Goods Goods = Price, Characteristic of the subject of calculation, VAT rate | {Supplier data}
NameDescriptionFormat
PriceBlocked amount in minimum currency unitsDigits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. If not in the request, the value is taken from the terminal settings
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierINN" - supplier's INNJSON string. The parameter is optional

Example of transferring Goods:
Code:
Service = 100,4,1 | {"name": "LLC Name", "phoneNumbers": {["+11111111111"]}, "supplierSNN": "77777777"}; Service = 810,2 | {"name" : "LLC Name", "phoneNumbers": {["+11111114859"]}, "supplierSNN": "777757777"}; Service2 = 20.4; Product = 30

Request example
Sample POST request: https: // {domain} / Block Key: TestTerminal Amount: 300 OrderId: TestOrder123 PayInfo: PAN% 3D4111111111100023% 3BEMonth% 3D12% 3BEYear% 3D21% 3BCardHolder% 3DTEST% 20TESTOV% 3BSecureBode% 3Dms: Email =[email protected]

An example of implementing a request in the program code:
Code:
curl -X POST \
https://https://{domain}/Block \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=TestTerminal&Amount=300&OrderId=TestOrder123&PayInfo=PAN%253D4111111111100023%253BEMonth%253D04%253BEYear%253D21%253BC

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemCorresponds to the one passed in the request
AmountBlocked amount. Transmitted if "Success = true"Corresponds to the one passed in the request
AuthCodeAuthorization code. The parameter is optionalString (maximum 6 characters)
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageOptional parameter. Additional error descriptionLine
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine. None if the card is not involved in 3-D Secure technology
PaReq3-D Secure Authentication RequestLine. None if the card is not involved in 3-D Secure technology
ThreeDSKeyUnique identifier for the transactionLine. None if the card is not involved in 3-D Secure technology
RRNThe parameter is optional. RRN operationsLine
PANMaskThe parameter is optional. Masked card number in the format 123456xxxxxx1234Line
BankNameThe parameter is optional. Name of the Issuing BankLine
ProcessingResponseThe parameter is optional. Acquiring original refusalLine
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the request
FeePercentThe parameter is optional. Acquiring commission rateNumber
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
SourceOfficeThis parameter is optional. Organization ID when paying in GDSLine

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"ErrCode": "DUPLICATE_ORDER_ID"
}

Init - Create a payment session
This is done using the Init command. The method is used if the form for entering bank card data is on the side of merchant's. If the method call is successful, a unique identifier is returned, which allows you to call the payment page located on the side of merchant's in the future, and redirect the user to it to enter the card data.
Upon receipt of the session identifier, it is possible to indicate the purpose of using the payment form - to block funds on the card or to save the card in merchant's storage for subsequent debits. If the card is saved, subsequent debits can be made both with the input of CVV2 / CVC2, and without acceptance - without entering any data and the participation of the cardholder. These can be recurrent write-offs or classic transactions without entering CVV2 / CVC2. In the latter case, failures are possible due to the issuer's restrictions due to the need to use 3-D Secure technology.
The payment page can be designed in the Seller's design and is not unique (the Seller can have several data entry pages for different cases).

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
PasswordTerminal password. Issued to the Seller with test / combat access parametersLineYes
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)Not
AmountBlocked amount in minimum currency unitsDigits with no decimal or other separatorsNot
CustomParamsAdditional payment parameters to display on the template and to compose the user's return address if it is parameterizedA string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal). The list of possible parameters: Email - the client's email address for sending a fiscal receipt; successUrl - the address for redirecting the User from the payment page in case of success, failUrl - the address for redirecting the User from the payment page in case of failure; Description - an additional description of the order to be displayed on the payment form; PayButtonCustomText - text to be reflected on the button to initiate payment on the form. The possibility of using these parameters should be checked with [email protected]Not
AddCardA parameter that specifies whether to save the card after payment. Used in conjunction with the Type = Pay parameter. The default value for this parameter is "False". "True" - the card is saved. "False" - the card is not savedTrue / FalseNot
TypeThe type of session to create. Pay - a payment session is created. Add - a session is created to save the mapPay / AddYes
PaymentTypeThe parameter specifying the type of payment. OneStep is one step. TwoStep - two-stage. In the case of a one-step operation, as a result of success, the money will be debited from the user's cardOneStep / TwoStep. The default is OneStepNot
ActionAdditional action with a blocked amount. "Unblock" - unlockingOnly available for TwoStepNot
RecurrentIt must be used if the saved card will be used for recurrent write-offs. The possibility of use must be specified additionallytrue / falseNot
LifetimeSession validity period after which payment for this session will be impossible. If not transmitted, the session lifetime is set to one weekNumber in secondsNot
GoodsList of names of goods / services to be sent to the OFD A string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal). The total amount of all goods must correspond to the Amount. Length of one name - no more than 128 charactersNot
CardUId *Card ID. Used to pay with a saved cardString (maximum 50 characters)Not
UserLogin *Login of the cardholder registered in the merchant's systemString (maximum 50 characters)Not
UserPassword *Password of the cardholder registered in the merchant's systemString (maximum 50 charactersNot
merchant **Seller nameString (maximum 50 charactersNot
merchantPassword **merchant password for transactionsString (maximum 50 charactersNot
SplitUsed to divide the amount of the write-off made into its component parts for subsequent settlements with counterpartiesA string containing groups of key-value pairs, where groups are enclosed in curly braces {}, key-value pairs are separated by a “,” (comma). Key and value are separated by ":" (colon). The line is enclosed by square brackets "[]". The parameters of keys and values are issued to the Seller with the parameters of test / combat access. The total sum of all components must correspond to the AmountNot
* - used only if the card is saved / saved to the User
** - used only if the card is saved to the merchant
To save / pay for the saved card behind the terminal, these parameters do not need to be transmitted.

Depending on the business scenario, the card can be saved:
  • linked to the User Login
  • tied to the Terminal
  • linked to the merchant
    Depending on who the card is saved to, it is necessary to pass various parameters in the request for saving the card, request for the list of saved cards, and blocking funds on the card. A standard case for saving a card on the side of merchant's - with a link to the User's Login. If the card is saved at the Terminal or at the merchant, the correspondence of the saved cards with the Users is made on the side of the merchant. In response to a request for a list of saved cards, in this case, the entire array of saved maps will be contained.
Format of the parameter Goods
Code:
Goods = Price, Attribute of the subject of calculation, VAT rate, Attribute of the calculation method | {Supplier data}
NameDescriptionFormat
PriceBlocked amount in minimum currency unitsDigits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. Default value 1 - Product
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Calculation method attribute1 - Prepayment 100%, 2 - Partial prepayment, 3 - Advance payment, 4 - Full settlement, 5 - Partial settlement and credit, 6 - Transfer on credit, 7 - loan paymentNumber from 1 to 7. This parameter is optional. If it is absent in the request, the value 4 will be transmitted - Full calculation
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierINN" - supplier's INNJSON string. The parameter is optional

Request example
Sample POST request:
Code:
https: // {domain} / Init
Key: TestTerminal
Password: 123
Amount: 300
OrderId: TestOrder123
AddCard: True
Type: Pay
PaymentType: TwoStep
CustomParams: successUrl = https://merchant.com; failUrl = https://merchant.com;[email protected];PayButtonCustomText=Subscribe for 0.1 EUR

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / Init \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & Amount = 300 & OrderId = TestOrder123 & CustomParams = CustomParams% 3AsuccessUrl% 3Dhttps% 3A% 2F% 2Fmapcard.pro% 3BfailUrl% 3Dhttps% 3A% 2F% 2Fmapisacard.com% 3BEmail% 3Duser% 40example0% DText1% 9Custom% % D0% BE% D1% 80% D0% BC% D0% B8% D1% 82% D1% 8C% 20% D0% BF% D0% BE% D0% B4% D0% BF% D0% B8% D1% 81 % D0% BA% D1% 83% 20% D0% B7% D0% B0% 201% 20% D1% 80% D1% 83% D0% B1. '

Format of the parameter Goods
Code:
Goods = Price, Attribute of the subject of calculation, VAT rate, Attribute of the calculation method | {Supplier data}
NameDescriptionFormat
PriceBlocked amount in minimum currency unitsDigits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. Default value 1 - Product
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Calculation method attribute1 - Prepayment 100%, 2 - Partial prepayment, 3 - Advance payment, 4 - Full settlement, 5 - Partial settlement and credit, 6 - Transfer on credit, 7 - loan paymentNumber from 1 to 7. This parameter is optional. If it is absent in the request, the value 4 will be transmitted - Full calculation
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierSNN" - supplier's SNNJSON string. The parameter is optional

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemCorresponds to the one passed in the request
AmountBlocked amount. Transmitted if "Success = true"Corresponds to the one passed in the request
Typepay / addCorresponds to the one passed in the request
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageAdditional error description. Passed empty if "Success = true"Line
SessionGUIDUnique session identifierLine

Format of the parameter Goods:
Code:
Goods = Price, Attribute of the subject of calculation, VAT rate, Attribute of the calculation method | {Supplier data}
NameDescriptionFormat
PriceBlocked amount in minimum currency unitsDigits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. Default value 1 - Product
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Calculation method attribute1 - Prepayment 100%, 2 - Partial prepayment, 3 - Advance payment, 4 - Full settlement, 5 - Partial settlement and credit, 6 - Transfer on credit, 7 - loan paymentNumber from 1 to 7. This parameter is optional. If it is absent in the request, the value 4 will be transmitted - Full calculation
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierINN" - supplier's INNJSON string. The parameter is optional

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
"Type": "pay"
"SessionGUID": "1ILZMU42Zs8YivEsYXOA67ijRYs"}

Example response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "WRONG_PARAMS"
}

Format of the parameter Goods
Code:
Goods = Price, Attribute of the subject of calculation, VAT rate, Attribute of the calculation method | {Supplier data}
NameDescriptionFormat
PriceBlocked amount in minimum currency unitsDigits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. Default value 1 - Product
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Calculation method attribute1 - Prepayment 100%, 2 - Partial prepayment, 3 - Advance payment, 4 - Full settlement, 5 - Partial settlement and credit, 6 - Transfer on credit, 7 - loan paymentNumber from 1 to 7. This parameter is optional. If it is absent in the request, the value 4 will be transmitted - Full calculation
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierSNN" - supplier's SNNJSON string. The parameter is optional

Example of transferring Goods:
Code:
Service=100,4,1,3|{"name": "LLC Name", "phoneNumbers": ["+11111111111"],"supplierSNN": "77777777"};Goods=810,1|{"name": "LLC Name", "phoneNumbers": ["+11111114859"],"supplierSNN": "777757777"};Service2=20,4;Goods2=30

createPayment - Call a payment form
Performed using the createPayment command. The request is used to redirect the user to the form for entering the card details for subsequent payment or saving the card. As a result of the command execution by the GET / POST method, the template (form) for entering the data (details) of the bank card specified by the parameters specified in the Init command is called.

Request parameters
NameDescriptionFormatMandatory
SessionIdSession ID obtained as a result of Init requestLine

Request example
Sample POST request:
Code:
https:{domain}/createPayment
SessionID:1EWlFnYuojSEVAjkEys2341

An example of implementing a request in the program code:
Code:
curl -X GET 'https:{domain}/createPayment?SessionID=1EWlFnYuojSEVAjkEys2341'

As a result of the method call, the user is redirected to the card data entry template for subsequent payment or saving the card details.
After successful payment or completion of the number of payment attempts, the user will be returned to the Seller's page. The return address (page URL) is indicated by the Seller in advance when connecting. The address can be specified in a parameterized form. In this case, the parameters inserted into the address must be specified in the CustomParams field of the Init method.
As a result of the method call, the user is redirected to the card data entry template for subsequent payment or saving the card details.

Charge - Write-off of blocked funds
The request is executed by the Charge command.
The request is used to write off funds from the User's card, previously blocked by the Block command.
The result of processing the request is the debiting of the blocked amount from the User's card. A write-off can be made for an amount less than the amount of previously blocked funds. Write-off on order can be performed only once.
Attention: for a successful write-off, it is necessary that at the time of execution of the request the payment has the status of Authorized

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderIdPayment ID in merchant's systemString (maximum 50 characters)Yes
AmountAmount to be debited in minimum currency units Digits with no decimal or other separators

Request example
Sample POST request:
Code:
https: // {domain} / Charge
Key: TestTerminal
Amount: 300
OrderId: TestOrder123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / Charge \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & Amount = 300 & OrderId = TestOrder123 '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemCorresponds to the one passed in the request
AmountAmount written offCorresponds to the one given in the request. "0" is transmitted if "Success = false"
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageOptional parameter. Additional error description. Passed empty if "Success = true"Line
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the Block request
FeePercentThe parameter is optional. Acquiring commission rate, in tenths of the numberNumber
FeeThe parameter is optional. Acquiring fee amountNumber
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
RRNThe parameter is optional. RRN operationsLine
PANMaskThe parameter is optional. Masked card number in the format 123456xxxxxx1234Line
BankNameThe parameter is optional. Name of the Issuing BankLine
KeySeller ID. Matches the one passed in the requestLine
ProcessingResponseThe parameter is optional. Acquiring original refusalLine
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumb

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Key": "TestTerminal",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"Key": "TestTerminal",
"Amount": 0,
"ErrCode": "ILLEGAL_ORDER_STATE"
}

Unblock - Unlocking funds on the card
The request is executed by the Unblock command.
The request is used to unblock funds from the User's card, previously blocked by the Block command. As a result of successful processing of the request, the unlocked funds become available on the User's card.
Attention: for a successful write-off, it is necessary that at the time of execution of the request the payment has the status of Authorized

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderIdUnique payment identifier in merchant systemString (maximum 50 characters)Yes
AmountAmount to unlock in minimum currency unitsDigits with no decimal or other separators

Request example
Sample POST request:
Code:
https: // {domain} / Unblock
Key: TestTerminal
Amount: 300
OrderId: TestOrder123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / Unblock \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & Amount = 300 & OrderId = TestOrder123 '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemCorresponds to the one passed in the request
NewAmountChanged blocked amountDigits with no decimal or other separators
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageOptional parameter. Additional error description. Passed empty if "Success = true"Line
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the Block request
FeePercentThe parameter is optional. Acquiring commission rate, in tenths of the numberNumber
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
ProcessingResponseThe parameter is optional. Acquiring original refusalLine

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"NewAmount": 0,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"NewAmount": 0,
"ErrCode": "AMOUNT_EXCEED"
}

Refund
The request is executed by the Refund command.
The request is used to make a refund to the User's card, previously debited by the Charge team. The result of processing the request is the return (full or partial) of the debited funds to the User's card.
Attention: for a successful refund, it is necessary that at the time of execution of the request the payment has the Charged status.

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderIdPayment ID in merchant systemString (maximum 50 characters)Yes
AmountRefund amount in minimum currency units Digits with no decimal or other separatorsYes
GoodsList of names of goods / services to be sent to the OFD A string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal). The total of all items must match Amount. Length of one name - no more than 128 charactersNot

Parameter format Goods
Code:
Item = Price, Attribute of the subject of calculation, VAT rate, Attribute of the calculation method | {Supplier data}
NameDescriptionFormat
PriceRefund amount in minimum currency units Digits with no decimal or other separators
Calculation subject attribute1 - Goods, 2 - Excisable goods, 3 - Work, 4 - Service, 5 - Gambling rate, 6 - Winning a gambling, 7 - Lottery ticket, 8 - Winning a lottery, 9 - Provision of RID, 10 - Payment, 11 - Agency fee, 12 - Composite subject of calculation, 13 - Other subject of calculationNumber from 1 to 13. The parameter is optional. Default value 1 - Product
VAT rate1 - VAT rate 20%, 2 - VAT rate 10%, 3 - VAT rate calc. 20/120, 4 - VAT rate calc. 10/110, 5 - VAT rate 0%, 6 - VAT exemptNumber from 1 to 6. This parameter is optional. If not in the request, the value is taken from the terminal settings
Calculation method attribute1 - Prepayment 100%, 2 - Partial prepayment, 3 - Advance payment, 4 - Full settlement, 5 - Partial settlement and credit, 6 - Transfer on credit, 7 - loan paymentNumber from 1 to 7. This parameter is optional. If it is absent in the request, the value 4 will be transmitted - Full calculation
Supplier data"name" - Name, "phoneNumbers" - list of phone numbers, "supplierSNN" - supplier's SNNJSON string. The parameter is optional

Transfer example Goods
Code:
Service=100,4,1,3|{"name": "LLC Name", "phoneNumbers": ["+11111111111"],"supplierSNN": "77777777"};Goods=810,1|{"name": "LLC Name", "phoneNumbers": ["+11111114859"],"supplierSNN": "777757777"};Service2=20,4;Goods2=30

If the Goods parameter is not specified in the request, then:
  • in the case of a full refund, the check will indicate the items from the write-off on the order;
  • in case of partial refund, the fiscal receipt will contain the position "Partial refund" with parameters for fiscalization by default (from the terminal settings).

Request example
Sample POST request:
Code:
https: // {domain} / Refund
Key: TestTerminal
Amount: 300
OrderId: TestOrder123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / Refund \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & Amount = 300 & OrderId = TestOrder123 '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's system. Transmitted if "Success = true"Corresponds to the one passed in the request
Keymerchant ID in merchant system. Transmitted if "Success = true"Corresponds to the one passed in the request
NewAmountChanged written off amount. Transmitted if "Success = true"Digits with no decimal or other separators
ErrCodeDescription of the error. Passed empty if "Success = true"See error codes
ErrMessageOptional parameter. Additional error description. Passed empty if "Success = true"Line
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the Block request
FeePercentThe parameter is optional. Acquiring commission rate, in tenths of the numberNumber
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
BankNameThe parameter is optional. Name of the Issuing BankLine
ProcessingResponseThe parameter is optional. Acquiring original refusalLine
RRNThe parameter is optional. RRN operationsLine

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"NewAmount": 0,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"Key": "TestTerminal",
"NewAmount": 0,
"ErrCode": "AMOUNT_EXCEED"
}

Pay - One-step payment
This is done using the Pay command.
This request allows you to block and write off funds from the Buyer's card. One-step payment is similar to sequential calls to the Block and Charge methods.
The parameters of the request, response and composition of the fields are similar to the parameters of the Block command.

If a refusal is received at the stage of debiting after successful authorization, the result in the response to the Pay method will not be successful, while the order status is "Authorized":
Code:
{
"Success": false,
"State": "Authorized"
}
* Writing off the blocked amount in this case can be done with a separate Charge command.

getState - Get the status of the payment
This is done using the getState command.
This request allows you to get information about the current status of the transaction (payment).

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderId *Unique payment identifier in merchat's systemString (maximum 50 characters)Yes
SessionOrderId *Payment ID in the merchant's systemString (maximum 50 characters)Yes
* one of these parameters is passed in the request

Request example
Sample POST request:
Code:
https: // {domain} / getState
Key: TestTerminal
SessionOrderId: TestOrder123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / getState \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & SessionOrderId = TestOrder123 '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageOptional parameter. Additional error descriptionLine
OrderIdPayment ID in the merchant's systemLine
AmountOrder amount in minimum currency unitsDigits with no decimal or other separators
StatePayment status. Transmitted if "Success = true"For possible values, see Order Statuses.
merchantOrderIdUnique payment identifier in merchant's systemLine
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the Block or Charge request (or Params from the Init request)
FeePercentThe parameter is optional. Acquiring commission rate, in tenths of a number. Passed empty if "Success = false"Number
TerminalIDThe parameter is optional. Id of the terminal in the merchant's system, on which the operation was actually performedNumber
AuthCodeThe parameter is optional. Authorization codeString (maximum 6 characters)
FeeThe parameter is optional. Acquiring fee amountNumber
CardHolderThe parameter is optional. Full name of the cardholderNumber
CardTypeThe parameter is optional. Card typeNumber

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"State": "Charged",
"Amount": 300,
"merchantOrderId": "1IPAaOFn24UijYp6xqwmx"
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "",
"State": "",
"Amount": 0,
"ErrCode": "NOT_FOUND"
}

createUser - Create a new user
This is done using the createUser command.
The request allows you to register a new user. Together with the saved card, this will allow you to make a payment without entering the bank card details, incl. recurring payments. The result of the request processing is the receipt by the merchant of the user ID in merchant payment gateway.

Request parameters

json
NameDescriptionFormatMandatory 1
keySeller ID. Issued with test / combat access parametersLine
credentialAn object
+- loginUsername (cardholder). Used to identify the userString (maximum 50 characters)
+- passwordUser (cardholder) password. Used to identify the userString (maximum 50 characters)
ipUser's IP addressA string in the form of four octets (8-bit numbers) from 0 to 255, separated by dots (for example, 172.14.255.1)
phoneUser phone numberString (maximum 50 characters)
emailUser's email addressString (maximum 50 characters)

urlencoded
NameDescriptionFormatMandatory 1
KeySeller ID. Issued to the Seller with test / combat access parametersLine
LoginUsername (cardholder). Used to identify the userString (maximum 50 characters)
PasswordUser (cardholder) password. Used to identify the userString (maximum 50 characters)
IPUser's IP addressA string in the form of four octets (8-bit numbers) from 0 to 255, separated by dots (for example, 172.14.255.1)
PhoneUser phone numberString (maximum 50 characters)
EmailUser's email addressString (maximum 50 characters
1* Requirements Required parameters are the same for pay channels eCom, AP, GP.

Request example

json
Sample POST request:
Code:
Content-Type: application / json https:{domain}/createUser
{
"key": "TestTerminal",
"credential": {
"login": "UserLogin_1",
"password": "UserPass_1"
},
"ip": "192.162.1.1",
"phone": "",
"email": ""
}

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/createUser \
-H 'Content-Type: application/json' \
-d '{"key":"TestTerminal","credential":{"login":"UserLogin_1","password":"UserPass_1"},"ip":"192.162.1.1","phone":"","email":""}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded https:{domain}/createUser
Key:TestTerminal
Login:TestUser
Password:123

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/createUser \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=TestTerminal&Login=TestUser&Password=123'

Response options
NameDescriptionFormatMandatory 1
SuccessOperation success flagtrue / false
UserIdmerchant user IDnumber2
AlreadyCreatedThe flag of the presence of a user in merchant's systemtrue / false
ErrCodeError descriptionsee error codes3
1* Requirements Required parameters are the same for pay channels eCom, AP,GP
2* Transmitted if the reply containsSuccess=true
3* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"UserId": 11,
"AlreadyCreated": false,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"UserId": 11,
"AlreadyCreated": true,
"ErrCode": ""
}

{
"Success": false,
"ErrCode": "WRONG_PARAMS"
}

storeCard - Register (save) card
Performed using the storeCard command.
This request allows you to save the details of the User's bank card for subsequent payment without entering the card data. The result of processing the request is the receipt by the merchant of the card ID in merchant.

Depending on the business scenario, the card can be saved:
  • linked to the User Login
  • tied to the Terminal
  • linked to the merchant
    Depending on who the card is saved to, it is necessary to pass various parameters in the request for saving the card, request for the list of saved cards, and blocking funds on the card.
A standard case for saving a card on the side of merchant - with a link to the User's Login. If the card is saved at the Terminal or at the merchant, the correspondence of the saved cards with the Users is made on the side of the merchant. In response to a request for a list of saved cards, in this case, the entire array of saved maps will be contained.

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderIdPayment ID in the merchant's system. Transmitted together with AmountString (maximum 50 characters)Not
AmountThe blocking amount in the minimum currency units. When using it, funds from the client's card are blockedDigits with no decimal or other separatorsNot
Login *User login. Used to identify cardsString (maximum 50 characters)Not
Password *Password of the cardholder registered in the merchant's systemString (maximum 50 charactersNot
PANCard numberNumbers without spacesYes****
EMonthCard expiration month2 digits with a leading zeroYes****
EYearCard expiration year2 digits (last digits of the year)Yes****
CardHolderSurname and name of the cardholderstring (maximum 30 characters, Latin letters or space)Yes****
SecureCodeCVC2 / CVV2Numbers without spacesYes****
ApplePayTokenA one-time token received in Apple Pay when a payment is initiated from an Apple deviceLineNot
ParamsList of additional parameters of the operationA string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal)Not
RecurrentIt must be used if the saved card will be used for recurrent write-offs. The possibility of use must be specified additionallytrue / falseNot
ActionAdditional action with a blocked amount. "Charge" - write-off, "Unblock" - unblockingCharge / UnblockNot
EnrollmentSign of the card's involvement in 3D Secure technology. In this case, only the card of the specified type is saved. "3DS" - the card is involved in 3D Secure technology, "Non-3DS" - the card is not involved in 3D Secure technology. The possibility of use must be specified additionally3DS / Non-3DSNot
TerminalPassword **Terminal password for transactionsString (maximum 50 charactersNot
merchant ***Seller nameString (maximum 50 charactersNot
merchantPassword ***merchant password for transactionsString (maximum 50 charactersNot
GoodsList of names of goods / services to be sent to the OFD (54-FZ)A string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal). The total amount of all goods must match the AmountNot
SplitUsed to divide the amount of the write-off made into its component parts for subsequent settlements with counterpartiesA string containing groups of key-value pairs, where groups are enclosed in curly braces {}, key-value pairs are separated by a “,” (comma). Key and value are separated by ":" (colon). The line is enclosed by square brackets "[]". The parameters of keys and values are issued to the Seller with the parameters of test / combat access. The total sum of all components must correspond to the AmountNot
* - transmitted together. Used only if the card is kept by the User
** - Used only if the card is kept by the terminal
*** - are transferred together. Used only if the card is kept by the merchant
**** - mandatory if the ApplePayToken parameter is absent in the request

Request example
Sample POST request:
Code:
https: // {domain} / storeCard
Key: TestTerminal
Login: TestUser
Password: 123
PAN: 4111111111111111
EMonth: 12
EYear: 21
CardHolder: John Smith
SecureCode: 123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / storeCard \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & Login = TestUser & Password = 123 & PAN = 4111111111111111 & EMonth = 12 & EYear = 21 & CardHolder = John% 20Smith & SecureCode = 123 '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
CardUIdID of the card in the merchant's systemGUID
PANMaskMasked card number in the format 123456xxxxxx1234String 13-19 characters
OrderIdPayment ID in the merchant's systemMatches the one passed in the request
AuthCodeThe parameter is optional. Authorization codeString (maximum 6 characters)
RRNThe parameter is optional. RRN operationsLine
IsActiveCard status"True" / "False"
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
ErrMessageOptional parameter. Additional error descriptionLine
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the request
FeePercentThe parameter is optional, in tenths of a numberNumber
TerminalIDThe parameter is optional. Id of the terminal in the merchat's system, on which the operation was actually performedNumber
ProcessingResponseThe parameter is optional. Acquiring original refusalLine
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine. None if the card is not involved in 3-D Secure technology
PaReq3-D Secure Authentication RequestLine. None if the card is not involved in 3-D Secure technology
ThreeDSKeyUnique identifier for the transactionLine. None if the card is not involved in 3-D Secure technology

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"CardUId": "7sTwecksRSs1fIpUQw8su",
"PANMask": "411111xxxxxx1111",
"IsActive": true,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "INVALID_AUTHENTICATION"
}

Response parameters in case of saving a card involved in 3-D Secure technology are similar to those described in using 3D Secure technology. To obtain a card ID, it is necessary to complete the holder's 3DS authentication (StoreCard3DS method).

removeCard - Remove card
This is done using the removeCard command.
The result of request processing is a change in the status of the linked card from “Active” to “Deleted”. In order to return it to the “Active” status in the future, it is necessary to perform the procedure of saving the card again - in this case, the card will be assigned a new identifier.

Request parameters

json
NameDescriptionFormatMandatory 1
keySeller ID. Issued with test / combat access parametersLine
cardCard data for making a transactionAn object
+- uidCard ID in merchant's systemLine
credentialAn object
+- loginLogin of the cardholder registered in the merchant's system. Used only if the card is saved to a specific userString (maximum 50 characters)
+- passwordPassword of the cardholder registered in the merchant's system. Used only if the card is saved to a specific userString (maximum 50 characters)
+- merchant_nameSeller name. Used only if the card is saved for the merchantString (maximum 50 characters)
+- merchant_passwordmerchant password for transactions. Used only if the card is saved for the merchantString (maximum 50 characters)
+- terminal_passwordTerminal password for performing operations. Used only if the card is stored in the terminalString (maximum 50 characters)

urlencoded
NameDescriptionFormatMandatory 1
KeySeller ID. Issued to the Seller with test / combat access parametersLine
CardUIdThe ID of the card to be removed in merchant's systemLine
UsrLoginLogin of the cardholder registered in the merchant's system. Used only if the card is saved to a specific userString (maximum 50 characters)
UsrPasswordPassword of the cardholder registered in the merchant's system. Used only if the card is saved to a specific userString (maximum 50 characters)
merchantSeller name. Used only if the card is saved for the merchantString (maximum 50 characters
merchantPasswordmerchant password for transactions. Used only if the card is saved for the merchantString (maximum 50 characters
TerminalPasswordTerminal password for performing operations. Used only if the card is stored in the terminalString (maximum 50 characters
1* Requirements Required parameters are the same for pay channels eCom, AP, GP.

Request example

json
Sample POST request:
Code:
Content-Type: application / json https:{domain}/removeCard
{
"credential": {
"login": "TestUser",
"password": "123",
},
"card": {
"uid": "456ceFOFYXmjlZraP12nfP"
}
}

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/removeCard \
-H 'Content-Type: application/json' \
-d '{"credential":{"login":"TestUser","password":"123",},"card":{"uid":"456ceFOFYXmjlZraP12nfP"}}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded https:{domain}/removeCard
UsrLogin : TestUser
UsrPassword : 123
CardUId: 456ceFOFYXmjlZraP12nfP

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/removeCard \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'UsrLogin=TestUser&UsrPassword=123&CardUId=456ceFOFYXmjlZraP12nfP'

Response options
NameDescriptionFormatMandatory 1
SuccessOperation success flagtrue / false
CardUIdThe identifier of the card to be removed in merchant's systemmatches request2
ErrCodeError descriptionsee error codes2
1* Requirements Required parameters are the same for pay channels eCom, AP, GP.
2* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"CardUId": "7sTwecksRSs1fIpUQw8su",
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "INVALID_AUTHENTICATION"
}

listCard - Request a list of registered cards
Performed using the listCard command.
This request allows you to get a list of cards stored in merchant with the purpose of their further use to pay for services or goods.

Request parameters
NameDescriptionFormatMandatory
Key *Seller ID. Issued to the Seller with test / combat access parametersLineNot
TerminalPassword **Terminal password for transactionsString (maximum 50 charactersNot
Login ***User login. Used to identify cardsString (maximum 50 characters)Not
Password ***Password of the cardholder registered in the merchant's systemString (maximum 50 charactersNot
merchant ****Seller nameString (maximum 50 charactersNot
merchantPassword ****merchant password for transactionsString (maximum 50 charactersNot
* - Used to request a list of cards stored in the terminal or the User
** - Used to request a list of cards stored in the terminal
*** - Used to request a list of cards stored in the User
**** - Used to request a list of cards, saved for the merchant

Request example
Sample POST request:
Code:
https: // {domain} / listCard
Login: TestUser
Password: 123

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / listCard \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Login = TestUser & Password = 123 & CardUId = 456ceFOFYXmjlZraP12nfP '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
CardUIdThe identifier of the card to be removed in merchant's system. Transmitted if "Success = true"GUID
PANMaskMasked card number in 6..4 format. Transmitted if "Success = true"String 13-19 characters
BankNameThe parameter is optional. Issuing bank nameString, 50 characters
CardHolderSurname, name of the cardholder, indicated on the face of the cardString, 50 characters
StatusCard status. Active - the card is active and can be used for debiting. Transmitted if "Success = true"String, 50 characters
ErrCodeError code. Not transmitted if "Success = true"See error codes

Sample response
An example of a response to a successful request:
Code:
{
"PanMask": "411111xxxxxx1111",
"CardUId": "Gnxs8dXqhObnvKwy38djkG",
"EMonth": 12,
"EYear": 21,
"Status": "Active",
"CardHolder": "John Smith"
},
{
" PanMask ":" 411111xxxxxx0023 ",
" CardUId ":" flsWu82F7j8UUMmbcPws89Nx3 ",
" EMonth ": 12,
" EYear ": 22,
" Status ":" Active ",
" CardHolder ":"John Smith"
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "INVALID_AUTHENTICATION"
}

Block3DS - Using 3D Secure Technology
It is used when the Seller connects the 3-D Secure authentication mechanism. The order of execution - authentication of the cardholder on the side of the issuing bank and reporting the results to the gateway service.
Upon receipt of a request to block funds, the gateway verifies that the card participates in 3-D Secure authentication.

If the User's card is involved in 3-D Secure technology, then the response also contains the ACSUrl, PaReq and ThreeDSKey attributes.
NameDescriptionFormat
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine
PaReq3-D Secure Authentication RequestLine
ThreeDSKeyUnique identifier for the transactionLine

After receiving a response from the gateway, the merchant redirects the cardholder to the site of the issuing bank for additional authentication. For this, a POST request is used to the address specified in the value of the ACSUrl attribute, with the parameters listed below.
NameDescriptionFormat
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine
TermUrlRedirect address after successful 3-D Secure authenticationLine
MDUnique identifier for the transactionCorresponds to the ThreeDSKey parameter from the response to the previous request
PaReq3-D Secure Authentication RequestLine

Example request:
Code:
<body onload="document.form.submit()" >
<form name="form" action="{ACSUrl}" method="post" >
<input type="hidden" name="TermUrl" value="{TermUrl}" >
<input type="hidden" name="MD" value="{ThreeDSKey}" >
<input type="hidden" name="PaReq" value="{PaReq}" >
</form>
</body>

After authorization on the website of the issuing bank, the user is returned by an HTTPS POST request to the address specified in the value of the TermUrl attribute, with the parameters specified below.
NameDescriptionFormat
MDUnique identifier for the transactionMatches the one passed in the request
PaResAn encrypted string containing the results of 3-D Secure authenticationLine
The authorization is completed by the Block3DS command.

Request parameters
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLineYes
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)Yes
PaResAn encrypted string containing the results of 3-D Secure authenticationCorresponds to the answer from ACSYes

Request example
Sample POST request:
Code:
https: // {domain} / Block3DS
Key: TestTerminal
OrderId: TestOrder123
PaRes: JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l

An example of implementing a request in the program code:
Code:
curl -X POST \ https: // https: // {domain} / Block3DS \
-H 'Content-Type: application / x-www-form-urlencoded' \
-d 'Key = TestTerminal & OrderId = TestOrder123 & PaRes = JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l '

Response options
NameDescriptionFormat
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemCorresponds to the one passed in the request
AmountBlocked amount. Transmitted if "Success = true"Corresponds to the one passed in the request
CardUIdID of the card in the merchant's system. Passed in response to the StoreCard3DS methodGUID
PANMaskMasked card number in the format 123456xxxxxx1234. Passed in response to the StoreCard3DS methodString 13-19 characters
StatusCard status. Passed in response to the StoreCard3DS methodisActive - the card is active and can be used for debiting
AuthCodeAuthorization code. The parameter is optionalString (maximum 6 characters)
ErrCodeDescription of the error. Passed empty if "Success = true"see error codes
CustomParamsThe parameter is optional. List of additional parameters of the operationMatches the Params passed in the request
fee_percentThe parameter is optional. Acquiring commission rate, in tenths of the numberNumber
terminal_idThe parameter is optional. Id of the terminal in the merchant system, on which the operation was actually performed

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId ":" TestOrder123 ",
" ErrCode ":" AMOUNT_EXCEED "

In case of a one-step payment (in the case of using the Pay method), you must use the Pay3DS method instead of the Block3DS method to complete the 3-DS operation.
When saving a card involved in 3-D Secure technology, to complete the operation and receive a card ID in response, you must use the StoreCard3DS method.
The request, response parameters and field compositions of the Pay3DS and StoreCard3DS methods are similar to the Block3DS method.

Payout - Crediting funds to the card
Performed using the Payout command.
The request allows you to transfer funds to the User's card from the merchant's current account. A current account must be opened with a bank or an NCO providing funds transfer. The ID of the registered card obtained in response to the storeCard request or the full details of the new card can be specified as a card.

Request parameters

json
NameDescriptionFormateCom
keySeller ID. Issued to the Seller with test / combat access parametersLine
merchant_order_idPayment ID in the merchant's systemString (maximum 50 characters)
amountAmount to be transferred Digits with no decimal or other separators
cardCard data for making a transactionAn object
+- panCard number. Used in case of transferring funds by card numberString: numbers without spaces1
+- uidID of the card in merchant system. Used in case of transferring funds by card IDString (maximum 30 characters, Latin letters or space)2
custom_params_rdyList of additional parameters of the operation in the "key-value" formatAn object
credentialAn object
loginLogin of the cardholder registered in the merchant's system. Used in case of transferring funds by the identifier of the card saved by the userString (maximum 50 characters)
passwordPassword of the cardholder registered in the merchant's system. Used in case of transferring funds by the identifier of the card saved by the userString (maximum 50 characters)
merchantSeller name. Used in case of transferring funds by the identifier of the card saved by the merchantString (maximum 50 characters
merchant_passwordmerchant password for transactions. Used in case of transferring funds by the identifier of the card saved by the merchantString (maximum 50 characters
terminal_passwordTerminal password for performing operations. Used in case of transferring funds by the identifier of the card stored in the terminalString (maximum 50 characters

urlencoded
NameDescriptionFormateCom
KeySeller ID. Issued to the Seller with test / combat access parametersLine
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)
AmountAmount to be transferredDigits with no decimal or other separators
PANCard number. Used in case of transferring funds by card numberNumbers without spaces1
CardUIdID of the card in merchant's system. Used in case of transferring funds by card IDLine1
LoginLogin of the cardholder registered in the merchant's system. Used in case of transferring funds by the identifier of the card saved by the userString (maximum 50 characters)
PasswordPassword of the cardholder registered in the merchant's system. Used in case of transferring funds by the identifier of the card saved by the userString (maximum 50 characters)
merchantSeller name. Used in case of transferring funds by the identifier of the card saved by the merchantString (maximum 50 characters
merchantPasswordmerchant password for transactions. Used in case of transferring funds by the identifier of the card saved by the merchantString (maximum 50 characters
TerminalPasswordTerminal password for performing operations. Used in case of transferring funds by the identifier of the card stored in the terminalString (maximum 50 characters
ParamsList of additional parameters of the operationA string containing pairs of keys and their command values, separated by ";" (semicolon). Keys and values are separated by "=" (equal)
1* Parameter is required if there is nouid
2* This parameter is required if there is nopan

Request example

json
Sample POST request:
Code:
Content-Type: application / json https:{domain}/Payout
{
"key": "TestTerminal",
"merchant_order_id": "TestOrder123",
"card": {
"pan": "4111111111111111"
}
}

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/Payout \
-H 'Content-Type: application/json' \
-d '{"key":"TestTerminal","merchant_order_id":"TestOrder123","card":{"pan":"4111111111111111"}}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded https:{domain}/Payout
Key:TestTerminal
Amount:300
OrderId:TestOrder123
PAN:4111111111111111

An example of implementing a request in the program code:
Code:
curl -X POST \
https:https:{domain}/Payout \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=TestTerminal&Amount=300&OrderId=TestOrder123&PAN=4111111111111111'

Response options
NameDescriptionFormateCom
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemMatches the one passed in the request
AmountAmount creditedMatches the one passed in the request1
ErrCodeError descriptionSee error codes2
ErrMessageAdditional error descriptionLine
RRNRRN operationsLine
BankNameName of the Issuing BankLine
ProcessingResponseAcquiring original refusalLine
CustomParamsList of additional parameters of the operationMatches the Params passed in the request
TerminalIDID of the terminal in the merchant's system on which the operation was actually performedNumber
1* Transmitted if the reply containsSuccess=true
2* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Status": "True",
"OrderId": "TestOrder123",
"Amount": "300",
"ErrCode": "NONE",
"BankName": "TestBank",
},

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "INVALID_AUTHENTICATION"
}

getReceipt - request fiscal data for an order
This is done using the getReceipt command. This request allows you to get fiscal characteristics for an order to generate a check on the side of the merchant.

Request parameters

json
NameDescriptionFormatMandatory
keySeller ID. Issued to the seller with test / combat access parametersLine
map_order_idCard data for making a transactionString (maximum 50 characters)
receipt_idCheck IDString (maximum 50 characters)1

urlencoded
NameDescriptionFormatMandatory
KeySeller ID. Issued to the Seller with test / combat access parametersLine
OrderIdUnique payment identifier in merchant's systemString (maximum 50 characters)
ReceiptIdCheck IDString (maximum 50 characters)
1* If not included in the request, the response will contain fiscal data on the last transaction for the order

Request example

json
Sample POST request:
Code:
Content-Type: application / json
https:{domain}/getReceipt
{
"key": "AutoTest_54FZ(OrangeData)",
"merchant_order_id": "52cc5355-775b-4903-bd86-5b1e5e259065TestOrgD5",
"receipt_id": "1atY16Z3wr62fhMogQmFwIDaa4C"
}

An example of implementing a request in the program code:
Code:
curl -X POST \
https:{domain}/getReceipt \
-H 'Content-Type: application/json' \
-d '{"key": "AutoTest_54FZ(OrangeData)","merchant_order_id": "52cc5355-775b-4903-bd86-5b1e5e259065TestOrgD5","receipt_id": "1atY16Z3wr62fhMogQmFwIDaa4C"}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded
https:{domain}/getReceipt
Key:AutoTest_54FZ(OrangeData)
OrderId:52cc5355-775b-4903-bd86-5b1e5e259065TestOrgD5
ReceiptId: 1atY16Z3wr62fhMogQmFwIDaa4C

An example of implementing a request in the program code:
Code:
curl -X POST \
https:{domain}/getReceipt \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=AutoTest_54FZ(OrangeData)&OrderId52cc5355-775b-4903-bd86-5b1e5e259065TestOrgD5&ReceiptId=1atY16Z3wr62fhMogQmFwIDaa4C'

Response options
NameDescriptionFromat
IdDocument IDString from 1 to 64 characters
DeviceSNSerial number of the device that punched the checkString up to 20 characters
DeviceRNRegistration number of the device that made the checkString up to 20 characters
FsNumberFiscal accumulator numberString 16 characters
OFDNameOFD nameString up to 256 characters
OFDWebsiteCRF websiteString up to 58 characters
OFDINNINN OFDString 12 characters
FNSWebsiteFTS websiteString up to 256 characters
CompanyINNUser's TINString 12 characters
CompanyNameUser nameString up to 256 characters
DocumentNumberFD numberNumber
ShiftNumberShift numberNumber
DocumentIndexCheck number per shiftNumber
ProcessedAtTime of registration of a fiscal document in the FNTime as a string in ISO8601 format
ContentDocument contentAn object
+- TypeCalculation attribute
  1. 1 - Parish
  2. 2 - Return receipt
  3. 3 - Consumption
  4. 4 - Return of consumption
Number
+- PositionsList of items of calculationArray of objects
+-- QuantityThe number of the subject of calculationNumber
+-- PriceUnit price of the subject of calculation, taking into account discounts and marginsNumber
+-- TaxVAT rate. An integer from 1 to 6.
  1. 1 - VAT rate 20%
  2. 2 - VAT rate 10%
  3. 3 - VAT rate calc. 20/120
  4. 4 - VAT rate calc. 10/110
  5. 5 - VAT rate 0%
  6. 6 - VAT exempt
Number
+-- TextCalculation subject nameString up to 128 characters
+-- SubjectTypeCalculation subject attribute
  1. 1 - Product
  2. 2 - Excise goods
  3. 3 - Work
  4. 4 - Service
  5. 5 - Bet of gambling
  6. 6 - Winning a gamble
  7. 7 - Lottery ticket
  8. 8 - Winning the lottery
  9. 9 - Provision of RID
  10. 10 - Payment
  11. 11 - Agency fee
  12. 12 - Payment
  13. 13 - Other subject of calculation
  14. 14 - Property law
  15. 15 - Non-operating income
  16. 16 - Other payments and contributions
  17. 17 - Trade fee
  18. 18 - Resort fee
  19. 19 - Pledge
  20. 20 - Consumption
  21. 21 - Contributions to compulsory pension insurance for individual entrepreneurs
  22. 22 - Contributions to compulsory pension insurance
  23. 23 - Contributions to compulsory health insurance for individual entrepreneurs
  24. 24 - Contributions for compulsory health insurance
  25. 25 - Contributions to compulsory social security
  26. 26 - Casino payment
Number
+- CheckCloseCheck closing optionsAn object
+-- PaymentsPaymentArray of objects
+--- TypePayment type
  1. 1 - the amount of the check in cash
  2. 2 - the amount of the check by non-cash
  3. 14 - the amount of the check in advance (offsetting the advance and (or) previous payments), UTII
  4. 15 - postpaid check amount (on credit)
  5. 16 - amount of the check (SRF) by counter presentation
Number
+--- AmountThe value of the additional user attributeNumber
+-- TaxationSystemTax system
  1. 0 - General, OCH
  2. 1 - Simplified income, STS income
  3. 2 - Simplified income minus expense, STS income - expense
  4. 3 - Unified tax on imputed income
  5. 4 - Unified agricultural tax, UST
  6. 5 - Patent taxation system, Patent
Number
+- CustomerContactBuyer's phone or email addressString up to 64 characters
changeSurrenderDecimal number up to 2 characters after the dot
fpFiscal signString 10 characters

Sample response
An example of a response to a successful request:
Code:
{
"Id": "1atY16Z3wr62fhMogQmFwIDaa4C",
"DeviceSN": "1400000000001093",
"DeviceRN": "0000000400054952",
"FsNumber": "9999078900001341",
"OFDName": "ООО \"Ярус\" (\"ОФД-Я\")",
"OFDWebsite": "www.ofd-ya.ru",
"OFDINN": "7728699517",
"FNSWebsite": "www.nalog.ru",
"CompanyINN": "9701015273",
"CompanyName": "AutoTestmerchant",
"DocumentNumber": 1586,
"ShiftNumber": 5776,
"DocumentIndex": 313,
"ProcessedAt": "2020-04-22T14:47:00",
"Content": {
"Type": 1,
"Positions": [
{
"Quantity": 1,
"Price": 500,
"Tax": 3,
"Text": "Mock3",
"SubjectType": 6
},
{
"Quantity": 1,
"Price": 500,
"Tax": 5,
"Text": "Mock2",
"SubjectType": 5
},
{
"Quantity": 1,
"Price": 500,
"Tax": 4,
"Text": "Mock1",
"SubjectType": 3
},
{
"Quantity": 1,
"Price": 500,
"Tax": 3,
"Text": "Mock4",
"SubjectType": 1
}
],
"CheckClose": {
"Payments": [
{
"Type": 2,
"Amount": 2000
}
],
"TaxationSystem": 0
},
"CustomerContact": "[email protected]"
},
"Change": 0,
"Fp": "505358752"
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"ErrCode": "NOT_FOUND"
}

Using 3-D Secure technology version 1
It is used when the Seller connects the 3-D Secure authentication mechanism. The order of execution - authentication of the cardholder on the side of the issuing bank and reporting the results to the gateway service.
An example for a two-step payment.
Upon receipt of a request to block funds, the gateway verifies that the card participates in 3-D Secure authentication.

If the User's card is involved in 3-D Secure technology version 1, then the response also contains the ACSUrl, PaReq and ThreeDSKey attributes.
NameDescriptionFormat
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine
PaReq3-D Secure Authentication RequestLine
ThreeDSKeyUnique identifier for the transactionLine

After receiving a response from the gateway, the merchant redirects the cardholder to the site of the issuing bank for additional authentication. For this, a POST request is used to the address specified in the value of the ACSUrl attribute, with the parameters listed below.
NameDescriptionFormat
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine
TermUrlRedirect address after successful 3-D Secure authenticationLine
MDUnique identifier for the transactionCorresponds to the ThreeDSKey parameter from the response to the previous request
PaReq3-D Secure Authentication RequestLine

Request example:
Code:
<body onload="document.form.submit()" >
<form name="form" action="{ACSUrl}" method="post" >
<input type="hidden" name="TermUrl" value="{TermUrl}" >
<input type="hidden" name="MD" value="{ThreeDSKey}" >
<input type="hidden" name="PaReq" value="{PaReq}" >
</form>
</body>

After authorization on the website of the issuing bank, the user is returned by an HTTPS POST request to the address specified in the value of the TermUrl attribute, with the parameters specified below.
NameDescriptionFormat
MDUnique identifier for the transactionMatches the one passed in the request
PaResAn encrypted string containing the results of 3-D Secure authenticationLine
The authorization is completed by the Block3DS command.

Request parameters

json
NameDescriptionFormateCom
keySeller ID. Issued with test / combat access parametersLine
merchant_order_idPayment ID in merchant's systemString (maximum 50 characters)
paresAn encrypted string containing the results of 3-D Secure authenticationLine: Matches the answer from ACS

urlencoded
NameDescriptionFormateCom
KeySeller ID. Issued to the Seller with test / combat access parametersLine
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)
PaResAn encrypted string containing the results of 3-D Secure authentication

Request example

json
Sample POST request:
Content-Type: application / json https://{domain}/Block3DS
{
"key":"TestTerminal",
"merchant_order_id":"TestOrder123",
"pares":"JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l"
}

An example of implementing a request in the program code:
Code:
curl -X POST \
https://https://{domain}/Block3DS \
-H 'Content-Type: application/json' \
-d '{"key":"TestTerminal","merchant_order_id":"TestOrder123","pares":"JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l"}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded https://{domain}/Block3DS
Key:TestTerminal
OrderId:TestOrder123
PaRes:JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l

An example of implementing a request in the program code:
Code:
curl -X POST \
https://https://{domain}/Block3DS \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Key=TestTerminal&OrderId=TestOrder123&PaRes=JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l'

Response options
NameDescriptionFormateCom
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemMatches the one passed in the request
AmountBlocked amountMatches the one passed in the request1
AuthCodeAuthorization codeString (maximum 6 characters)
ErrCodeError descriptionSee error codes2
ErrMessageOptional parameter. Additional error descriptionLine
CardUIdCard ID in merchant's system. Passed in response to a methodStoreCard3DSGUID
PANMaskMasked card number in the format 123456xxxxxx1234Line
StatusCard status. Passed in response to the StoreCard3DS methodisActive - the card is active and can be used for debiting
CustomParamsList of additional parameters of the operationMatches the Params passed in the request
FeePercentAcquiring commission rateNumber
TerminalIDID of the terminal in the merchant's system on which the operation was actually performedNumber
1* Transmitted if the reply containsSuccess=true
2* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"ErrCode": "AMOUNT_EXCEED"
}

In case of a one-step payment (in the case of using the Pay method), you must use the Pay3DS method instead of the Block3DS method to complete the 3-DS operation.
When saving a card involved in 3-D Secure technology, to complete the operation and receive a card ID in response, you must use the StoreCard3DS method.
The request, response parameters and field compositions of the Pay3DS and StoreCard3DS methods are similar to the Block3DS method.

Using 3-D Secure technology version 2
It is used when the Seller connects the 3-D Secure authentication mechanism. The order of execution - authentication of the cardholder on the side of the issuing bank and reporting the results to the gateway service.
An example for a two-step payment.
When sending a request for blocking funds, the merchant needs to generate an additional object threeds_ver2:

  • Object shaping method
  • An example of a generated object
json
NameDescriptionFormat
term_urlURLto get CReswhen going through the challenge-flowscriptLine
browser_infoAn object containing information and the User's browserJSON object
+- accept_headerThe content of the HTTP headers sent to the Internet acquiring system from the client's browser. The maximum value is 2048 characters. For example application / json, application / jose; charset = utf-8Line
+- color_depthA value that represents the bit depth of the color palette for displaying images, in bits per pixel. For example 24 (screen.colorDepth)String (maximum length - 2 characters)
+- java_enabledAbility to execute java in browser (novigator.javaEnabled)true / false
+- javascript_enabledIndicator that JavaScript can be executed in the cardholder's browsertrue / false
+- languageThe browser language specified by the IETF BCP47 standard. For example, ru-RUString (maximum length - 8 characters)
+- heightThe total height (in pixels) of the screen displayed to the cardholder. The maximum value is 6 characters. For example 1080 (screen.height)Line
+- widthThe total width (in pixels) of the screen displayed to the cardholder. The maximum value is 6 characters. For example 1920 (screen.width)Line
+- timezoneThe time difference between UTC and the user's local (browser) time in minutes. For example, if UTC is -5, then you need to specify +300, and if UTC +5, then you need to specify -300String (maximum length - 5 characters)
+- useragentContent of the User-Agent HTTP header. For example: Mozilla / 5.0 (X11; Linux x86_64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 64.0.3282.140 Safari / 537.36String (maximum length - 2048 characters)
+- window_heightThe height of the browser window (in pixels) in which the page for entering authentication data will be displayed (for example, the page for entering a one-time password). The optimal value for a desktop browser is 500.Line
+- window_widthThe width of the browser window (in pixels) in which the page for entering authentication data will be displayed (for example, the page for entering a one-time password). The optimal value for a desktop browser is 600.Line

urlencoded
NameDescriptionFormat
term_urlURLto get CReswhen going through the challenge-flowscriptLine
browser_infoAn object containing information and the User's browserJSON object
+- accept_headerThe content of the HTTP headers sent to the Internet acquiring system from the client's browser. The maximum value is 2048 characters. For example application / json, application / jose; charset = utf-8Line
+- color_depthA value that represents the bit depth of the color palette for displaying images, in bits per pixel. For example 24 (screen.colorDepth)String (maximum length - 2 characters)
+- java_enabledAbility to execute java in browser (novigator.javaEnabled)true / false
+- javascript_enabledIndicator that JavaScript can be executed in the cardholder's browsertrue / false
+- languageThe browser language specified by the IETF BCP47 standard. For example, ru-RUString (maximum length - 8 characters)
+- heightThe total height (in pixels) of the screen displayed to the cardholder. The maximum value is 6 characters. For example 1080 (screen.height)Line
+- widthThe total width (in pixels) of the screen displayed to the cardholder. The maximum value is 6 characters. For example 1920 (screen.width)Line
+- timezoneThe time difference between UTC and the user's local (browser) time in minutes. For example, if UTC is -5, then you need to specify +300, and if UTC +5, then you need to specify -300String (maximum length - 5 characters)
+- useragentContent of the User-Agent HTTP header. For example: Mozilla / 5.0 (X11; Linux x86_64) AppleWebKit / 537.36 (KHTML, like Gecko) Chrome / 64.0.3282.140 Safari / 537.36String (maximum length - 2048 characters)
+- window_heightThe height of the browser window (in pixels) in which the page for entering authentication data will be displayed (for example, the page for entering a one-time password). The optimal value for a desktop browser is 500.Line
+- window_widthThe width of the browser window (in pixels) in which the page for entering authentication data will be displayed (for example, the page for entering a one-time password). The optimal value for a desktop browser is 600.Line
The generated object must be encoded in base64and passed to the parameter ThreedsVer2merchantData.

An example of a generated object

json
Code:
"threeds_ver2": {
"term_url": "https://cres-listener.ru/",
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"color_depth": "24",
"java_enabled": true,
"javascript_enabled": true,
"language": "ru-RU",
"height": "1080",
"width": "1920",
"timezone": "-180",
"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 YaBrowser/20.8.3.115 Yowser/2.5 Safari/537.36",
"window_height": "600",
"window_width": "500"
}
}

urlencoded
Code:
1. {"term_url":"https://cres-listener.ru/","browser_info":{"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","color_depth":"24","java_enabled":true,"javascript_enabled":true,"language":"ru-RU","height":"1080","width":"1920","timezone":"-180","useragent":"Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.135YaBrowser/20.8.3.115Yowser/2.5Safari/537.36","window_height":"600","window_width":"500"}}
Code:
2. eyJ0ZXJtX3VybCI6Imh0dHBzOi8vY3Jlcy1saXN0ZW5lci5ydS8iLCJicm93c2VyX2luZm8iOnsiYWNjZXB0X2hlYWRlciI6InRleHQvaHRtbCxhcHBsaWNhdGlvbi94aHRtbCt4bWwsYXBwbGljYXRpb24veG1sO3E9MC45LGltYWdlL3dlYnAsaW1hZ2UvYXBuZywqLyo7cT0wLjgsYXBwbGljYXRpb24vc2lnbmVkLWV4Y2hhbmdlO3Y9YjM7cT0wLjkiLCJjb2xvcl9kZXB0aCI6IjI0IiwiamF2YV9lbmFibGVkIjp0cnVlLCJqYXZhc2NyaXB0X2VuYWJsZWQiOnRydWUsImxhbmd1YWdlIjoicnUtUlUiLCJoZWlnaHQiOiIxMDgwIiwid2lkdGgiOiIxOTIwIiwidGltZXpvbmUiOiItMTgwIiwidXNlcmFnZW50IjoiTW96aWxsYS81LjAoV2luZG93c05UMTAuMDtXaW42NDt4NjQpQXBwbGVXZWJLaXQvNTM3LjM2KEtIVE1MLGxpa2VHZWNrbylDaHJvbWUvODQuMC40MTQ3LjEzNVlhQnJvd3Nlci8yMC44LjMuMTE1WW93c2VyLzIuNVNhZmFyaS81MzcuMzYiLCJ3aW5kb3dfaGVpZ2h0IjoiNjAwIiwid2luZG93X3dpZHRoIjoiNTAwIn19Cg==
Code:
3. ThreedsVer2merchantData=eyJ0ZXJtX3VybCI6Imh0dHBzOi8vY3Jlcy1saXN0ZW5lci5ydS8iLCJicm93c2VyX2luZm8iOnsiYWNjZXB0X2hlYWRlciI6InRleHQvaHRtbCxhcHBsaWNhdGlvbi94aHRtbCt4bWwsYXBwbGljYXRpb24veG1sO3E9MC45LGltYWdlL3dlYnAsaW1hZ2UvYXBuZywqLyo7cT0wLjgsYXBwbGljYXRpb24vc2lnbmVkLWV4Y2hhbmdlO3Y9YjM7cT0wLjkiLCJjb2xvcl9kZXB0aCI6IjI0IiwiamF2YV9lbmFibGVkIjp0cnVlLCJqYXZhc2NyaXB0X2VuYWJsZWQiOnRydWUsImxhbmd1YWdlIjoicnUtUlUiLCJoZWlnaHQiOiIxMDgwIiwid2lkdGgiOiIxOTIwIiwidGltZXpvbmUiOiItMTgwIiwidXNlcmFnZW50IjoiTW96aWxsYS81LjAoV2luZG93c05UMTAuMDtXaW42NDt4NjQpQXBwbGVXZWJLaXQvNTM3LjM2KEtIVE1MLGxpa2VHZWNrbylDaHJvbWUvODQuMC40MTQ3LjEzNVlhQnJvd3Nlci8yMC44LjMuMTE1WW93c2VyLzIuNVNhZmFyaS81MzcuMzYiLCJ3aW5kb3dfaGVpZ2h0IjoiNjAwIiwid2luZG93X3dpZHRoIjoiNTAwIn19Cg==

Upon receipt of a request to block funds, the gateway verifies that the card participates in 3-D Secure authentication.

If the User's card is involved in 3-D Secure technology version 2, then the response also contains the attributes ThreedsMethodURL, Is3DSVer2 and ThreedsMethodURLData.
NameDescriptionFormateCom
ThreedsMethodURLAddress (URL / URI) of the 3-D Secure authentication server to collect information about the client's browserLine
ThreedsMethodURLDataBase64 encoded stringLine
Is3DSVer2Operation flag using 3DS technology version 2true / false

After receiving a response from the gateway, the Seller sends a request through a request hidden iframein the User's browser, the composition of the request:
  • POST ThreedsMethodURL
  • Content-Type: application / x-www-form-urlencoded
  • Parameter threeDSMethodDatawith the value ThreedsMethodURLDatareceived in the response
After receiving a response, ThreedsMethodURLa redirect to the URLgateway will occur to confirm the passage of the script for collecting data about the User's browser by the ACS server.
Upon receipt of the response code 202after being redirected to the URLgateway, the merchant sends a request to Block3DS:

Request parameters

json
NameDescriptionFormateCom
keySeller ID. Issued with test / combat access parametersLine
merchant_order_idPayment ID in merchant's systemString (maximum 50 characters)

urlencoded
NameDescriptionFormateCom
KeySeller ID. Issued to the Seller with test / combat access parametersLine
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)

Request example

json
Code:
Sample POST request:
Content-Type: application / json
{{endpoint}}/Block3DS
{
"key":"TestTerminal",
"merchant_order_id":"TestOrder123"
}

An example of request implementation:
Code:
curl -X POST {{endpoint}}/Block3DS -H 'Content-Type: application/json' -d '{"key":"TestTerminal","merchant_order_id":"TestOrder123"}'

urlencoded
Code:
Sample POST request:
Content-Type: application / x-www-form-urlencoded
{{endpoint}}/Block3DS
Key=TestTerminal
OrderId=TestOrder123

An example of request implementation:
Code:
curl -X POST {{endpoint}}/Block3DS -H 'Content-Type: application/x-www-form-urlencoded' -d 'Key=TestTerminal&OrderId=TestOrder123'

Response options
NameDescriptionFormateCom
SuccessOperation success flagtrue / false
ACSUrlThe address (URL / URI) of the 3-D Secure authentication server when the script passes challenge-flowLine1
CReq3-D Secure Authentication Request When Passing a Scenario challenge-flowLine1
OrderIdPayment ID in the merchant's systemMatches the one passed in the request
AmountBlocked amountMatches the one passed in the request1
AuthCodeAuthorization codeString (maximum 6 characters)
ErrCodeError descriptionSee error codes2
ErrMessageOptional parameter. Additional error descriptionLine
CardUIdCard ID in merchant's system. Passed in response to a methodStoreCard3DSGUID
PANMaskMasked card number in the format 123456xxxxxx1234Line
StatusCard status. Passed in response to the StoreCard3DS methodisActive - the card is active and can be used for debiting
CustomParamsList of additional parameters of the operationMatches the Params passed in the request
FeePercentAcquiring commission rateNumber
TerminalIDID of the terminal in the merchant's system on which the operation was actually performedNumber
1* Parameter is required if you need to go through the scriptchallenge-flow

NameDescriptionFormat
ACSUrlAddress (URL / URI) of the 3-D Secure authentication serverLine
PaReq3-D Secure Authentication RequestLine
ThreeDSKeyUnique identifier for the transactionLine
1* Transmitted if the reply containsSuccess=true
2* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"ErrCode": "AMOUNT_EXCEED"
}

3-D Secure version 2 authentication follows one of two scenarios:, frictionless-flowor challenge-flow. Scenario authenticated, it depends on the availability of the parameters ACSUrl, CReqin response to the request Block3DS.
  • In the absence of parameters ACSUrl, the CReqscript is considered frictionless-flowand does not require additional steps for authentication.
  • If parameters are present ACSUrl, the CReqscript is considered challenge-flowand requires additional steps for authentication.
If the script is authenticated frictionless-flow, this Block3DSis considered final.

Walkthrough scenario challenge-flow:
After receiving a response from the gateway, the merchant redirects the cardholder to the site of the issuing bank for additional authentication. To do this, use a POST request to the address specified in the attribute value ACSUrl, the composition of the request:
  • POST ACSUrl
  • Content-Type: application / x-www-form-urlencoded
  • Parameter creqwith the value CReqreceived in the response

After authorization on the issuing bank's website, the user is returned by an HTTPS POST request to the address specified in the term_urlrequest Blockparameter with the parameter specified below.
NameDescriptionFormat
cresAn encrypted string containing the results of 3-D Secure authenticationLine
After receiving the parameter, the cresmerchant sends a request to Block3DS to complete the script challenge-flow:

Request parameters

json
NameDescriptionFormateCom
keySeller ID. Issued with test / combat access parametersLine
merchant_order_idPayment ID in merchant's systemString (maximum 50 characters)
cresAn encrypted string containing the results of 3-D Secure authenticationLine: Matches the answer from ACS1

urlencoded
NameDescriptionFormateCom
KeySeller ID. Issued to the Seller with test / combat access parametersLine
OrderIdPayment ID in the merchant's systemString (maximum 50 characters)
CResAn encrypted string containing the results of 3-D Secure authenticationLine: Matches the answer from ACS
1* Parameter is required when passingchallenge-flow

Request example

json
Sample POST request:
Code:
Content-Type: application / json https://{domain}/Block3DS
{
"key":"TestTerminal",
"merchant_order_id":"TestOrder123",
"cres":"JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l"
}

An example of implementing a request in the program code:
Code:
curl -X POST {{endpoint}}/Block3DS -H 'Content-Type: application/json' -d '{"key":"TestTerminal","merchant_order_id":"TestOrder123", "cres":"JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l"}'

urlencoded
Sample POST request:
Code:
Content-Type: application / x-www-form-urlencoded https://{domain}/Block3DS
Key:TestTerminal
OrderId:TestOrder123
CRes:JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l

An example of implementing a request in the program code:
Code:
curl -X POST {{endpoint}}/Block3DS -H 'Content-Type: application/x-www-form-urlencoded' -d 'Key=TestTerminal&OrderId=TestOrder123&CRes=JQpr1kEIAQSIEYhdkxiEJOY4esfujenl5b9rPtt2l'

Response options
NameDescriptionFormateCom
SuccessOperation success flagtrue / false
OrderIdPayment ID in the merchant's systemMatches the one passed in the request
AmountBlocked amountMatches the one passed in the request1
AuthCodeAuthorization codeString (maximum 6 characters)
ErrCodeError descriptionSee error codes2
ErrMessageOptional parameter. Additional error descriptionLine
CardUIdCard ID in merchant's system. Passed in response to a methodStoreCard3DSGUID
PANMaskMasked card number in the format 123456xxxxxx1234Line
StatusCard status. Passed in response to the StoreCard3DS methodisActive - the card is active and can be used for debiting
CustomParamsList of additional parameters of the operationMatches the Params passed in the request
FeePercentAcquiring commission rateNumber
TerminalIDID of the terminal in the merchant's system on which the operation was actually performedNumber
1* Transmitted if the reply containsSuccess=true
2* Transmitted if the reply containsSuccess=false

Sample response
An example of a response to a successful request:
Code:
{
"Success": true,
"OrderId": "TestOrder123",
"Amount": 300,
"ErrCode": ""
}

An example of a response to an unsuccessful request:
Code:
{
"Success": false,
"OrderId": "TestOrder123",
"ErrCode": "AMOUNT_EXCEED"
}

In case of a one-step payment (in the case of using the Pay method), you must use the Pay3DS method instead of the Block3DS method to complete the 3-DS operation.
When saving a card involved in 3-D Secure technology, to complete the operation and receive a card ID in response, you must use the StoreCard3DS method.
The request, response parameters and field compositions of the Pay3DS and StoreCard3DS methods are similar to the Block3DS method.

Requirements for posting information on the company's website
* to ensure the confidentiality of the information of Cardholders and to ensure the security of the Operations

The requirements below are mandatory for an online store that accepts payments through merchant Processing Center for review and implementation. The compliance of the website of the online store with the requirements presented in the document allows you to minimize the risk of Fraudulent transactions and subsequent financial costs to pay off fines when buyers initiate returns, as well as eliminate the risk of leakage of confidential information of Buyers through the website of the online store. In accordance with the rules and recommendations and acquiring banks, the online store must provide its own methods of control and minimization of risks to prevent fraudulent transactions when accepting payments using bank cards.

1. Contacts and details
1.1. Phone number with hours of operation.
1.2. E-mail address.
1.3. The actual address of the company.
1.4. Full name of the legal entity.
1.5. State registration number of a legal entity or individual entrepreneur.
The presence on the website of the online store of a section containing contact information and company details is mandatory. The data is required to successfully pass the verification at the acquiring bank. Lack of data may become the basis for refusal of the acquiring bank in cooperation with the online store.

2. Description of the payment process, logos of payment systems and merchant
2.1. The website of the online store should contain (it is recommended to place it in the "Payment" section) a list of available payment methods for the order and a description of the payment process for each of the available tools. The description of the process of paying for the order by bank cards must contain information about merchant processing center.
2.2. The website of the online store must contain a description of the process and conditions (including possible penalties) for refunding money to the Buyer's card when the Buyer refuses to order, exchange or provide interchangeable goods or services. If a refund procedure is not provided, the information should be posted on the website of the online store.
2.3. On the website of the online store (in the section "Payment for the order" or in the "basement" of the site), the logos of merchant processing center and payment systems (VISA, MasterCard and MIR) must be placed.
The lack of information on the conditions for the return creates the risk of penalties if the Buyer initiates a refund through the Bank or the Payment System, and the conditions for the return will not be described on the website of the online store.

3. Description of the order delivery process
3.1. The website of the online store must contain the terms, methods, conditions, as well as any other information necessary to obtain a clear and clear idea of the delivery of goods and the provision of services after payment by credit card.
3.2. The website of the online store should contain detailed information about the restrictions on the delivery of goods / services to certain regions, as well as export restrictions and rules for the delivery of goods / services outside the Europa/USA/Asia (if there are such restrictions).
The lack of information on the conditions, cost and delivery time creates the risk of penalties if the Buyer initiates a refund through the Bank or the Payment System due to the failure to provide the service (due to long delivery), and the conditions and delivery times will not be described on the website of the online store.

4. List and description of goods (services)
4.1. Each product or service page should contain a detailed description:
  • for a product - characteristics, dimensions, photographs, equipment, material, price;
  • for software - system requirements;
  • for services - description, methods and terms of service provision.
4.2. The final price for goods or services posted on the site, when paying for the order with a bank card, should not exceed the price in force when paying in any other way.
4.3. The list of goods or services sold on the site must fully correspond to the goods and services listed in the merchant's questionnaire, as well as in the agreement with the acquiring bank.
4.4. If the range of goods or services changes, merchant must notify merchantat least 5 working days before the changes are reflected on the website. The notification is sent in the form of an official letter.
A detailed and correct description is necessary to minimize the risk of a forced refund or opposition to payment by the buyer due to insufficient information about the product.

5. Domain and hosting
5.1. The website of the online store must be located on a second-level domain (example: www.shop.com) and contain at least 2 and no more than 11 characters.
5.2. All pages and interfaces related to the operation of the site must be under a single domain name.
5.3. It is allowed to host the connected website on a third-level domain (example: www.internet.shop.com) if the main site of the company is located on the same second-level domain.
5.4. The site should not be located on free servers that provide hosting services or free domains, as well as on social media pages (VK, Facebook, Instagram, etc.).
Placing a site on a third-level domain or on free hosting may become the basis for the acquiring bank's refusal to cooperate with the online store.

6. Security of personal data of Buyers
6.1. It is not allowed to request bank card details (PAN, CVC2 / CVV2, Expiration Date) on the pages of the online store.
6.2. When paying with a bank card, the buyer must be redirected to merchant's's secure payment form to enter their bank card details.
6.3. The secure payment form merchantshould be presented as a standard browser window with all standard features.
6.4. It is not allowed to place a payment form in a pop-up window (Pop-Up).
6.5. Placing a payment form using an Iframe (integrating a payment form into a website page) is not allowed without the approval of merchant.
Violation of the rules for processing personal data of Buyers may result in the imposition of penalties on the online store and the processing center.

7. Functional authorization and personal account of the Buyer
7.1. It is recommended to provide Buyers with the opportunity to register - and provide the ability to make payments by bank cards only to registered Buyers.
7.2. It is recommended to store the database of registered customers on the side of the online store. The minimum storage period for the database is 7 months.
7.3. It is recommended to provide for the possibility of a direct transition from any page of the website of the online store to the registration form and merchant's payment form.
7.4. It is recommended to provide for the sending of registration data to the email address specified by the buyer.

It is recommended to implement the "Personal Account" of the online store client on the site to save the history of user orders. The history of the formation of orders may be required in case of receiving requests for this information from the acquiring bank.
 
Top