Getting payment data by ID [DEPRECATED]
Deprecated
This method is deprecated and not recommended for use.
We recommend using the new method.
This method allows requesting payment data based on purchase invoiceId.
tip
If you don't know where to start read the instruction.
Interaction parameters
For actual payments [DEPRECATED]:
Deprecated
This method is deprecated and not recommended for use.
GET
https://public-api.rustore.ru/public/purchase
caution
For test payments use the following method:
GET
https://public-api.rustore.ru/public/sandbox/purchase
To work with test payments you'll need a new key — specify the methods you'll need for testing when you create this key.
| Attribute | Type | Description | Mandatory | Located | Example |
|---|---|---|---|---|---|
Public-Token | string | Jwe authorization token in Public API Rustore. How to get authorization token. | Yes | header | N/A |
invoiceId | number | How to get invoiceId, see SDK payments documentation. | Yes | query |
Response parameters
| Attribute | Type | Description | Mandatory | Located | Example |
|---|---|---|---|---|---|
code | string | Response code. | Yes | body | • ОК;• ERROR;• BAD_REQUEST;• NOT_FOUND. |
message | string | Message of the response. | No | body | Jwe token is expired |
body{} | object | Response body. | No | body | N/A |
timestamp | string | Response time and date. | Yes | body | 2023-08-02T10:11:04.655684723+03:00 |
body{}
| Attribute | Type | Description | Example |
|---|---|---|---|
error {} | object | Error message. | N/A |
invoice_id | string | Invoice ID. | 12345 |
invoice_date | string | Invoice creation date. | 2020-04-29T08:18:03+03 |
invoice_status | string | Invoice status. | • created — invoice created;• executed — the user selected a payment method, the payment is being processed;• cancelled — canceled by user;• paid — user funds are put on hold, the invoice needs to be confirmed (only for consumable products);• confirmed — payment successful;• reversed, refunded — amount is returned to the buyer. |
invoice {} | object | Information about invoice. | N/A |
image | string | Image link. | https://i-love-png.com/images/grim-reaper-icon.png |
application_code | string | Application code. | com.MashaAndTheBear.HairSalon |
application_name | string | Application name. | "Masha and the Bear" hair salon |
owner_code | string | Application owner code. | com.MashaAndTheBear |
owner_name | string | Application owner name. | Masha and the Bear |
payment_info {} | object | Payment information. | N/A |
payment_methods{} | object | Payment tools. | N/A |
body.error {}
| Attribute | Type | Description | Example |
|---|---|---|---|
user_message | string | Error text. | Invoice confirmed |
error_description | object | Error description. | N/A |
error_code | number | Numeric error code. | 0 |
body.invoice {}
| Attribute | Type | Description | Example |
|---|---|---|---|
purchaser{} | object | Buyer information. | N/A |
delivery_info{} | object | Delivery information. | N/A |
invoice_params[] | array | Additional parameters of the order. | N/A |
order{} | object | Order information. | N/A |
body.invoice.purchaser {}
| Attribute | Type | Description | Example |
|---|---|---|---|
email | string | Buyer's email. | qq@dd.eof |
phone | string | Phone number | 9123456789 |
contact | string | Preferred contact method. | email |
body.invoice.delivery_info {}
| Attribute | Type | Description | Example |
|---|---|---|---|
address{} | object | Address. | N/A |
delivery_type | string | Delivery method. | courier |
description | string | Additional information. | Call 1,5 hours in advance. |
body.invoice.delivery_info.address {}
| Attribute | Type | Description | Example |
|---|---|---|---|
country | string | Country ID. | RU |
city | string | City. | Moscow |
address | string | Address. | st. Vavilova, 19, office 1 |
body.invoice.invoice_params []
| Attribute | Type | Description | Example |
|---|---|---|---|
key | string | Parameter name. | packageName |
value | string | Parameter value. | com.MashaAndTheBear.HairSalon |
body.invoice.order {}
| Attribute | Type | Description | Example |
|---|---|---|---|
order_id | string | Order ID. | d290f1ee-6c54-4b01-90e6-d701748f0851 |
order_number | string | Order number. | 145 |
order_date | string | Order date. | 2020-04-29T08:17:03+03 |
service_id | string | Service ID. | 223 |
amount | number | Purchase amount in minimum currency units. | 11836 |
currency | string | Currency code. | RUB |
purpose | string | Short payment purpose description. | “Masha and the Bear Hair Salon” in-game purchase |
description | string | Order description. | In-game item purchase in “Masha and the Bear Hair Salon” |
language | string | Language. | en-US |
expiration_date | string | Invoice expiration date and time. | 2022-10-11T14:05:44.741Z |
tax_system | number | Tax system. | 0 |
trade_name | string | Organization trade name. | Romashka |
visual_name | string | Operation name. | Purchase/subscription prolongation |
org_name | string | Organization name. | OOO Romashka |
org_inn | string | Organization TIN. | 1234567890 |
visual_amount | string | Sum. | 1 500,45 ₽ |
order_bundle [] | array | Order bundle. | N/A |
body.invoice.order.order_bundle []
| Attribute | Type | Description | Example |
|---|---|---|---|
position_id | number | Product position ID. | 1 |
name | string | Product name or description. | Crystals |
item_params[] | array | Additional order parameters. | N/A |
quantity{} | object | Total product quantity description. | N/A |
item_amount | number | Total sum of all items in minimum currency units. | 11836 |
currency | string | Currency code. | RUB |
item_code | string | Item code. | com.MashaAndTheBear.HairSalon.crystal100 |
item_price | number | Item price in minimum currency units. | 11836 |
discount_type | string | Discount type. | percent |
discount_value | float | Discount value. | 5.25 |
interest_type | string | Agent fee type | agentPercent |
interest_value | float | Agent fee type value. | 15.105 |
tax_type | number | VAT rate. | 6 |
tax_sum | number | Tax sum in minimum currency units. | 2367 |
image | string | Image link. | https://i-love-png.com/images/grim-reaper-icon.png |
body.invoice.order.order_bundle.item_params []
| Attribute | Type | Description | Example |
|---|---|---|---|
key | string | Parameter name. | packageName |
value | string | Parameter value. | com.MashaAndTheBear.HairSalon |
body.invoice.order.order_bundle.quantity {}
| Attribute | Type | Description | Example |
|---|---|---|---|
value | float | Value. | 1.05 |
measure | string | Measure unit. | kg |
body.payment_info {}
| Attribute | Type | Description | Example |
|---|---|---|---|
payment_date | number | Payment date and time. | 2022-10-11T14:05:44.741Z |
payment_id | string | Payment ID. | 82022-123456 |
payment_params{} | object | Payment additional parameters. | N/A |
device_info{} | object | Device information. | N/A |
loyalty_info{} | object | Loyalty program information. | N/A |
card_id | string | Card ID. | ad454ffg-6c54-4b01-90e6-d701748f0851 |
name | string | Card alias. | Main |
paysys_code | string | N/A | RBS-shortname |
masked_pan | string | Masked card name. | **1111 |
expiry_date | string | Card expiry date. | 201912 |
cardholder | string | Cardholder name. | Ivan Petrov |
payment_system | string | Payment system. | Visa |
payment_system_image | string | Link to a payment service provider logo. | https://smartmarkettestift.online.sberbank.ru/icons/logo_visa.png |
image | string | Link to a card logo. | https://smartmarkettestift.online.sberbank.ru/icons/sberbank_mastercard_league_legends.jpeg |
paysys | string | Payment system name. | RBS |
paysys_image | string | Link to a payment system logo. | https://www.sberbank.ru/common/img/uploaded/redirected/s_m_business/acquiring/assets/images/intro@2x.png |
payment_way | string | Payment method. | SberPay |
payment_way_code | string | Payment method ID. | SberPay |
payment_way_logo | string | Link to a payment method log. | https://cdn1.telegram.one/i/f7640dada78306b1c993e04001b8738d/828b1eb30921659e22e53a9edc92c4c4/24e01830d213d75deb99c22b9cd91ddd |
bank_info{} | object | Bank information. | N/A |
body.payment_info.payment_params {}
| Attribute | Type | Description | Example |
|---|---|---|---|
key | string | Parameter name. | googlePurchaseToken |
value | string | Parameter value. | ameinkbophchljaejnocadib |
body.payment_info.device_info {}
| Attribute | Type | Description | Example |
|---|---|---|---|
device_platform_type | string | Device platform. | Android |
device_platform_version | string | Platform OS version. | Android 13 |
device_model | string | Device model. | Samsung Galaxy A14 |
device_manufacturer | string | Vendor. | Samsung |
device_id | string | Device serial number. | 83c3f257-46d8-41fe-951b-f79d04e288c2 |
surface | string | N/A | RuStore |
surface_version | string | Software version. | 11.5.0 |
body.payment_info.loyalty_info {}
| Attribute | Type | Description | Example |
|---|---|---|---|
service_code | string | Bonus program code. | sbrf_spasibo |
service_name | string | Bonus program name. | Sberbanl Spasibo |
change_rate | number | Bonus point exchange rate to rubles. | 1 |
payment_bonus | number | Amount of bonus points used in payment — in minimum currency units. | 19800 |
award_bonus | number | Amount used for receiving bonus point. Indicated in minimum units (kopecks) | 21850 |
image | string | Image link. | https://i-love-png.com/images/grim-reaper-icon.png |
body.payment_info.bank_info {}
| Attribute | Type | Description | Example |
|---|---|---|---|
bank_name | string | Emitting bank name. | Loyalty program |
bank_country_code | string | Emitting bank country code. | RU |
bank_country_name | string | Emitting bank country name. | Russia |
bank_image | string | Link to a bank logo. | https://emoji.slack-edge.com/TKK9DHNCV/sber/ad2df81a6cd9812d.png |
body.payment_methods {}
| Attribute | Type | Description | Example |
|---|---|---|---|
user_message | string | User message (optional). | To activate the subscription, save your bank card in the mobile app. |
methods[] | array | Payment methods. | N/A |
body.payment_methods.methods []
| Attribute | Type | Description | Example |
|---|---|---|---|
method | string | Code. | QR |
action | string | Name. | Pay with QR code |
Response example
{
"code": "OK",
"message": null,
"body": {
"invoice_id": "2850",
"invoice_date": "2023-07-18T14:31:33+03",
"invoice_status": "confirmed",
"application_code": "3399750",
"application_name": "Masha and the Bear",
"owner_code": "4384191",
"owner_name": "Narana\ LLC",
"payment_info": {
"payment_date": "2023-07-18T14:31:42+03",
"payment_id": "82022-123456",
"payment_params": null,
"loyalty_info": null,
"card_id": "193",
"paysys_code": "RBS-shortname",
"masked_pan": "XX1111",
"expiry_date": "202412",
"payment_system": "Visa",
"payment_system_image": "https://smartmarket.online.sberbank.ru/image/visa.png",
"paysys_image": null,
"payment_way": "Pay with a saved card",
"payment_way_code": "CARD_BINDING",
"payment_way_logo": "https://static.tildacdn.com/tild6236-3530-4235-b966-326630656238/___14_-removebg-prev.png",
"bank_info": {
"bank_name": "Sberbank",
"bank_country_code": "SU",
"bank_country_name": null,
"bank_image": null
},
"device_info": null,
"name": null,
"cardholder": "CARDHOLDER NAME",
"image": null,
"paysys": "RBS"
},
"payment_methods": null,
"error": {
"user_message": "Verified",
"error_description": "",
"error_code": 0
},
"invoice": {
"delivery_info": {
"delivery_type": null,
"address": {
"country": null,
"city": null,
"address": null
},
"description": null
},
"invoice_params": [
{
"key": "inapp_serviceparam_message_about_loyalty",
"value": "You can now pay for your subscription with bonuses. Subscription renewal is available for rubles only."
},
{
"key": "inapp_serviceparam_action_name",
"value": "Enable subscription"
},
{
"key": "inapp_serviceparam_features",
"value": "VERIFY"
},
{
"key": "period_type",
"value": "DAY"
},
{
"key": "period_duration",
"value": "1"
},
{
"key": "current_period",
"value": "STANDARD"
},
{
"key": "payment_type",
"value": "INITIAL"
}
],
"purchaser": {
"email": null,
"phone": null,
"contact": null
},
"order": {
"order_id": "a090a93c-ca06-493d-a90a-ce2bac722358",
"order_number": "311",
"order_date": "2023-07-18T14:31:33+03",
"service_id": "4720",
"expiration_date": "2023-07-18T14:51:33+03",
"tax_system": null,
"trade_name": null,
"visual_name": "Purchasing/Renewing a Subscription",
"org_name": "Super LLC",
"org_inn": "4419198349",
"visual_amount": "1 ₽",
"order_bundle": [
{
"position_id": 1,
"item_params": [
{
"key": "_auto_itemAttributes_agent_info.type",
"value": "7"
},
{
"key": "_auto_itemAttributes_supplier_info.name",
"value": "LLC \"Narana\"
},
{
"key": "_auto_itemAttributes_supplier_info.inn",
"value": "4419198349"
}
],
"item_amount": 100,
"item_code": "1day",
"item_price": 100,
"discount_type": null,
"discount_value": null,
"interest_type": null,
"interest_value": null,
"tax_type": 6,
"tax_sum": null,
"name": "Payment for purchasing a \"1day\". Провайдер: Provider: \"Purchase/Renewal of Subscription\",
"quantity": {
"value": 1,
"measure": "pcs"
},
"currency": "RUB",
"image": ""
}
],
"amount": 100,
"currency": "RUB",
"purpose": "1day",
"description": "1day",
"language": "ru-RU"
}
},
"image": ""
},
"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
application_codematches to the token owner.