Enabling notifications
To receive notifications on changes in payments status in your app, configure, test, and enable sending notifications in the RuStore Console.
Before enabling notifications
-
Configure your server to receive notifications from RuStore.
-
Make sure that your company is not blocked, that it has monetization enabled, and supports payment functionality in the app.
tip- How to enable monetization
- How to create a paid in-app product
Configuring notifications
-
Open RuStore Console and navigate to your app.
-
In the left menu, select Monetization — Server notifications and press Connect.
-
Specify the URL address of your receiving server. The address must begin with
https://
.Example of a valid URL address:
https://www.notification-payment-server.my-company.ru
-
Copy and save the key for notifications decryption. It needs to be added to the symmetric encryption scheme on your server.
Testing
Before enabling notifications, test your server configuration. To do this, press Send in the Test notification field. Your server will receive a test notification.
Delivery guarantees do not apply to your server. You can send the test notification not more than once in 30 seconds.
The server response will be displayed in the RuStore Console. If the response is different from Notification delivered successfully, check your server configuration and network connection between your server and RuStore. Possible server responses are listed in the table below:
Server response | Error | Description |
---|---|---|
HTTP code 4xx or 5xx | Not Found, Unauthorized, and other responses | RFC 7231 text codes are displayed |
Response timed out | Read timed out | There is a time limitation for responses from RuStore to your Backend, when exceeded, this error occurs. The limit is 3 seconds if nothing is written to the socket but not more than 5 seconds of waiting for response in general |
The connection is reset by the developer's BE | Connection reset | Backend of your server has reset the connection |
Trouble with SSL | Unsupported or unrecognized SSL message | Trouble with SSL, check server certificate |
Name or service not known | Specified server address does not exist |
Enabling notifications
Ass soon as you make sure that your server receives notifications and sends back confirmations, activate the Send notifications switch. The service will begin to send notifications in real time.
The notifications are triggered by payment status changes.
Case | Payment status change |
---|---|
The user selected a payment methods, the payment is executed | The payment now has the executed status |
The user canceled the payment | The payment status changes to cancelled |
The user's funds are on hold and awaiting confirmation (for consumable products only) | The payment status changes to paid |
Payment is successful | The payment status changes to confirmed |
The order is refunded | The payment status changes to refunded |
The payment hold was released | The payment status changes to reversed |
If your server returns an error in response to a notification, RuStore will try to send the notification again, see Notifications delivery guarantees.
What next
After enabling notifications: make sure the data from payload
is decrypted.
It contains information about purchased product as well as the about the new and previous statuses.
Further on:
- In an event of outage or during maintenance, you can temporarily disable notifications.
- If the receiving URL address changes, modify it in the RuStore Console.
- The encryption key is lost or compromised, get a new one and update it on your server.