Getting payment data by ID (v2)
This method allows requesting payment data based on purchase invoceId
.
tip
If you are in doubt read the instruction in the usage scenarios.
Interaction parameters
GET
https://public-api.rustore.ru/public/v2/purchase/{invoiceId}
Attribute | Type | Description | Mandatory | Location | Example |
---|---|---|---|---|---|
Public-Token | string | Jwe token to Public API Rustore. How to get an authorization token. | Yes | header | N/A |
invoceId | number | How to get invoceId , see. SDK payments documentation. | Yes | query |
Response parameters
Attribute | Type | Description | Mandatory | Location | Example |
---|---|---|---|---|---|
code | string | Response code | Yes | body | • OK ;• ERROR ;• BAD_REQUEST ;• NOT_FOUND . |
message | string | Decoded response code | No, nullable | body | Jwe token is expired |
body | object | Response body | No | body | N/A |
timestamp | string | Response time | Yes | body | 2023-08-02T10:11:04.655684723+03:00 |
body
Attribute | Type | Description | Mandatory | Example |
---|---|---|---|---|
invoiceId | string | Invoice No. | Yes | 12345 |
invoiceDate | string | Invoice date | Yes | 2020-04-29T08:18:03+03:00 |
refundDate | string | Refund date. Returns value only for payments in the REFUNDED status. | No, nullable | 2020-04-29T08:18:03+03:00 |
invoiceStatus | string | Invoice status | Yes | Payment statuses that will be included in the list.
|
developerPayload | string | String with additional information about the order that you can set during purchase initialization in SDK. | No, nullable | N/A |
appId | int | Applicatio conde (see SDK documentation). | Yes | 3399750 |
ownerCode | int | App owner code | Yes | 4384191 |
paymentInfo | object | Payment info | No, if the payment tool is not selected (invoice is in the CREATED status) | N/A |
paymentInfo
Attribute | Type | Description | Mandatory | Example |
---|---|---|---|---|
paymentDate | string | Payment date and time. | No | 2024-10-24T14:31:33+03:00 |
maskedPan | string | Masked card number | No | **1111 |
paymentSystem | string | Payment system. | No | Visa |
paymentWay | string | Payment Method. | No | SberPay |
paymentWayCode | string | Payment Method ID. | No | SberPay |
bankName | string | Issuing bank name. | No | Sberbank |
order
Attribute | Type | Description | Mandatory | Example |
---|---|---|---|---|
orderId | string | Unique order ID | Yes | d290f1ee-6c54-4b01-90e6-d701748f0851 |
orderNumber | string | Order No. | No | 145 |
visualName | string | Operation name. | Yes | Purchase of digital content |
amountCreate | integer | Order amount in minimum currency units. | Yes | 10000 |
amountCurrent | number | Purchase amount with discounts in minimum currency units. | Yes | 9000 |
currency | string | Currency code | Yes | RUB |
itemCode | string | Product code specified in the RuStore Console on product creation. | Yes | 1day |
description | string | Order Description | Yes | Mash and the Bear in-app purchase — 100 crystals |
language | string | Description language. | Yes | ru-RU |
Successful response
{
"code": "OK",
"message": null,
"body":
{
"invoiceId": "2850",
"invoiceDate": "2023-07-18T14:31:33+03:00",
"refundDate": null,
"invoiceStatus": "confirmed",
"developerPayload": null,
"appId": "3399750",
"ownerCode": "4384191",
"paymentInfo": {
"paymentDate": "2024-10-24T14:31:33+03:00",
"maskedPan": "XX1111",
"paymentSystem": "Visa",
"paymentWay": "Payment with a saved card",
"paymentWayCode": "CARD_BINDING",
"bankName": "Sberbank"
},
"order": {
"orderId": "a090a93c-ca06-493d-a90a-ce2bac722358",
"orderNumber": "311",
"visualName": "Masha and the Bear in-app purchase — 100 crystals",
"amountCreate": 10000,
"amountCurrent": 9000,
"currency": "RUB",
"itemCode": "1day",
"description": "1day",
"language": "en-US",
},
},
"timestamp": "2023-08-02T10:11:04.655684723+03:00"
}
Error response example
{
"code": "ERROR",
"message": "Jwe token is expired",
"body": null,
"timestamp": "2024-01-21T13:51:59.654427798+03:00"
}
Response verification
On receiving a request the authorization token is checked (see [generating a security token] (/work-with-rustore-api/api-authorization-token)):
- the owner and/or app must not be blocked;
- the token must be valid;
- the
appId
matches to the token owner.