Skip to main content

Enabling server-side payment notifications

To receive notifications about payment status changes in your app, configure, test, and enable delivery in the RuStore Console.
If your app uses the Pay SDK, you can also enable notifications for subscription events.

Before you enable notifications

Configure notification delivery

  1. Open the RuStore Console and go to your app.
  2. In the left menu, select Monetization → Server notifications and click Connect.
  3. Enter the URL of your server endpoint that will accept notifications.
    The address must start with https://.
Example of a valid URL
https://www.notification-payment-server.my-company.ru
  1. Choose the notification type: payments, subscriptions, or both.
note

Notifications are available for:

  • Payments — via BillingClient SDK or Pay SDK
  • Subscriptions — via Pay SDK
tip

Notifications are available for events from both real and test subscriptions.

  1. Copy and save the decryption key. You must configure this key in your server’s symmetric encryption component.
Notifications settings in RuStore Console

Configure notification types

In Notification type you can enable or disable server notifications for:

  • Payment statuses
  • Subscription events

Test notification delivery

Before enabling notifications, test your server configuration. Click Check in the Connection check row. Your server will receive a test notification.

Delivery guarantees do not apply to test notifications. You can send a test notification no more than once every 30 seconds.

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

Server responseErrorDescription
HTTP status 4xx or 5xxNot Found, Unauthorized, etc.Text error codes are displayed according to RFC 7231.
Request timed outRead timed outThere is a time limit for the request from RuStore to your backend. This error appears when the limit is exceeded.
The limit is 3 seconds with no data written to the socket, and no more than 5 seconds total to receive a response.
Connection reset by developer’s backendConnection resetYour backend reset the connection.
SSL issuesUnsupported or unrecognized SSL messageSSL problem — check your server certificate.
Name or service not knownThe server address does not exist.

Enable notifications

Once you confirm that your server correctly receives notifications and returns delivery acknowledgments, enable Notify about real payments. The service will start sending notifications in real time according to the selected notification type.

Notifications are sent when a payment status changes.

SituationPayment status change
A new payment is created (assumption)Status becomes CREATED
The user chose a payment method in the app; payment is being executedStatus appears/changes to EXECUTED
The user cancelled the paymentStatus changes to CANCELLED
Funds are reserved; the invoice awaits confirmation (consumables, two-step flow)Status changes to PAID
Payment completed successfullyStatus changes to CONFIRMED
Funds were refunded to the buyerStatus changes to REFUNDED
Authorization hold was cancelledStatus changes to REVERSED
Payment failed (insufficient funds, invalid CVC, etc.)Status changes to REJECTED
Payment window expiredStatus changes to EXPIRED
Refund initiated; request sent to the acquirerStatus changes to REFUNDING

If your server returns an error in response to a notification, RuStore will retry delivery. See Notification delivery guarantees.

What’s next

Right after enabling: ensure that the payload from the notification is decrypted correctly. It contains the app information, purchased product, and the new and previous statuses.

Going forward:

  • During outages or maintenance, you can temporarily disable notifications.
  • If your endpoint URL changes, update it in the RuStore Console.
  • If the encryption key is lost or compromised, issue a new key and update it on your server.