Getting payment data
This method allows retrieving payment info for a purchase token.
Interaction parameters
GET
https://public-api.rustore.ru/public/purchase/{purchaseToken}
Attribute | Type | Description | Required | Location | Example |
---|---|---|---|---|---|
| string | Jwe token to Public API Rustore | Yes | header | N/A |
note
| string | How to get a subscription token Billing SDK Documentation. | Yes | path |
|
Response example
Attribute | Type | Description | Required | Location | Example |
---|---|---|---|---|---|
code | number | Response code | Yes | body | • ОК ;• ERROR ;• BAD_REQUEST ;• NOT_FOUND . |
message | date | Decoded response code | No | 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 | Example |
---|---|---|---|
error {} | object | Decoded error | N/A |
invoice_id | string | Invoice No. | 12345 |
invoice_date | string | Invoice date | 2020-04-29T08:18:03+03 |
invoice_status | string | Invoice status | • created — created;• executed — user has selected a payment method, the payment is executed;• cancelled — canceled by the user;• paid — funds are reserved, the account is awaiting confirmation (for consumable products only);• confirmed — payment was successful;• reversed , refunded — funds from the account have been returned to the buyer. |
invoice {} | object | Invoice No. | N/A |
image | string | Image link | https://i-love-png.com/images/grim-reaper-icon.png |
application_code | string | App code | com.MashaAndTheBear.HairSalon |
application_name | string | App name | Masha and the Bear Hair Salon |
owner_code | string | App owner code | com.MashaAndTheBear |
owner_name | string | App owner name | Masha and the Bear |
payment_info {} | object | Payment info | N/A |
payment_methods{} | object | Payment tools | N/A |
body.error {}
Attribute | Type | Description | Example |
---|---|---|---|
user_message | string | Error body | 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 order parameters | N/A |
order{} | object | Order info | N/A |
body.invoice.purchaser {}
Attribute | Type | Description | Example |
---|---|---|---|
email | string | User email | qq@dd.eof |
phone | string | Phone number | 9123456789 |
contact | string | Preferred communication type | email |
body.invoice.delivery_info {}
Attribute | Type | Description | Example |
---|---|---|---|
address{} | object | Address | N/A |
delivery_type | string | Delivery type | courier |
description | string | Additional Information | Call back in 1.5 hours |
body.invoice.delivery_info.address {}
Attribute | Type | Description | Example |
---|---|---|---|
country | string | Country ID | RU |
city | string | City | Moscow |
address | string | Address | `str. 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 | Unique order ID | d290f1ee-6c54-4b01-90e6-d701748f0851 |
order_number | string | Order No. | 145 |
order_date | string | Order date | 2020-04-29T08:17:03+03 |
service_id | string | Service ID | 223 |
amount | number | Order amount in minimum currency units (kopecks) | 11836 |
currency | string | Currency code | RUB |
purpose | string | Brief purpose of payment | Purchase in the game “Masha and the Bear Hair Salon” |
description | string | Order Description | In-game item purchase in “Masha and the Bear Hair Salon” |
language | string | Language | ru-RU |
expiration_date | string | Account expiration date and time | 2022-10-11T14:05:44.741Z |
tax_system | number | Tax system | 0 |
trade_name | string | Company trade name | Romashka |
visual_name | string | Company name | Purchasing/renewing a subscription |
org_name | string | Company name | Romashka LLC |
org_inn | string | Company TIN | 1234567890 |
visual_amount | string | Amount | 1 500,45 ₽ |
order_bundle [] | array | Order list | N/A |
body.invoice.order.order_bundle []
Attribute | Type | Description | Example |
---|---|---|---|
position_id | number | Unique item ID | 1 |
name | string | Item name and description | Crystals |
item_params[] | array | Additional order parameters | N/A |
quantity{} | object | Description of the total number of product items | N/A |
item_amount | number | Total cost of all items in minimum currency units (in kopecks) | 11836 |
currency | string | Currency code | RUB |
item_code | string | Item number (ID) | com.MashaAndTheBear.HairSalon.crystal100 |
item_price | number | Cost of one product item in minimum currency units | 11836 |
discount_type | string | Discount type | percent |
discount_value | float | Discount value | 5.25 |
interest_type | string | Agency fee type | agentPercent |
interest_value | float | Agency fee value | 15.105 |
tax_type | number | VAT rate | 6 |
tax_sum | number | Tax amount in minimum currency units (kopecks) | 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 | Unit of measurement | kg |
body.payment_info {}
Attribute | Type | Description | Example |
---|---|---|---|
payment_date | number | Payment date and time | 2022-10-11T14:05:44.741Z |
payment_id | string | Unique payment ID | 82022-123456 |
payment_params{} | object | Additional payment options | N/A |
device_info{} | object | Device Information | N/A |
loyalty_info{} | object | Loyalty program information | N/A |
card_id | string | Unique bank card ID | ad454ffg-6c54-4b01-90e6-d701748f0851 |
name | string | Cardholder name | Main |
paysys_code | string | N/A | RBS-shortname |
masked_pan | string | Masked card number | **1111 |
expiry_date | string | Card expiration date | 201912 |
cardholder | string | Cardholder name | Ivan Petrov |
payment_system | string | Payment system | Visa |
payment_system_image | string | Link to payment system logo | https://smartmarkettestift.online.sberbank.ru/icons/logo_visa.png |
image | string | Link to card logo | https://smartmarkettestift.online.sberbank.ru/icons/sberbank_mastercard_league_legends.jpeg |
paysys | string | Name of payment operator | RBS |
paysys_image | string | Link to payment operator 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 payment method logo | 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 | Manufacturer | 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 | Sberbank Spasibo |
change_rate | number | Exchange rate for points to rubles | 1 |
payment_bonus | number | Amount of bonus points used to pay the bill, in kopecks | 19800 |
award_bonus | number | Amount of funds used to earn points when paying for an order. Indicated in minimum units | 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 | Issuing bank name | PJSC Sberbank |
bank_country_code | string | Issuing bank country code | RU |
bank_country_name | string | Bank country name | Russia |
bank_image | string | Link to bank logo | https://emoji.slack-edge.com/TKK9DHNCV/sber/ad2df81a6cd9812d.png |
body.payment_methods {}
Attribute | Type | Description | Example |
---|---|---|---|
user_message | string | Message to user (optional) | To activate the subscription, save your bank card in the mobile app. |
methods[] | array | Payment options | N/A |
body.payment_methods.methods []
Attribute | Type | Description | Example |
---|---|---|---|
method | string | Code. | QR |
action | string | Name | Pay via 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
{
"code": "ERROR",
"message": "Jwe token is expired",
"body": null,
"timestamp": "2024-01-21T13:51:59.654427798+03:00"
}
Response verification
The security token is generated by the security token method and then verified while getting the response:
-
Owner and/or app should not be blocked;
-
Token should be valid;
-
application_code
invoice should contain the application code which corresponds to the token owner.