Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Develop
Test
Publish
Monetize
Engage users
Device specifications
Resources

Understanding Real-Time Notifications

Real-Time Notifications (RTN) are server-to-server push notifications that provide comprehensive data about in-app purchases in real time. You can use this information to monitor purchase state changes associated with your customer's in-app purchasable items.

Overview of Real-Time Notifications

Amazon uses receipts to notify you about a customer's purchase state for in-app items. A receipt contains the current order state and the in-app item details you defined.

Without RTN, you follow a pull model to get the latest receipt status. In the pull model, you must periodically call Receipt Verification Service (RVS) to query Amazon services for updates. However, RTN uses a push model where Amazon provides real-time server push notifications. Amazon's RTN server sends a notification to your back-end server with information about your customer's purchase, which you can then verify with RVS.

You can use Real-Time Notifications (RTN) in addition to Receipt Verification Service (RVS). The following diagram shows how the RVS and RTN processes interact.

See the description that follows.

The following is a description of the process shown in the diagram.

Steps 1–5: This is the regular RVS flow.

  1. User initiates an in-app purchase.
  2. App forwards the purchase receipt to your app server.
  3. App server sends a request to RVS server for validation of the receipt.
  4. RVS server confirms that the receipt is valid.
  5. Content delivered to the user.

For more details, see Receipt Verification Service Overview.

Step 6: RTN sends a notification message about the customer's in-app purchase to your app server.

Step 7: The app server sends a request to the RVS server for validation of the receipt and obtains all information related to the receipt.

Step 8: The RVS server confirms the receipt's validity and returns information associated with the receipt.

The RVS flow (Steps 1–5) doesn't need to complete for the RTN flow (Steps 6–8) to start. The flows can run in parallel.

Prerequisites

Before you can use Real-Time Notifications, make sure your environment is ready to receive RTN responses. Because RTN pushes messages to you, Amazon needs a secure, publicly reachable destination to send them to. You must have a back-end server that meets the following requirements:

  • Exposes an HTTPS endpoint that receives RTN responses
  • Handles the HTTPS POST requests that Amazon sends
  • Returns a 200 response code to acknowledge each message
  • Uses valid SSL certificates from a trusted certificate provider

After your server meets these requirements, register its endpoint in the Developer Console and complete the confirmation-token flow. For the steps, see Use Real-Time Notifications.

Live App Testing for RTN

Before you release your app, use Live App Testing (LAT) to confirm that your endpoint receives and processes Real-Time Notifications correctly. LAT lets you run real in-app purchase transactions in a controlled test environment without affecting live customers.

When you make an in-app purchase through LAT, the Amazon server returns an RTN payload with the attribute betaProductTransaction=true. Use this attribute to distinguish test notifications from production notifications so your server handles each appropriately.

Real-Time Notification message details

Real-Time Notifications are delivered through a JSON message to your HTTPS endpoint. Each notification contains the following JSON payload. You can find additional information in the Amazon Simple Notification Service (SNS) Developer Guide.

The Message attribute of a Real-Time Notification contains an escaped JSON with the following fields.

Field Data Type Description Example Response
receiptId String Unique identifier for the purchase. Max string length 200 characters and can include alphanumeric values and punctuation kyplB1fdRX1m6/GNAVW0l6jv9Nl1V/GemSopKBHM84w=
relatedReceipts Map Additional receipts that are associated with the notification sent cancelledReceiptId (Unique identifier for the previously cancelled receipt for SUBSCRIPTION_MODIFIED_IMMEDIATE notification)
appUserId String Identifier representing a distinct Amazon customer for your Appstore app. Max string length 128 characters and can include alphanumeric values and punctuation wE1EG1gsEZI9q9UnI5YoZ2OxeoVKPdR5bvPMqyKQq5Y=:1:11
notificationType String Notification type See the Supported Notifications table in the next section for details and examples.
appPackageName String App package name that identifies the app com.myapp.sample.android
timestamp Long Integer Epoch time 1402008634018
betaProductTransaction Boolean Indicates if the transaction is for Live App Testing product true/false

Supported notification types

RTN messages contain information about each type of in-app purchase (subscriptions, entitlements, and consumables).

Amazon might add or change notification types over time. You will be informed of new notification types as they are added. Amazon generally recommends that you ignore any notification types not applicable to you.

The following table describes the currently available notification types.

Notification Type Description
CONSUMABLE_CANCELLED Consumable item was voluntarily or involuntarily cancelled.
CONSUMABLE_PURCHASED Consumable item was purchased.
ENTITLEMENT_CANCELLED Entitlement item was voluntarily or involuntarily cancelled.
ENTITLEMENT_PURCHASED Entitlement item was purchased.
SUBSCRIPTION_AUTO_RENEWAL_OFF Auto-renew feature for subscription was turned off.
SUBSCRIPTION_AUTO_RENEWAL_ON Auto-renew feature for subscription was turned on.
SUBSCRIPTION_CANCELLED A subscription was voluntarily or involuntarily cancelled.
SUBSCRIPTION_CONVERTED_FREE_TRIAL_TO_PAID An active free trial subscription was converted to paid subscription.
SUBSCRIPTION_EXPIRED A subscription was expired.
SUBSCRIPTION_IN_GRACE_PERIOD A subscription has entered grace period (if enabled).
SUBSCRIPTION_OUT_OF_GRACE_PERIOD User fixes the payment issue/failure of the subscription which was previously in grace period.
SUBSCRIPTION_MODIFIED_DEFERRED A subscription plan was modified with the "deferred" proration mode. The subscription plan is scheduled to change at the next renewal date. The current plan remains active until the renewal date.
SUBSCRIPTION_MODIFIED_IMMEDIATE A subscription plan was modified with the "immediate" proration mode. The existing plan is canceled with a prorated refund, and the new plan is activated immediately. The notification includes the canceled receipt ID.
SUBSCRIPTION_PURCHASED A subscription was purchased.
SUBSCRIPTION_RENEWED An active subscription was renewed.
SUBSCRIPTION_SCHEDULED_TO_END A subscription is scheduled to end because the auto-renew feature was turned off. Sent 10 days before for a customer's monthly subscription is scheduled to end. Sent 30 days before a customer semi-annual/annual subscription is scheduled to end.

Real-Time Notification FAQ

The following are frequently asked questions (FAQ) about Real-Time Notifications.

Q1. What is the format of Real-Time Notification messages?
Real-Time Notifications are delivered in JSON messages to your specified HTTPS endpoint. For more details, see Real-Time Notification message details.
Q2. Will notifications be delivered in the exact order they were published?

The Amazon SNS service attempts to deliver messages from the publisher in the order they are published. However, network issues could potentially result in out-of-order messages at the HTTPS end point. It is recommended to check the timestamp attribute in the payload to check for out-of-order messages.

Q3. What are the possible delivery mechanisms supported?

Amazon supports only an HTTPS endpoint for delivering notifications. For details on registering and confirming your endpoint, see Use Real-Time Notifications.

Q4. What is the scope of origination of notification traffic?

AWS provides a list of Amazon IP addresses from which the traffic originates. Whenever there is a change in IP address space, AWS provides a mechanism to notify subscribers. For the current list of IP address ranges, see AWS IP address ranges documentation .

Q5. How can I test my HTTPS endpoint with the test transaction?

You can test your HTTPS endpoint with Live App Testing (LAT). See Live App Testing for RTN above for details.

Q6. Do I need to call the RVS API for all the notification messages?

Yes, it is recommended to call the Receipt Verification Service (RVS) API to get the latest information about the receipt.

Q7. What is the SLA associated with the notification message?

The Real-Time Notifications service does not offer an official latency SLA. However, most notifications should be published within a few seconds of the event occurrence.

Q8. Can I create an allow list of Amazon IP address?

Yes, but this is optional. You can approve Amazon IP addresses so that Amazon can communicate with your servers. Check this list periodically for changes.


Last updated: Oct 08, 2026