Skip to main content

Notification structure

This page contains the description of the payment status change notification structure and test notification structure. They are both sent as POST requests with the following attributes:

AttributeTypeDescriptionRequiredLocationExample
idStringNotification IDYesbody12345
timestampStringThe time notification was sentYesbody2022-07-08T13:24:41.8328711+03:00
payloadStringBase64 data string encrypted with AES-256Yesbody

payload

AttributeTypeDescriptionRequiredLocationExample
notification_typeString
  • INVOICE_STATUS — payment status change notification
  • TEST_EVENT — test notification
YesbodyINVOICE_STATUS
app_idNumberID of the app from which the purchase was madeYesbody12345
dataString

Data block, the structure depends on notification_type:

  • data in INVOICE_STATUS
  • data in TEST_EVENT
Yesbody

payment status change data

AttributeTypeDescriptionLocationExample
product_codeStringCode of the paid product that was specified in the RuStore Console when the product was createdpayload.datatest_test
change_status_timeStringPayment status time or the time the first notification was sent.

If a notification is delivered at first attempt, change_status_time matches timestamp
payload.data1970-01-01T00:00:00Z
status_newString

New payment status. Available values:

  • EXECUTED - payment process started;
  • CONFIRMED — final status of a successful payment, the money is withdrawn from the buyer's account;
  • CANCELLED - canceled by the user before payment process started;
  • REJECTED - rejected payment (insufficient funds, invalid CVC, or other reasons);
  • EXPIRED - payment time expired;
  • PAID - for consumable goods, the money is put on hold, the purchase is awaiting confirmation from the developer;
  • REVERSED - for consumable products, no confirmation received, hold canceled, the money is returned to the buyer;
  • REFUNDED - the order is refunded.
payload.datapaid
status_oldString

Previous payment status. Available values:

  • CREATED - payment created;
  • EXECUTED - payment process started;
  • CONFIRMED — final status of a successful payment, the money is withdrawn from the buyer's account;
  • CANCELLED - canceled by the user before payment process started;
  • REJECTED - rejected payment (insufficient funds, invalid CVC, or other reasons);
  • EXPIRED - payment time expired;
  • PAID - for consumable goods, the money is put on hold, the purchase is awaiting confirmation from the developer;
  • REVERSED - for consumable products, no confirmation received, hold canceled, the money is returned to the buyer;
  • REFUNDED - the order is refunded.
payload.dataexecuted
purchase_tokenStringPurchase token. You can use it to get the payment data using the RuStore APIpayload.data111.123
invoice_idStringUnique invoice number in RuStorepayload.data123
order_idStringUnique order number in the developer's app system. Can be provided on purchase initialization or assigned automatically by the paymetn providerpayload.data123e4567e89b-12d3-a456-4266-55440000
purchase_idStringPurchase IDpayload.data123e4567e89b-12d3-a456-4266-55440000

test notification data

AttributeTypeDescriptionLocationExample
testStringTest stringpayload.dataTEST

payload examples

payload of the payment status change notification

{
"app_id": 12345,
"notification_type": "INVOICE_STATUS",
"data": "{\"change_status_time\":\"1970-01-01T00:00:00Z\",\"product_code\":\"test_test\",\"status_new\":\"paid\",\"status_old\":\"executed\",\"purchase_token\":\"111.123\",\"invoice_id\":\"123\",\"order_id\":\"123e4567e89b-12d3-a456-4266-55440000\",\"purchase_id\":\"123e4567e89b-12d3-a456-4266-55440000\"}"
}

payload of the test notification

{
"app_id": 12345,
"notification_type": "TEST_EVENT",
"data": "{\"test\":\"TEST\"}"
}