Инструменты страницы
Scenarios for working with the service
Authentication
For authentication, when sending most requests, the authentication attribute Authorization
must be passed in the request header containing the value accessToken
(security token). A list of the requests that require authentication is available in the Connection URLs section. The simplified procedure for obtaining a security token is as follows.
1. The merchant (application) searches for the customer by the phone number.
2. If the customer is found, the payment gateway returns their identifier (uuid).
3. The merchant makes a request for an access code (accessCode), using the merchant's name (merchantLogin) and the received customer ID (uuid).
4. The payment gateway returns the access code (accessCode
) and sends an SMS message from the number 900 containing a one-time password to the customer's phone (otp
).
The lifetime of the security code is 60 seconds. If the customer does not enter a one- time password during this time, the request must be repeated.
5. The customer enters a one- time password into the form and confirms it.
6. The merchant sends the one-time password value (otp) and the access code (accessCode).
7. The payment gateway returns a security token (accessToken) that should be used in the header of requests for transactions with bindings.
The lifetime of the security token (accessToken
) is 2592000 seconds, i.e., 30 days.
The lifetime of this parameter can also be configured and changed in agreement with the Bank.
The security token is returned as a JSON document. The received security token is a symmetric application secret, so the application developer must take measures to protect it: store the token in encrypted form, provide access to it only after the user is authorized in the application. One application can receive only one security token for one user. Reauthorization (with the same user ID value) cancels previously issued permissions.
Below, the procedure for getting the security token (accessToken) is presented with links to the required requests.
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions: no | |||||
Step 1 | Request to check whether a customer with the specified phone number is in the system. | /api/clients/find | phone |
client/uuid | Request to search for a customer |
Step 2 | Getting an access code. | /api/auth/otp |
merchantLogin |
accessCode | Request an access code |
Step 3 | Getting a security token. | /api/auth/token |
accessCode |
accessToken | Request for a security token |
Payment – card data gathered on Merchant side, 3DS payment
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions: the merchant has authenticated (see section Authentication). | |||||
Step 1 | Start of the payment procedure | /api/payment/start |
transactionNumber |
transactionNumber | Start of payment |
Step 2 | Displaying the info message to the customer. | ||||
Step 3 |
Redirecting the client to the received |
||||
Step 4 | Receiving the response from ACS with paRes. | ||||
Step 5 | Completion of the payment procedure. | /api/payment/finish |
mdOrder |
mdOrder | Payment completion |
Step 6 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
mdOrder | Request for information about the result of an operation |
Payment – use of a previously saved binding, 3DS card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the payment procedure | /api/payment/start |
|
| Start of payment |
Step 2 | Displaying the info message to the customer. | ||||
Step 3 |
Redirecting the customer to the received redirectUrl (ACS of the issuing bank) with the indication of |
||||
Step 4 | Getting a response from ACS with paRes . |
||||
Step 5 | Completion of the payment procedure. | /api/payment/finish |
|
| Payment completion |
Step 6 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Payment – use of a previously saved binding, SSL card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the payment procedure. | /api/payment/start |
|
| Start of payment |
Step 2 | Completing the payment with specifying mdOrder received on Step 1. | /api/payment/finish |
|
| Payment completion |
Step 3 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Payment – collection of card data on the merchant's side, 3DS card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the transfer procedure. | /api/transfer/start |
|
| Start of transfer |
Step 2 | Displaying the info message to the customer. |
||||
Step 3 |
Redirect the client to the received |
||||
Step 4 | Getting a response from ACS with paRes . |
||||
Step 5 | Completion of the transfer procedure. | /api/payment/finish |
|
| Transfer completion |
Step 6 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Transfer – collection of card data on the merchant's side, SSL card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the transfer procedure. | /api/transfer/start |
|
| Start of transfer |
Step 2 | Completing the payment with specifying mdOrder received on Step 1. | /api/transfer/finish |
| N/A | Transfer completion |
Step 3 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Transfer – use of a previously saved binding, 3DS card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the transfer procedure. | /api/transfer/start |
|
| Start of transfer |
Step 2 | Displaying the info message to the customer. |
||||
Step 3 |
Redirecting the customer to the received redirectUrl (ACS of the issuing bank) with the indication of |
||||
Step 4 | Getting a response from ACS with paRes |
||||
Step 5 | Completion of the transfer procedure. | /api/transfer/finish |
|
| Transfer completion |
Step 6 | The merchant requests the result of the transfer. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Transfer – use of a previously saved binding, SSL card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Start of the transfer procedure. | /api/transfer/start |
|
| Start of transfer |
Step 2 | Transfer completion with the mdOrder received on Step 1. | /api/transfer/finish |
| N/A | Transfer completion |
Step 3 | The merchant requests the result of the transfer. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Issuing a virtual card
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Request for card creation | /api/vcard/create | transactionNumber |
| Issuing a virtual card |
Step 2 |
The beginning of the transfer procedure to the issued card. | /api/transfer/start |
|
| Start of transfer |
Step 3 | Displaying of the info message (obtained in Step 2) to the client. |
||||
Step 4 |
Redirect the client to the received |
||||
Step 5 | Getting a response from ACS with paRes |
||||
Step 6 | Completion of the transfer procedure | /api/transfer/finish |
|
| Transfer completion |
Step 7 | The merchant requests the result of the transaction. | /api/find | transactionNumber or mdOrder |
| Request for information about the result of an operation |
Step 8 |
Request for changing the binding name. | /api/change |
|
| Change of the displayed card name |
Getting a list of performed operations
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions: The merchant has authenticated and received a security token (for more details, see Authentication). |
|||||
Step 1 | Change request | /api/transactions/ |
|
| Getting a list of performed operations |
Getting information about a performed operation
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Change request | /api/transactions/find |
|
| Request for information about the result of an operation |
Change of the displayed name of the binding
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Change request. | /api/change |
|
| Change of the displayed name of the binding |
Binding deletion
Step number | Description | Endpoint | Input data | Output data to be used in further steps. | Link to detailed description of the request |
---|---|---|---|---|---|
Preconditions:
|
|||||
Step 1 | Request for deletion | /api/delete |
|
| Binding deletion |