Skip to main content

Getting payment data

This method allows retrieving payment info for a purchase token.

Interaction parameters

GET

https://public-api.rustore.ru/public/purchase/{purchaseToken}

AttributeTypeDescriptionRequiredLocationExample

Public-Token

string

Jwe token to Public API Rustore


How to get an authorization token.

YesheaderN/A

purchaseToken

note

purchaseToken = subscriptionToken from Billing SDK.

string

How to get a subscription token Billing SDK Documentation.

Yespath

111.123

Response example

AttributeTypeDescriptionRequiredLocationExample
codenumberResponse codeYesbodyОК;
ERROR;
BAD_REQUEST;
NOT_FOUND.
messagedateDecoded response codeNobodyJwe token is expired
body{}objectResponse bodyNobodyN/A
timestampstringResponse timeYesbody2023-08-02T10:11:04.655684723+03:00

body{}

AttributeTypeDescriptionExample
error {}objectDecoded errorN/A
invoice_idstringInvoice No.12345
invoice_datestringInvoice date2020-04-29T08:18:03+03
invoice_statusstringInvoice statuscreated — 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 {}objectInvoice No.N/A
imagestringImage linkhttps://i-love-png.com/images/grim-reaper-icon.png
application_codestringApp codecom.MashaAndTheBear.HairSalon
application_namestringApp nameMasha and the Bear Hair Salon
owner_codestringApp owner codecom.MashaAndTheBear
owner_namestringApp owner nameMasha and the Bear
payment_info {}objectPayment infoN/A
payment_methods{}objectPayment toolsN/A

body.error {}

AttributeTypeDescriptionExample
user_messagestringError bodyInvoice confirmed
error_descriptionobjectError descriptionN/A
error_codenumberNumeric error code
0

body.invoice {}

AttributeTypeDescriptionExample
purchaser{}objectBuyer informationN/A
delivery_info{}objectDelivery informationN/A
invoice_params[]arrayAdditional order parametersN/A
order{}objectOrder infoN/A

body.invoice.purchaser {}

AttributeTypeDescriptionExample
emailstringUser emailqq@dd.eof
phonestringPhone number9123456789
contactstringPreferred communication typeemail

body.invoice.delivery_info {}

AttributeTypeDescriptionExample
address{}objectAddressN/A
delivery_typestringDelivery typecourier
descriptionstringAdditional InformationCall back in 1.5 hours

body.invoice.delivery_info.address {}

AttributeTypeDescriptionExample
countrystringCountry IDRU
citystringCityMoscow
addressstringAddress`str. Vavilova, 19, office 1

body.invoice.invoice_params []

AttributeTypeDescriptionExample
keystringParameter namepackageName
valuestringParameter valuecom.MashaAndTheBear.HairSalon

body.invoice.order {}

AttributeTypeDescriptionExample
order_idstringUnique order IDd290f1ee-6c54-4b01-90e6-d701748f0851
order_numberstringOrder No.145
order_datestringOrder date2020-04-29T08:17:03+03
service_idstringService ID223
amountnumberOrder amount in minimum currency units (kopecks)11836
currencystringCurrency codeRUB
purposestringBrief purpose of paymentPurchase in the game “Masha and the Bear Hair Salon”
descriptionstringOrder DescriptionIn-game item purchase in “Masha and the Bear Hair Salon”
languagestringLanguageru-RU
expiration_datestringAccount expiration date and time2022-10-11T14:05:44.741Z
tax_systemnumberTax system0
trade_namestringCompany trade nameRomashka
visual_namestringCompany namePurchasing/renewing a subscription
org_namestringCompany nameRomashka LLC
org_innstringCompany TIN1234567890
visual_amountstringAmount1 500,45 ₽
order_bundle []arrayOrder listN/A

body.invoice.order.order_bundle []

AttributeTypeDescriptionExample
position_idnumberUnique item ID1
namestringItem name and descriptionCrystals
item_params[]arrayAdditional order parametersN/A
quantity{}objectDescription of the total number of product itemsN/A
item_amountnumberTotal cost of all items in minimum currency units (in kopecks)11836
currencystringCurrency codeRUB
item_codestringItem number (ID)com.MashaAndTheBear.HairSalon.crystal100
item_pricenumberCost of one product item in minimum currency units11836
discount_typestringDiscount typepercent
discount_valuefloatDiscount value5.25
interest_typestringAgency fee typeagentPercent
interest_valuefloatAgency fee value15.105
tax_typenumberVAT rate6
tax_sumnumberTax amount in minimum currency units (kopecks)2367
imagestringImage linkhttps://i-love-png.com/images/grim-reaper-icon.png

body.invoice.order.order_bundle.item_params []

AttributeTypeDescriptionExample
keystringParameter namepackageName
valuestringParameter valuecom.MashaAndTheBear.HairSalon

body.invoice.order.order_bundle.quantity {}

AttributeTypeDescriptionExample
valuefloatValue.1.05
measurestringUnit of measurementkg

body.payment_info {}

AttributeTypeDescriptionExample
payment_datenumberPayment date and time2022-10-11T14:05:44.741Z
payment_idstringUnique payment ID82022-123456
payment_params{}objectAdditional payment optionsN/A
device_info{}objectDevice InformationN/A
loyalty_info{}objectLoyalty program informationN/A
card_idstringUnique bank card IDad454ffg-6c54-4b01-90e6-d701748f0851
namestringCardholder nameMain
paysys_codestringN/ARBS-shortname
masked_panstringMasked card number**1111
expiry_datestringCard expiration date201912
cardholderstringCardholder nameIvan Petrov
payment_systemstringPayment systemVisa
payment_system_imagestringLink to payment system logohttps://smartmarkettestift.online.sberbank.ru/icons/logo_visa.png
imagestringLink to card logohttps://smartmarkettestift.online.sberbank.ru/icons/sberbank_mastercard_league_legends.jpeg
paysysstringName of payment operatorRBS
paysys_imagestringLink to payment operator logohttps://www.sberbank.ru/common/img/uploaded/redirected/s_m_business/acquiring/assets/images/intro@2x.png
payment_waystringPayment MethodSberPay
payment_way_codestringPayment Method IDSberPay
payment_way_logostringLink to payment method logohttps://cdn1.telegram.one/i/f7640dada78306b1c993e04001b8738d/828b1eb30921659e22e53a9edc92c4c4/24e01830d213d75deb99c22b9cd91ddd
bank_info{}objectBank informationN/A

body.payment_info.payment_params {}

AttributeTypeDescriptionExample
keystringParameter namegooglePurchaseToken
valuestringParameter valueameinkbophchljaejnocadib

body.payment_info.device_info {}

AttributeTypeDescriptionExample
device_platform_typestringDevice platformAndroid
device_platform_versionstringPlatform OS versionAndroid 13
device_modelstringDevice modelSamsung Galaxy A14
device_manufacturerstringManufacturerSamsung
device_idstringDevice serial number83c3f257-46d8-41fe-951b-f79d04e288c2
surfacestringN/ARuStore
surface_versionstringSoftware version11.5.0

body.payment_info.loyalty_info {}

AttributeTypeDescriptionExample
service_codestringBonus program codesbrf_spasibo
service_namestringBonus program nameSberbank Spasibo
change_ratenumberExchange rate for points to rubles1
payment_bonusnumberAmount of bonus points used to pay the bill, in kopecks19800
award_bonusnumberAmount of funds used to earn points when paying for an order. Indicated in minimum units21850
imagestringImage linkhttps://i-love-png.com/images/grim-reaper-icon.png

body.payment_info.bank_info{}

AttributeTypeDescriptionExample
bank_namestringIssuing bank namePJSC Sberbank
bank_country_codestringIssuing bank country codeRU
bank_country_namestringBank country nameRussia
bank_imagestringLink to bank logohttps://emoji.slack-edge.com/TKK9DHNCV/sber/ad2df81a6cd9812d.png

body.payment_methods {}

AttributeTypeDescriptionExample
user_messagestringMessage to user (optional)To activate the subscription, save your bank card in the mobile app.
methods[]arrayPayment optionsN/A

body.payment_methods.methods []

AttributeTypeDescriptionExample
methodstringCode.QR
actionstringNamePay 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.