API is designed for the merchants who accept payments via user interface such as a website or a mobile app and it is the only interaction point with the system for goods and services payment transactions.
Whenever an API is accessed, its unique ID must be passed in the header X-Request-ID of the corresponding request:
X-Request-ID: 37d735d4-0f42-4f05-89fa-eaa478fb5aa9
Content type and coding
The system accepts and returns data in JSON format and UTF-8 coding:
Content-Type: application/json; charset=utf-8
Date formats
The system accepts and returns timestamp values in the format date-time, described in RFC 3339:
2017-01-01T00:00:00Z
2017-01-01T00:00:01+00:00
Maximum request processing time
Whenever an API is accessed, the time cutoff parameters, that define maximum request processing time of the transaction completion, can be passed in the header X-Request-Deadline
of the corresponding request:
X-Request-Deadline: 10s
The system stops processing the request upon the specified time. It is recommended to specify a value that is not more than one minute and not less than three seconds.
X-Request-Deadline
can be:
- specified in the format
date-time
according to RFC 3339; - specified in relative values: in milliseconds (
150000ms
), in seconds (540s
) or in minutes (3.5m
).
A system party is a data set about your company, structure and conditions of concluded contracts, and also the information about the shops associated with the company.
getMyParty
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
{- "id": "string",
- "isBlocked": true,
- "isSuspended": true
}
activateMyParty
Activate my party
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
{- "code": "invalidRequest",
- "message": "string"
}
suspendMyParty
Suspend my party
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
{- "code": "invalidRequest",
- "message": "string"
}
getPartyByID
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "isBlocked": true,
- "isSuspended": true
}
activatePartyByID
Activate party by ID
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
suspendPartyByID
Suspend party by ID
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
A shop is a display of your website or a point of sales in the system. Financial terms, that determine, particularly, the system fee percentage, are linked to the shop. Each shop has its linked accounts that accumulate money sent by payers. Only one account can be in each currency. The shop category is determined by the group of offered goods and services. A banking terminal can be linked to a shop on the side of an acquiring bank. Any changes of these shops require system verification. Shops created in the test category are used for test payment. The system creates a test shop automatically during the participant registration. Your website or point of sales may have more than one shop. The closest analogue can be POS-terminals at a point of sales.
It is possible to specify a URL for any shop to receive asynchronous notifications about data status change by setting up webhook. For example, you can set up webhook by specifying URL of your application to which the system will send data about invoice changes. The corresponding public key, created during the webhook setup, is used to verify integrity of data sent to your application URL. You can receive this key in your account.
getShopsForParty
Get all shops
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "isBlocked": true,
- "isSuspended": true,
- "currency": "string",
- "categoryID": 0,
- "location": {
- "locationType": "string"
}, - "details": {
- "name": "string",
- "description": "string"
}, - "contractID": "string"
}
]
getShopByIDForParty
Get shop by id
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "isBlocked": true,
- "isSuspended": true,
- "currency": "string",
- "categoryID": 0,
- "location": {
- "locationType": "string"
}, - "details": {
- "name": "string",
- "description": "string"
}, - "contractID": "string"
}
activateShopForParty
Activate shop
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
suspendShopForParty
Suspend the shop. This type of requests is processed by the platform automatically and is executed immediately after sending.
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
getShops
Get all shops
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "isBlocked": true,
- "isSuspended": true,
- "currency": "string",
- "categoryID": 0,
- "location": {
- "locationType": "string"
}, - "details": {
- "name": "string",
- "description": "string"
}, - "contractID": "string"
}
]
getShopByID
Get shop by id
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "isBlocked": true,
- "isSuspended": true,
- "currency": "string",
- "categoryID": 0,
- "location": {
- "locationType": "string"
}, - "details": {
- "name": "string",
- "description": "string"
}, - "contractID": "string"
}
activateShop
Activate shop
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
suspendShop
Suspend the shop. This type of requests is processed by the platform automatically and is executed immediately after sending.
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
An invoice is a fundamental model for work with payment acceptance system. It is necessary to create an invoice and find out its ID before rendering the payment form launching debit transactions, holding funds on the payer’s card and launching other similar business processes. In general, an invoice is a container for payments, data about goods and a shop. Invoices have customizable limited lifetime. Once lifetime is expired, invoice status is impossible to change.
Table of invoice statuses:
Status | Indication | Description |
---|---|---|
Unpaid | unpaid |
An invoice has been created but financial obligations are not fulfilled. |
Cancelled | cancelled |
An invoice is cancelled with reason, all obligations under it are null and void. |
Paid | paid |
Financial obligations under an invoice are paid but goods or services has not been provided yet to the payer. |
Fulfilled | fulfilled |
All obligations, both payer’s and merchant’s ones, are fulfilled. |
Invoice statuses are indicated in the diagram nodes, narrows are marked by the processes. Successful completion of processes generates change from one status to another.
The system provides you a possibility to fill and save any necessary metadata both in invoice and payment pattern. Data is described by the JSON array. Later the system will provide this data to you when you request invoice or payment data by its ID or it will send it to webhook in asynchronous mode that is set up for the relevant shop if there is one.
Any data status changes generate events. You can receive a full list of events that led to the specific data status or the latest event that describes the current data status. For example, you can request all events or the latest one within the specified invoice ID to find out an invoice status so that to make a decision about the shipment of goods or providing services to the payer.
Operations:
- invoice creation,
- invoice cancellation,
- invoice fulfillment,
- getting a new invoice access token (after invoice creation)
are authorised with your API key.
Invoice access token
The invoice access token authorises a limited amount of transactions needed to make payments by the specified invoice, in particular:
- tokenization of payment instrument,
- payment creation by this and only this invoice,
- getting the invoice status.
The token is valid for 3 days from the creation. After this it will be impossible to use it to authorise transactions.
You can specify the distribution of funds among several shops within one invoice. If necessary, you can add a fee that will be charged to the shop specified during the invoice creation (hereinafter invoice shop). Total amount of all distribution transactions shouldn’t exceed the invoice amount. There shouldn’t be more than one transaction per one shop in the distribution. The distribution transactions can be:
With AllocationBodyAmount body which transmits the amount to be transferred to the shop. You must create a transaction in favour of an invoice shop to add a fee.
With AllocationBodyTotal body which transmits the total amount of transactions and its fee that can be:
AllocationFeeFixed or fee amount in favour of an invoice shop.
AllocationFeeShare or some percent of the total amount of transaction in favour of an invoice shop.
getInvoiceByExternalID
Get invoice by specified external identifier.
Authorizations:
query Parameters
externalID required | string [ 1 .. 40 ] characters External invoice identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}
createInvoice
Create a new invoice.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Invoice parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
partyID | string [ 1 .. 40 ] characters The participant's unique identifier within the system. |
externalID | string [ 1 .. 40 ] characters External invoice identifier |
dueDate required | string <date-time> The date and time of expiration of the invoice, after which it can no longer be paid |
amount | integer <int64> >= 1 The value of the goods or services offered, in minor monetary units, such as cents if US dollars are specified as the currency. If no value is specified, the value of the invoice will be the total value of the items in the shopping cart. |
object (InvoiceRandomizeAmount) Describes how to randomly modify invoice's cost amount. | |
currency required | string^[A-Z]{3}$ Currency character code according to ISO 4217. |
product required | string <= 100 characters Name of the offered goods or services |
description | string <= 1000 characters Description of the goods or services offered |
Array of objects (InvoiceCart) [ 1 .. 100 ] items Products and services cart | |
Array of objects (Allocation) [ 1 .. 100 ] items Allocation of cash | |
object (InvoiceBankAccount) Information on the bank account of the payer, to which transactions this invoice relates | |
metadata required | object Invoice metadata |
object (InvoiceClientInfo) Additional client information |
Responses
Request samples
- Payload
{- "shopID": "string",
- "partyID": "string",
- "externalID": "string",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}, - "currency": "string",
- "product": "string",
- "description": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}
}
Response samples
- 201
- 400
- 409
{- "invoice": {
- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}, - "invoiceAccessToken": {
- "payload": "string"
}
}
getInvoiceByID
Get an invoice by identifier.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}
createInvoiceAccessToken
Create a new token to access the specified invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 201
- 400
- 404
{- "payload": "string"
}
getInvoiceEvents
Get the history of the specified invoice as a list of events.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
query Parameters
limit required | integer <int32> >= 1 Selection limit |
eventID | integer <int32> Event identifier. All events that occurred in the system after the specified event will be included in the selection. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "changes": [
- {
- "changeType": "InvoiceCreated"
}
]
}
]
fulfillInvoice
To fulfill the specified invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Reason for the operation
reason required | string <= 1000 characters Operation reason |
Responses
Request samples
- Payload
{- "reason": "string"
}
Response samples
- 400
- 404
{- "code": "invalidInvoiceStatus",
- "message": "Invalid invoice status"
}
getInvoicePaymentMethods
Get the payment methods available for the invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "method": "BankCard"
}
]
rescindInvoice
Set the invoice to "Rescind"
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Reason for the operation
reason required | string <= 1000 characters Operation reason |
Responses
Request samples
- Payload
{- "reason": "string"
}
Response samples
- 400
- 404
{- "code": "invalidInvoiceStatus",
- "message": "Invalid invoice status"
}
getInvoiceByExternalIDForParty
Get an invoice by external identifier.
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
query Parameters
externalID required | string [ 1 .. 40 ] characters External invoice identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}
Invoice templates make invoicing easy. An invoice template is linked to the shop and contains specification that can be used for invoice creation by specifying the cost of goods and services and/or invoice metadata. If a template contains the fixed cost, it can be removed during invoice creation. If invoice metadata is not specified when an invoice is created by a template, they will be taken from a template (if metadata is contained in a template).
The creation, update and deletion of an invoice template doesn’t require the system verification and requests for these changes.
The creation, update and deletion of an invoice template is authorised by your API key.
Invoice template access token
An invoice template access token is created in the result of template creation transaction. It authorises:
- the getting of invoice template by its ID,
- invoice creation by the template.
createInvoiceTemplate
Create an new invoice template.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Invoice template parameters.
shopID required | string [ 1 .. 40 ] characters Shop ID |
externalID | string [ 1 .. 40 ] characters External invoice template identifier |
partyID | string [ 1 .. 40 ] characters The participant's unique identifier within the system. |
name | string <= 100 characters Template name |
description | string <= 1000 characters Description of the goods or services offered |
required | object (LifetimeInterval) The life time of an invoice from the time it was created. |
required | object (InvoiceTemplateDetails) |
metadata | object Metadata that will be associated with the invoice created by the template, in case other metadata is not specified in the invoice creation request. |
object (InvoiceRandomizeAmount) Describes how to randomly modify invoice's cost amount. |
Responses
Request samples
- Payload
{- "shopID": "string",
- "externalID": "string",
- "partyID": "string",
- "name": "string",
- "description": "string",
- "lifetime": {
- "days": 0,
- "months": 0,
- "years": 0
}, - "details": {
- "templateType": "string"
}, - "metadata": { },
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}
}
Response samples
- 201
- 400
- 409
{- "invoiceTemplate": {
- "id": "string",
- "externalID": "string",
- "shopID": "string",
- "name": "string",
- "description": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lifetime": {
- "days": 0,
- "months": 0,
- "years": 0
}, - "details": {
- "templateType": "string"
}, - "metadata": { },
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}
}, - "invoiceTemplateAccessToken": {
- "payload": "string"
}
}
getInvoiceTemplateByID
Get an invoice template by identifier.
Authorizations:
path Parameters
invoiceTemplateID required | string [ 1 .. 40 ] characters Invoice template ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "shopID": "string",
- "name": "string",
- "description": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lifetime": {
- "days": 0,
- "months": 0,
- "years": 0
}, - "details": {
- "templateType": "string"
}, - "metadata": { },
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}
}
updateInvoiceTemplate
Change the invoice template.
Authorizations:
path Parameters
invoiceTemplateID required | string [ 1 .. 40 ] characters Invoice template ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Invoice template parameters.
name | string <= 100 characters Template name |
description | string <= 1000 characters Description of the goods or services offered |
object (LifetimeInterval) The life time of an invoice from the time it was created. | |
object (InvoiceTemplateDetails) | |
metadata | object Metadata that will be associated with the invoice created by the template, in case other metadata is not specified in the invoice creation request. |
object (InvoiceRandomizeAmount) Describes how to randomly modify invoice's cost amount. |
Responses
Request samples
- Payload
{- "name": "string",
- "description": "string",
- "lifetime": {
- "days": 0,
- "months": 0,
- "years": 0
}, - "details": {
- "templateType": "string"
}, - "metadata": { },
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}
}
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "shopID": "string",
- "name": "string",
- "description": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lifetime": {
- "days": 0,
- "months": 0,
- "years": 0
}, - "details": {
- "templateType": "string"
}, - "metadata": { },
- "randomizeAmount": {
- "deviation": 0,
- "precision": 2,
- "direction": "both",
- "minAmountCondition": 0,
- "maxAmountCondition": 0,
- "amountMultiplicityCondition": 1
}
}
deleteInvoiceTemplate
Remove invoice template.
Authorizations:
path Parameters
invoiceTemplateID required | string [ 1 .. 40 ] characters Invoice template ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidPartyStatus",
- "message": "Invalid party status"
}
createInvoiceWithTemplate
Create a new invoice using the invoice template.
Authorizations:
path Parameters
invoiceTemplateID required | string [ 1 .. 40 ] characters Invoice template ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Invoice parameters
externalID | string [ 1 .. 40 ] characters A platform-unique entity identifier for this party. It is used to ensure request idempotency. |
amount | integer <int64> >= 1 The price of the goods or services offered, in minor monetary units, e.g. cents if U.S. dollars are specified as the currency |
currency | string^[A-Z]{3}$ Currency character code according to ISO 4217. |
metadata | object Invoice metadata |
Responses
Request samples
- Payload
{- "externalID": "string",
- "amount": 1,
- "currency": "string",
- "metadata": { }
}
Response samples
- 201
- 400
- 404
- 409
{- "invoice": {
- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}, - "invoiceAccessToken": {
- "payload": "string"
}
}
getInvoicePaymentMethodsByTemplateID
Get the available payment methods for the invoice from the invoice template.
Authorizations:
path Parameters
invoiceTemplateID required | string [ 1 .. 40 ] characters Invoice template ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "method": "BankCard"
}
]
The actual debiting the payer’s funds is made by calling of payment creation method. Before payments the invoice, within which the system will attempt to debit, has to be created and payer’s payment token has to be specified. This way the system provides you an interface that allows your server code to initiate and control the debiting process. This process can be both synchronous, when you are waiting for system response, and asynchronous, when you are waiting for notifications on the webhook set up for the corresponding shop after the payments are launched.
The system provides two payment methods: one-step and two-step, PaymentFlowInstant and PaymentFlowHold. One-step payment (PaymentFlowInstant) is performed by calling of one API method. The result of it is authorisation and further debiting in favour of a shop within one transaction. Two-step payment (PaymentFlowHold) means the call of two methods: one for authorisation and one for debiting. After the successful authorisation the transaction amount will be blocked on a payer’s account so a payer can’t use it. The debiting (capturePayment) can be confirmed on equal or less authorisation amount. If the less amount is specified, the balance will be refunded to a payer. The successful authorisation can be confirmed or cancelled both manually by calling the corresponding API method (capturePayment or cancelPayment) and automatically according to the chosen strategy onHoldExpiration. The manual confirmation period is set in the system settings by yourself and it is usually from 3 to 7 calendar days.
The system ensures the idempotency of debiting funds from payment instrument by providing the unique payment session ID. This ID is provided during the creation of payment instrument tokens and guarantees the idempotency of debit requests, providing the protection from erroneous repeated debits.
When the payment is created within the system, you can set up the payment processing time in the field processingDeadline
. When it is expired, the system is trying to stop processing the payment and changing its status to failed
with the error processing_deadline_reached
.
Processing time limit should be considered as a recommendation as the system can fail to stop processing on the basis of the payment instrument and the current payment status. If a field value is not set up, the system will choose it by itself to have enough time for payment transfer in general conditions.
Payment processing time limit, similarly to the header X-Request-Deadline
, can be specified in format described in RFC 3339 or in relative values.
Payment request APIs are authorised by an invoice access token that is used to create the payment or by API key.
getPayments
Get all payments for the specified invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "externalID": "string",
- "invoiceID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "metadata": { },
- "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}
}
]
createPayment
Create a new payment for the specified invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Parameters of the payment to be created
externalID | string [ 1 .. 40 ] characters A platform-unique entity identifier for this party. It is used to ensure request idempotency. |
required | object (PaymentFlow) |
required | object (Payer) |
processingDeadline | string [ 1 .. 40 ] characters Maximum payment processing time |
makeRecurrent | boolean Default: false An indication of the creation of a parent recurrence payment. Successful payment with this attribute can be used as a parent payment in other recurring payments. |
metadata | object Metadata to be linked with the payment |
Responses
Request samples
- Payload
{- "externalID": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "processingDeadline": "30m",
- "makeRecurrent": false,
- "metadata": { }
}
Response samples
- 201
- 400
- 404
- 409
{- "id": "string",
- "externalID": "string",
- "invoiceID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "metadata": { },
- "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}
}
getPaymentByID
Get payment for the specified invoice.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "invoiceID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "metadata": { },
- "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}
}
cancelPayment
Cancel the specified payment
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Reason for the operation
reason required | string <= 1000 characters Operation reason |
Responses
Request samples
- Payload
{- "reason": "string"
}
Response samples
- 400
- 404
{- "code": "invalidPaymentStatus",
- "message": "Invalid payment status"
}
capturePayment
Capture the specified payment. In case the capture amount is less than the original amount, the remainder of the payment will be refunded. (see. Payment options)
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Payment capture parameters
reason required | string <= 1000 characters Operation reason |
amount | integer <int64> >= 1 Captured payment amount, in minor monetary units, e.g. cents if US dollars are specified as the currency. |
currency | string^[A-Z]{3}$ Currency character code according to ISO 4217. |
Array of objects (InvoiceLine) [ 1 .. 100 ] items A shopping cart with a list of items of provided goods or services | |
Array of objects (AllocationTransaction) [ 1 .. 100 ] items Final cash allocation |
Responses
Request samples
- Payload
{- "reason": "string",
- "amount": 1,
- "currency": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
]
}
Response samples
- 400
- 404
{- "code": "invalidPaymentStatus",
- "message": "Invalid payment status"
}
getChargebacks
Get all chargebacks on the specified payment.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "body": 1,
- "levy": 1,
- "currency": "string",
- "reasonCode": "string",
- "stage": "chargeback",
- "status": "pending"
}
]
getChargebackByID
Get data on the chargeback of the specified payment.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
chargebackID required | string [ 1 .. 40 ] characters Chargeback identifier within the payment |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "body": 1,
- "levy": 1,
- "currency": "string",
- "reasonCode": "string",
- "stage": "chargeback",
- "status": "pending"
}
getRefunds
Get all refunds of the specified payment.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
]
createRefund
Create a refund of the specified payment
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Parameters of the payment refund to be created
externalID | string [ 1 .. 40 ] characters A platform-unique entity identifier for this party. It is used to ensure request idempotency. |
amount | integer <int64> >= 1 Refund amount, in minor monetary units, e.g. cents if US dollars are specified as the currency. |
currency | string^[A-Z]{3}$ Currency character code according to ISO 4217. |
reason | string <= 1000 characters Refund reason |
Array of objects (InvoiceLine) [ 1 .. 100 ] items The final cart of goods and services provided, which should be formed from the invoice cart excluding the items for which a refund has been made. The amount of the cart should be the same as the amount of the payment less the amount of the refund. | |
Array of objects (AllocationTransaction) [ 1 .. 100 ] items Cash allocation, which should be formed from the items for which a refund is made. The sum of all allocation transactions must match the refund amount. |
Responses
Request samples
- Payload
{- "externalID": "string",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
]
}
Response samples
- 201
- 400
- 404
- 409
{- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
getRefundByID
Get data on the refund of the specified payment.
Authorizations:
path Parameters
invoiceID required | string [ 1 .. 40 ] characters Invoice ID |
paymentID required | string [ 1 .. 40 ] characters Invoice payment identifier |
refundID required | string [ 1 .. 40 ] characters Refund identifier within the payment |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
getPaymentByExternalIDForParty
Get payment by specified external identifier.
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
query Parameters
externalID required | string [ 1 .. 40 ] characters External payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "invoiceID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "metadata": { },
- "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}
}
getRefundByExternalIDForParty
Get refund by specified external identifier.
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
query Parameters
externalID required | string [ 1 .. 40 ] characters External refund identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
getPaymentByExternalID
Get payment by the specified external identifier.
Authorizations:
query Parameters
externalID required | string [ 1 .. 40 ] characters External payment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "invoiceID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "metadata": { },
- "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}
}
getRefundByExternalID
Get refund by specified external identifier.
Authorizations:
query Parameters
externalID required | string [ 1 .. 40 ] characters External refund identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
The system provides you the possibility to initiate the funds withdrawal from payer’s charge cards by yourself and undertakes the processes of the certification and PCS-DSS standard compliance. The standard declares the prohibition on cardholder data processing and storage on the merchant’s side. The approaches used in interface implementation provide the opportunity of HTLM form layout and output for cardholder data on your server side code. To ensure the standard compliance we provide our developed JS-library that collects cardholder data in asynchronous mode and sends it to the system interface for further cryptography and tokenization after it is embedded in HTLM code of your payment form. In response, JS-library returns an unique payment card token, that can be used to run payments, to your payment form.
The payment session, that ensures the idempodency of funds withdrawal from the payment instrument, is provided during the token creation.
createPaymentResource
Create a new one-time payment token provided by the payer, as well as a new unique payment session. The payment instrument token and session identifier are required to create a invoice payment and has a limited lifetime.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Data for the creation of a payment resource
required | object (PaymentTool) |
required | object (ClientInfo) Payer's client device data |
Responses
Request samples
- Payload
{- "paymentTool": {
- "paymentToolType": "CardData"
},
}
Response samples
- 201
- 400
{- "paymentToolToken": "string",
- "resourceToken": "string",
- "paymentSession": "string",
- "paymentToolDetails": {
- "detailsType": "string"
}, - "validUntil": "2019-08-24T14:15:22Z"
}
Categories are used to describe groups of goods and services offered by shops. Categories can influence on statistics provision, shops organisation and also system financial terms.
getCategories
Get list of categories
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "name": "string",
- "categoryID": 0,
- "description": "string"
}
]
getCategoryByRef
Get category data by identifier
Authorizations:
path Parameters
categoryID required | integer <int32> Category reference |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "name": "string",
- "categoryID": 0,
- "description": "string"
}
A contract contains all details of a legal agreement on basis of which the system provides all possible services to a merchant. In particular a list of conditions, on basis of which the system services are provided, is written in the contract. The examples of this can be the transaction fees, conditions of withdrawal and legal entity data. Any changes of the shops require system verification by creating change requests. Any data changes require system verification by creating change requests.
getContracts
Get data from all of the contracts
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "contractor": {
- "contractorType": "LegalEntity"
}, - "legalAgreement": {
- "id": "string",
- "signedAt": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}, - "paymentInstitutionID": 0,
- "reportingPreferences": {
- "serviceAcceptanceActPreferences": {
- "scheduleID": 0,
- "signer": {
- "position": "string",
- "fullName": "string",
- "document": {
- "representativeDocumentType": "ArticlesOfAssociation"
}
}
}
}
}
]
getContractByID
Get contract by identifier
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "contractor": {
- "contractorType": "LegalEntity"
}, - "legalAgreement": {
- "id": "string",
- "signedAt": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}, - "paymentInstitutionID": 0,
- "reportingPreferences": {
- "serviceAcceptanceActPreferences": {
- "scheduleID": 0,
- "signer": {
- "position": "string",
- "fullName": "string",
- "document": {
- "representativeDocumentType": "ArticlesOfAssociation"
}
}
}
}
}
getContractAdjustments
Get all adjustments to the specified contract
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}
]
getContractAdjustmentByID
Get contract adjustment data by identifier
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
adjustmentID required | string [ 1 .. 40 ] characters Contract adjustment identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}
getContractsForParty
Get data from all of the contracts
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "contractor": {
- "contractorType": "LegalEntity"
}, - "legalAgreement": {
- "id": "string",
- "signedAt": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}, - "paymentInstitutionID": 0,
- "reportingPreferences": {
- "serviceAcceptanceActPreferences": {
- "scheduleID": 0,
- "signer": {
- "position": "string",
- "fullName": "string",
- "document": {
- "representativeDocumentType": "ArticlesOfAssociation"
}
}
}
}
}
]
getContractByIDForParty
Get contract data by identifier
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "status": "active",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z",
- "terminatedAt": "2019-08-24T14:15:22Z",
- "contractor": {
- "contractorType": "LegalEntity"
}, - "legalAgreement": {
- "id": "string",
- "signedAt": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}, - "paymentInstitutionID": 0,
- "reportingPreferences": {
- "serviceAcceptanceActPreferences": {
- "scheduleID": 0,
- "signer": {
- "position": "string",
- "fullName": "string",
- "document": {
- "representativeDocumentType": "ArticlesOfAssociation"
}
}
}
}
}
getContractAdjustmentsForParty
Get all adjustments to the specified contract
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}
]
getContractAdjustmentByIDForParty
Get contract adjustment data by identifier
Authorizations:
path Parameters
contractID required | string [ 1 .. 40 ] characters Contract ID |
adjustmentID required | string [ 1 .. 40 ] characters Contract adjustment identifier |
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "validSince": "2019-08-24T14:15:22Z",
- "validUntil": "2019-08-24T14:15:22Z"
}
This section describes the methods that allow to manage Webhooks or tools to receive asynchronous notifications via HTTP requests when one or a group of events of interest occur, for example, that the payment within the created invoice has been successfully paid. Attention! Only Webhooks Management API is a part of this specification. You will need to read the specification [Vality Webhooks Events API] (https://github.com/valitydev/swag-payments-webhook-events) in order to implement notification handler.
getWebhooksForParty
Get a list of installed webhooks
Authorizations:
path Parameters
partyID required | string The participant's unique identifier within the system. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "string",
- "active": true,
- "scope": {
- "topic": "InvoicesTopic"
}, - "partyID": "string",
- "url": "string",
- "publicKey": "MIGJAoGBAM1fmNUvezts3yglTdhXuqG7OhHxQtDFA+Ss//YuUGjw5ossDbEMoS+SIFuYZ/UL9Xg0rEHNRSbmf48OK+mz0FobEtbji8MADayzGfFopXsfRFa7MVy3Uhu5jBDpLsN3DyJapAkK0TAYINlZXxVjDwxRNheTvC+xub5WNdiwc28fAgMBAAE="
}
]
createWebhook
Set up a new webhook.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Parameters of the installed webhook
required | object (WebhookScope) The scope of a webhook, limiting the list of event types, for which the notifications should be sent |
partyID | string [ 1 .. 40 ] characters The participant's unique identifier within the system. |
url required | string <http-url> <= 1000 characters The URL that will receive notifications of events that have occurred |
Responses
Request samples
- Payload
{- "scope": {
- "topic": "InvoicesTopic"
}, - "partyID": "string",
- "url": "string"
}
Response samples
- 201
- 400
- 429
{- "id": "string",
- "active": true,
- "scope": {
- "topic": "InvoicesTopic"
}, - "partyID": "string",
- "url": "string",
- "publicKey": "MIGJAoGBAM1fmNUvezts3yglTdhXuqG7OhHxQtDFA+Ss//YuUGjw5ossDbEMoS+SIFuYZ/UL9Xg0rEHNRSbmf48OK+mz0FobEtbji8MADayzGfFopXsfRFa7MVy3Uhu5jBDpLsN3DyJapAkK0TAYINlZXxVjDwxRNheTvC+xub5WNdiwc28fAgMBAAE="
}
getWebhooks
Get list of installed webhooks.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "string",
- "active": true,
- "scope": {
- "topic": "InvoicesTopic"
}, - "partyID": "string",
- "url": "string",
- "publicKey": "MIGJAoGBAM1fmNUvezts3yglTdhXuqG7OhHxQtDFA+Ss//YuUGjw5ossDbEMoS+SIFuYZ/UL9Xg0rEHNRSbmf48OK+mz0FobEtbji8MADayzGfFopXsfRFa7MVy3Uhu5jBDpLsN3DyJapAkK0TAYINlZXxVjDwxRNheTvC+xub5WNdiwc28fAgMBAAE="
}
]
getWebhookByID
Get a webhook by identifier.
Authorizations:
path Parameters
webhookID required | string [ 1 .. 40 ] characters Webhook identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "active": true,
- "scope": {
- "topic": "InvoicesTopic"
}, - "partyID": "string",
- "url": "string",
- "publicKey": "MIGJAoGBAM1fmNUvezts3yglTdhXuqG7OhHxQtDFA+Ss//YuUGjw5ossDbEMoS+SIFuYZ/UL9Xg0rEHNRSbmf48OK+mz0FobEtbji8MADayzGfFopXsfRFa7MVy3Uhu5jBDpLsN3DyJapAkK0TAYINlZXxVjDwxRNheTvC+xub5WNdiwc28fAgMBAAE="
}
deleteWebhookByID
Remove the specified webhook.
Authorizations:
path Parameters
webhookID required | string [ 1 .. 40 ] characters Webhook identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidRequest",
- "message": "string"
}
This section describes the methods that allow to manage Webhooks or tools to receive asynchronous notifications via HTTP requests when one or a group of events of interest occur, for example, that the payment within the created invoice has been successfully paid. Attention! Only Webhooks Management API is a part of this specification. You will need to read the specification Empayre Webhooks Events API in order to implement notification handler.
searchInvoices
Search of invoices
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
query Parameters
fromTime required | string <date-time> Start of the time period |
toTime required | string <date-time> End of the time period |
limit required | integer <int32> [ 1 .. 1000 ] Selection limit |
invoiceStatus | string Enum: "unpaid" "cancelled" "paid" "fulfilled" Invoice status for search |
paymentStatus | string Enum: "pending" "processed" "captured" "cancelled" "refunded" "failed" Payment status for search |
paymentFlow | string Enum: "instant" "hold" Payment flow |
paymentMethod | string Enum: "bankCard" "paymentTerminal" Payment method |
paymentTerminalProvider | string Payment terminal provider |
invoiceID | string [ 1 .. 40 ] characters Invoice ID |
paymentID | string [ 1 .. 40 ] characters Payment ID |
payerEmail | string <email> <= 100 characters Payer's e-mail |
payerIP | string <ip-address> <= 45 characters Payer IP-address |
payerFingerprint | string <= 1000 characters Payer's user agent unique fingerprint |
customerID | string [ 1 .. 40 ] characters Customer ID |
bankCardTokenProvider | string Payment token provider. The list of providers available for making payments can be found by calling the corresponding operation after creating an invoice. |
bankCardPaymentSystem | string Payment system. The list of systems available for making payments can be found by calling the corresponding operation after creating an invoice. |
first6 | string^\d{6}$ First 6 digits of the card number |
last4 | string^\d{0,4}$ Card last digits |
rrn | string^[a-zA-Z0-9]{12}$ Retrieval Reference Number |
paymentAmount | integer <int64> >= 1 Amount |
invoiceAmount | integer <int64> >= 1 Invoice amount |
continuationToken | string A token signaling that only a part of the data has been transmitted in the response. To receive the next part of the data, it is necessary to reapply to the service, specifying the same list of conditions and the received token. If there is no token, the last part of data is received. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "continuationToken": "string",
- "result": [
- {
- "id": "string",
- "shopID": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "product": "string",
- "description": "string",
- "invoiceTemplateID": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "bankAccount": {
- "accountType": "InvoiceRussianBankAccount"
}, - "metadata": { },
- "clientInfo": {
- "trustLevel": "wellKnown"
}, - "amountRandomized": {
- "original": 0,
- "randomized": 0
}, - "status": "unpaid",
- "reason": "string"
}
]
}
searchPayments
Search for payments
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
query Parameters
fromTime required | string <date-time> Start of the time period |
toTime required | string <date-time> End of the time period |
limit required | integer <int32> [ 1 .. 1000 ] Selection limit |
paymentStatus | string Enum: "pending" "processed" "captured" "cancelled" "refunded" "failed" Payment status for search |
paymentFlow | string Enum: "instant" "hold" Payment flow |
paymentMethod | string Enum: "bankCard" "paymentTerminal" Payment method |
paymentTerminalProvider | string Payment terminal provider |
invoiceID | string [ 1 .. 40 ] characters Invoice ID |
paymentID | string [ 1 .. 40 ] characters Payment ID |
payerEmail | string <email> <= 100 characters Payer's e-mail |
payerIP | string <ip-address> <= 45 characters Payer IP-address |
payerFingerprint | string <= 1000 characters Payer's user agent unique fingerprint |
customerID | string [ 1 .. 40 ] characters Customer ID |
first6 | string^\d{6}$ First 6 digits of the card number |
last4 | string^\d{0,4}$ Card last digits |
rrn | string^[a-zA-Z0-9]{12}$ Retrieval Reference Number |
approvalCode | string [ 1 .. 40 ] characters Authorization Approval Code |
bankCardTokenProvider | string Payment token provider. The list of providers available for making payments can be found by calling the corresponding operation after creating an invoice. |
bankCardPaymentSystem | string Payment system. The list of systems available for making payments can be found by calling the corresponding operation after creating an invoice. |
paymentAmount | integer <int64> >= 1 Amount |
continuationToken | string A token signaling that only a part of the data has been transmitted in the response. To receive the next part of the data, it is necessary to reapply to the service, specifying the same list of conditions and the received token. If there is no token, the last part of data is received. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "continuationToken": "string",
- "result": [
- {
- "status": "pending",
- "error": {
- "code": "string",
- "subError": {
- "code": "string",
- "subError": { }
}
}, - "id": "string",
- "shortID": "string",
- "invoiceID": "string",
- "shopID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 0,
- "fee": 0,
- "currency": "string",
- "flow": {
- "type": "PaymentFlowInstant"
}, - "metadata": { },
- "statusChangedAt": "2019-08-24T14:15:22Z",
- "transactionInfo": {
- "rrn": "string",
- "approvalCode": "string"
}, - "makeRecurrent": false,
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
]
}
]
}
searchRefunds
Search for refunds
Authorizations:
path Parameters
shopID required | string [ 1 .. 40 ] characters Shop ID |
query Parameters
fromTime required | string <date-time> Start of the time period |
toTime required | string <date-time> End of the time period |
limit required | integer <int32> [ 1 .. 1000 ] Selection limit |
offset | integer >= 0 Query offset |
invoiceID | string [ 1 .. 40 ] characters Invoice ID |
paymentID | string [ 1 .. 40 ] characters Payment ID |
refundID | string [ 1 .. 40 ] characters Refund ID |
rrn | string^[a-zA-Z0-9]{12}$ Retrieval Reference Number |
approvalCode | string [ 1 .. 40 ] characters Authorization Approval Code |
refundStatus | string Enum: "pending" "succeeded" "failed" Refund status |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "totalCount": 0,
- "result": [
- {
- "invoiceID": "string",
- "paymentID": "string",
- "id": "string",
- "externalID": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "amount": 1,
- "currency": "string",
- "reason": "string",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
], - "allocation": [
- {
- "target": {
- "allocationTargetType": "AllocationTargetShop"
}, - "allocationBodyType": "AllocationBodyAmount",
- "cart": [
- {
- "product": "string",
- "quantity": 1,
- "price": 1,
- "cost": 1,
- "taxMode": {
- "type": "InvoiceLineTaxVAT"
}
}
]
}
], - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
]
}
A payment institution is an institution that provides services for financial transactions that occur as a result of system business processes.
getPaymentInstitutions
Get a list of payment institutions
Authorizations:
query Parameters
residence | string^[A-Z]{3}$ Residence, alpha-3 code according to standard ISO 3166-1 |
realm | string Enum: "test" "live" Payment institution's mode |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": 0,
- "name": "string",
- "description": "string",
- "residences": [
- "RUS"
], - "realm": "test"
}
]
getPaymentInstitutionByRef
Get data of the payment institution by identifier
Authorizations:
path Parameters
paymentInstitutionID required | integer <int32> Payment institution reference |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": 0,
- "name": "string",
- "description": "string",
- "residences": [
- "RUS"
], - "realm": "test"
}
getPaymentInstitutionPaymentTerms
Get payment terms and conditions for the payment institution
Authorizations:
path Parameters
paymentInstitutionID required | integer <int32> Payment institution reference |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "currencies": [
- "string"
], - "categories": [
- 0
]
}
getServiceProviderByID
Get data of payment service provider by identifier
Authorizations:
path Parameters
serviceProviderID required | string [ 1 .. 100 ] characters Service provider identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "brandName": "Nubank",
- "category": "onlinebanking",
- "metadata": {
- "dev.vality.checkout": {
- "brandLogo": {
- "banner": "/assets/brands/paypal.svg"
}, - "localization": {
- "name": {
- "ja_JP": "ヱヴァンゲリヲン"
}
}
}
}
}
All business logic errors have as follows:
{
"code": "string",
"message": "string"
}
The error type is in the field code
and additional information about the error that occurred is in message
.
There are the following error codes at the present moment:
Code | Description |
---|---|
operationNotPermitted | Unavailable transaction within the current contract. |
invalidPartyStatus | Your participant is blocked or its transactions has been suspended. In the latter case, you can resume them. |
invalidShopStatus | Your shop is blocked or its transactions has been suspended. In the latter case, you can resume them. |
invalidContractStatus | Your contract is not valid anymore due to its expiration or termination. |
invalidShopID | The shop with the specified ID doesn’t exist or unavailable. |
invalidInvoiceCost | Invoice cost is not specified or invalid, particularly, it isn’t equal to the item cost in the cart. |
invalidInvoiceCart | Incorrect cart in invoice, for example, empty. |
invalidInvoiceStatus | Invalid invoice status. For example, in an attempt to pay the cancelled invoice. |
invoiceTermsViolated | An invoice violates limitations set within the current contract. |
invoicePaymentPending | The last pending payment by the specified invoice has not reached the final status yet. |
invalidPaymentStatus | Invalid payment status. For example, in an attempt to confirm unsuccessful payment. |
invalidPaymentResource | The payment instrument that is not supported or connected to the system within the current contract. |
invalidPaymentToolToken | Invalid content of payment instrument token. |
invalidProcessingDeadline | Invalid format of the payment authorisation time limit. |
invalidPaymentSession | Invalid content of the payment session. |
invalidRecurrentParent | Invalid parent recurrent payment is specified. |
insufficentAccountBalance | Insufficient account balance on the shop account, for example, for the refund. |
invoicePaymentAmountExceeded | Refund attempt exceeds the payment amount. |
inconsistentRefundCurrency | Refund attempt in the currency is different from the payment currency. |
changesetConflict | An attempt to make changes to the participant that conflicts with changes in other pending requests. |
invalidChangeset | Invalid changes to the participant, for example, an attempt to create a shop in the currency that is unavailable within the contract. |
limitExceeded | The reasonable sampling time limit is exceeded. In this case it is better to request less volume of data. |
invalidDeadline | Invalid time format. |
chargebackInProgress | Refund attempt while the chargeback is in progress. |
invalidRequest | Other invalid request data. |
invalidPartyID | The participant with the specified ID doesn't exist or unavailable. |
ambiguousPartyID | It is impossible to define the participant ID, specify the ID more clearly in the request. |
invalidAllocation | Invalid distribution of funds, for example, more than one transaction in favour of one of shops. |
allocationNotPermitted | The distribution is not available within the contract. |
refundCartConflict | It is impossible to define the refund content as the refund distribution and cart are sent at the same time. |
The errors that occur during the transaction attempts with the objects that are not registered in the system. They look like
{
"message": "string"
}
The information about the occurred error is in the field message
. For example:
{
"message": "Invoice not found"
}
Different unpredictable situations can happen during the request processing with the support of our system. The system sends a signal about them according to the HTTP protocol using the corresponding statuses that specify the server errors.
Code | Description |
---|---|
500 | An unpredictable situation has occurred during request processing by the system. We recommend contacting the technical support if you receive such a response code. |
503 | The system is temporarily unavailable and not ready to serve this request. The request isn’t guaranteed fulfilled, if you receive such a response code, try to resend it later when the availability of the system will be restored. |
504 | The system has exceeded the time allowable for request processing, the result of the request is undefined. Try to resend the request or find our the result of the original request if the repeated request is undesirable. |
The errors sent to the payment form (payers can see them):
Code | Description |
---|---|
InvalidPaymentTool | Invalid payment instrument (invalid card number, missing account has been entered, etc.) |
AccountLimitsExceeded | Limits are exceeded (for example, the payment amount or withdrawal country limits are set up in the personal account) |
InsufficientFunds | Insufficient funds on the account |
PreauthorizationFailed | Pre-authorisation is failed (invalid SD-Secure code has been entered, cancellation link has been clicked in SD-Secure form) |
RejectedByIssuer | The payment is rejected by the issuer (it has been prohibited to withdraw inside the country or to purchase in the Internet, the payment is rejected by the issuer’s anti-fraud entity and etc.) |
PaymentRejected | the payment is rejected by other reasons |
The errors sent to the personal merchant’s account (only you can see them):
timeout
Timeout of payment attempt
rejected_by_inspector
Rejected by anti-fraud service
preauthorization_failed
Preauthorisation error (3DS)
authorization_failed:
Provider payment authorisation error
unknown
Unknown authorisation error
merchant_blocked
A merchant is blocked
operation_blocked
A payment transaction is blocked
account_not_found
An account is not found
account_blocked
An account is blocked
account_stolen
An account is stolen
insufficient_funds
Insufficient funds
processing_deadline_reached
Payment fullfillment timeout (see Payment processing time limit)
account_limit_exceeded:
Payer’s account limit is exceeded
unknown
Limit object is unknown
amount
Amount limit
number
Attempt number limit
provider_limit_exceeded:
The provider limit is exceeded for this merchant or system in general
unknown
Limit object is unknown
amount
Amount limit
number
Attempt number limit
payment_tool_rejected:
A payment instrument is rejected
unknown
An unknown payment instrument
bank_card_rejected:
A bank card is rejected
unknown
The reason is unknown
card_number_invalid
A card number is invalid
card_expired
A card is expired
card_holder_invalid
A cardholder is invalid
cvv_invalid
CVV code is invalid
issuer_not_found
An issuer is not found
security_policy_violated
Security policy violations
temporarily_unavailable
Temporary unavailability of the third parties
rejected_by_issuer
Rejected by the issuer
For example, in the case of invalid CVV:
{
"code":"authorization_failed",
"subError":{
"code":"payment_tool_rejected",
"subError":{
"code":"bank_card_rejected",
"subError":{
"code":"cvv_invalid"
}
}
}
}
If you have an error that is not described here, contact the technical support.
getCountries
Get list of countries
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "RUS",
- "name": "string",
- "tradeBlocs": [
- "string"
]
}
]
getCountryByID
Get country data by country identifier
Authorizations:
path Parameters
countryID required | string^[A-Z]{3}$ Alpha-3 country code by standard [ISO 3166-1] (https://en.wikipedia.org/wiki/ISO_3166-1) |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "RUS",
- "name": "string",
- "tradeBlocs": [
- "string"
]
}
createCustomer
Create a new customer.
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Parameters of the customer to be created
externalID | string [ 1 .. 40 ] characters External customer identifier |
shopID required | string Shop ID |
partyID | string [ 1 .. 40 ] characters The participant's unique identifier within the system. |
required | object (ContactInfo) Contact details |
metadata required | object Customer metadata |
Responses
Request samples
- Payload
{- "externalID": "string",
- "shopID": "string",
- "partyID": "string",
- "contactInfo": {
- "email": "user@example.com",
- "phoneNumber": "string",
- "firstName": "John",
- "lastName": "Doe",
- "country": "RUS",
- "state": "Colorado",
- "city": "Denver",
- "address": "10th Street 13",
- "postalCode": "00012",
- "dateOfBirth": "1970-01-01",
- "documentId": "1234-5 678-abcd"
}, - "metadata": { }
}
Response samples
- 201
- 400
- 409
{- "customer": {
- "id": "string",
- "externalID": "string",
- "shopID": "string",
- "partyID": "string",
- "contactInfo": {
- "email": "user@example.com",
- "phoneNumber": "string",
- "firstName": "John",
- "lastName": "Doe",
- "country": "RUS",
- "state": "Colorado",
- "city": "Denver",
- "address": "10th Street 13",
- "postalCode": "00012",
- "dateOfBirth": "1970-01-01",
- "documentId": "1234-5 678-abcd"
}, - "status": "ready",
- "metadata": { }
}, - "customerAccessToken": {
- "payload": "string"
}
}
getCustomerById
Get a customer data by identifier.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "shopID": "string",
- "partyID": "string",
- "contactInfo": {
- "email": "user@example.com",
- "phoneNumber": "string",
- "firstName": "John",
- "lastName": "Doe",
- "country": "RUS",
- "state": "Colorado",
- "city": "Denver",
- "address": "10th Street 13",
- "postalCode": "00012",
- "dateOfBirth": "1970-01-01",
- "documentId": "1234-5 678-abcd"
}, - "status": "ready",
- "metadata": { }
}
deleteCustomer
Delete a customer by identifier
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 400
- 404
{- "code": "invalidPartyStatus",
- "message": "Invalid party status"
}
createCustomerAccessToken
Create a new token to access the specified customer.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 201
- 400
- 404
{- "payload": "string"
}
createBinding
Start a new payer binding.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Request Body schema: application/json; charset=utf-8required
Parameters of the created binding
externalID | string [ 1 .. 40 ] characters External customer binding identifier |
required | object (PaymentResource) Disposable payment tool data |
Responses
Request samples
- Payload
{- "externalID": "string",
- "paymentResource": {
- "paymentToolToken": "string",
- "paymentSession": "string"
}
}
Response samples
- 201
- 400
- 404
- 409
{- "id": "string",
- "externalID": "string",
- "paymentResource": {
- "paymentToolToken": "string",
- "paymentSession": "string",
- "paymentToolDetails": {
- "detailsType": "string"
},
}, - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
getBindings
Get all payer bindings.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": "string",
- "externalID": "string",
- "paymentResource": {
- "paymentToolToken": "string",
- "paymentSession": "string",
- "paymentToolDetails": {
- "detailsType": "string"
},
}, - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
]
getBinding
Get customer binding data.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
customerBindingID required | string [ 1 .. 40 ] characters Customer binding identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "externalID": "string",
- "paymentResource": {
- "paymentToolToken": "string",
- "paymentSession": "string",
- "paymentToolDetails": {
- "detailsType": "string"
},
}, - "status": "pending",
- "error": {
- "code": "string",
- "message": "string"
}
}
getCustomerEvents
Get the history of the specified customer as a list of events.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
query Parameters
limit required | integer <int32> >= 1 Selection limit |
eventID | integer <int32> Event identifier. All events that occurred in the system after the specified event will be included in the selection. |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "changes": [
- {
- "changeType": "CustomerBindingStarted"
}
]
}
]
getCustomerPaymentMethods
Get the payment methods available for the customer.
Authorizations:
path Parameters
customerID required | string [ 1 .. 40 ] characters Customer ID |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
[- {
- "method": "BankCard"
}
]
getTradeBlocs
Get a list of trade blocks
Authorizations:
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
[- {
- "id": "string",
- "name": "string",
- "description": "string"
}
]
getTradeBlocByID
Get trade block data by ID
Authorizations:
path Parameters
tradeBlocID required | string Trade bloc identifier |
header Parameters
X-Request-ID required | string [ 1 .. 32 ] characters Unique identifier of the request to the system |
X-Request-Deadline | string [ 1 .. 40 ] characters Maximum request processing time |
Responses
Response samples
- 200
- 400
- 404
{- "id": "string",
- "name": "string",
- "description": "string"
}