Skip to main content

Enabling sending payment notifications

To receive notifications about changes in payment statuses in your app, configure, test, and enable sending via RuStore Console.
If your app uses Pay SDK, notifications about subscription events are also available.

Before enabling notifications

Configuring notification delivery

  1. Open RuStore Console and go to your app.
  2. In the left menu, select Monetization > Server notifications and click Connect.
  3. Specify the URL of your server that will receive notifications. The address must start with https://.
Example of a valid URL
https://www.notification-payment-server.my-company.ru
  1. Select the notification type: payment, subscription, or both.

  2. Copy and save the key for decrypting notifications. You need to add it to the symmetric encryption mechanism on your server.

img

Configuring notification types

In the Notification type block, you can enable and disable sending server notifications about:

  • Payment statuses
  • Subscription events

Testing notification delivery

Before enabling sending notifications, test the server configuration. To do this, click Check in the Connection check row. Your server will receive a test notification.

It is not covered by delivery guarantees. You can send a test notification no more often than once every 30 seconds.

The server response will be displayed in RuStore Console. If it differs from Notification successfully delivered, you need to check the server configuration and network connectivity between RuStore and the server. The table below lists possible server responses.

Server responseErrorDescription
HTTP code 4xx or 5xxNot Found, Unauthorized, and othersText error codes are shown according to RFC 7231.
Request timed outRead timed outThere is a time limit for executing the request from RuStore to your server Backend. If this limit is exceeded, this error appears.
The limit is 3 seconds if nothing is written to the socket, but no more than 5 seconds of total response wait time.
Connection reset by developer BEConnection resetThe Backend of your server reset the connection.
SSL issuesUnsupported or unrecognized SSL messageSSL issues — check the server certificate.
Name or service not knownA non-existent server address is specified.

Enabling notification delivery

Once you make sure the server correctly receives notifications and sends delivery acknowledgements, enable Notify about real payments. The service will start sending real-time notifications according to the selected notification type.

Notifications are sent in cases when a payment status changes.

ScenarioPayment status change
A new payment is created (assumption)The payment status becomes CREATED
The user selects a payment method in the app, the payment is being processedThe payment status appears/changes to EXECUTED
The user cancels the paymentThe payment status changes to CANCELLED
User funds are reserved, the invoice is awaiting confirmation (only for purchasing consumable products)The payment status changes to PAID
The payment is successfulThe payment status changes to CONFIRMED
Funds are refunded to the buyerThe payment status changes to REFUNDED
A reservation cancellation occursThe payment status changes to REVERSED
The payment attempt is rejected (insufficient funds, invalid CVC, etc.)The payment status changes to REJECTED
The time allocated for payment has expiredThe payment status changes to EXPIRED
A refund is initiated, the request is sent to the acquirerThe payment status changes to REFUNDING

If your server returns an error in response to a notification, RuStore will try to resend the notification. See Delivery guarantees for notifications.

What’s next

Right after enabling: make sure the information from the notification payload is decrypted correctly. This is where the data about the app, the purchased product, and the new and previous statuses is stored.

Later:

  • During outages or maintenance on the server, you can temporarily disable sending notifications.
  • If the URL for receiving notifications has changed, change it in RuStore Console.
  • If the encryption key is lost or compromised, get a new key and update it on your server.