Receipt Verification for Tiered Subscriptions
The Receipt Verification Service (RVS) enables validation of purchases made by your app's users.
RVS for tiered subscriptions
Set up RVS for tiered subscription apps the same as you would for any other app. See RVS documentation for more information.
For apps with tiered subscriptions, RVS uses an additional cancelReason
response code for cancelled subscriptions.
Cancel Reason Response Codes
The cancelReason
response code is a long integer that indicates why a product was cancelled. Possible values are null, 0, 1, 2, or 4, where each integer represents a cancellation reason, described in the table below.
cancelReason Code | Description |
---|---|
null |
The purchase was not cancelled. |
0 |
The cancel reason is currently unavailable and will render at a later time. |
1 |
Your customer cancelled the order. |
2 |
The purchase was cancelled by Amazon's system. For example, a customer purchases a subscription with invalid payment and the purchase could not be completed in the grace period. |
4 |
Subscription was replaced with a new subscription. For example, if a customer moves to a new tier, the original receipt is cancelled and a new receipt is provided. |
cancelReason
response code 3
is an internal code used by Amazon.You can find a full list of response codes in the RVS documentation.
Example RVS response
The following code is an example of a full RVS response:
{
"autoRenewing":false,
"betaProduct":true,
"cancelDate":1400784371000,
"cancelReason":4,
"freeTrialEndDate":null,
"gracePeriodEndDate":null,
"parentProductId":null,
"productId":"sub1",
"productType":"SUBSCRIPTION",
"purchaseDate":1400784241000,
"quantity":null,
"receiptId":"JyGJ5iEtYgFu1ngnQovTqSIHQxR53GsMLqkR1tKLp5c=:3:11",
"renewalDate":null,
"term":"1 Week",
"termSku":"sub1-weekly",
"testTransaction":true
}
The cancelReason
indicates that the app has changed to a different tier, which cancels the previous subscription.
For more RVS examples, see IAP documentation.
Last updated: Dec 03, 2024