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:
Attribute | Type | Description | Required | Location | Example |
---|---|---|---|---|---|
id | String | Notification ID | Yes | body | 12345 |
timestamp | String | The time notification was sent | Yes | body | 2022-07-08T13:24:41.8328711+03:00 |
payload | String | Base64 data string encrypted with AES-256 | Yes | body |
payload
Attribute | Type | Description | Required | Location | Example |
---|---|---|---|---|---|
notification_type | String |
| Yes | body | INVOICE_STATUS |
app_id | Number | ID of the app from which the purchase was made | Yes | body | 12345 |
data | String | Data block, the structure depends on | Yes | body |
payment status change data
Attribute | Type | Description | Location | Example |
---|---|---|---|---|
product_code | String | Code of the paid product that was specified in the RuStore Console when the product was created | payload.data | test_test |
change_status_time | String | Payment status time or the time the first notification was sent. If a notification is delivered at first attempt, change_status_time matches timestamp | payload.data | 1970-01-01T00:00:00Z |
status_new | String | New payment status. Available values:
| payload.data | paid |
status_old | String | Previous payment status. Available values:
| payload.data | executed |
purchase_token | String | Purchase token. You can use it to get the payment data using the RuStore API | payload.data | 111.123 |
invoice_id | String | Unique invoice number in RuStore | payload.data | 123 |
order_id | String | Unique order number in the developer's app system. Can be provided on purchase initialization or assigned automatically by the paymetn provider | payload.data | 123e4567e89b-12d3-a456-4266-55440000 |
purchase_id | String | Purchase ID | payload.data | 123e4567e89b-12d3-a456-4266-55440000 |
test notification data
Attribute | Type | Description | Location | Example |
---|---|---|---|---|
test | String | Test string | payload.data | TEST |
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\"}"
}