RVS Examples for Appstore Billing Compatibility
The sections on this page contain RVS examples for the Amazon RVS production server. Each example includes the JSON response. These examples use working URLs. If you paste the request into a browser, you should receive the same response as the example.
Consumable example
The following request is to verify the purchase of a consumable receipt on the RVS production server using the purchases.products.get API:
https://appstore-sdk.amazon.com/version/1.0/get/developer/2:smXBjZkWCxDMSBvQ8HBGsUS1PK3jvVc8tuTjLNfPHfYAga6WaDzXJPoWpfemXaHg:iEzHzPjJ-XwRdZ4b4e7Hxw==/applications/com.amazon.sample.iapv2/purchases/products/com.amazon.iapsamplev2.gold_medal/tokens/wE1EG1gsEZI9q9UnI5YoZ2OxeoVKPdR5bvPMqyKQq5Y=:1:11
This call receives the following sample JSON response:
{
"cancelDate": null,
"cancelReason": null,
"kind": "androidpublisher#productPurchase",
"parentProductId": null,
"productId": "com.amazon.iapsamplev2.gold_medal",
"productType": "CONSUMABLE",
"purchaseState": 0,
"purchaseTimeMillis": "1399070221749",
"purchaseToken": "wE1EG1gsEZI9q9UnI5YoZ2OxeoVKPdR5bvPMqyKQq5Y=:1:11",
"purchaseType": null,
"quantity": 1,
"testTransaction": false
}
Entitlement example
The following request is to verify the purchase of an entitlement receipt on the RVS production server using the purchases.products.get API:
https://appstore-sdk.amazon.com/version/1.0/get/developer/2:smXBjZkWCxDMSBvQ8HBGsUS1PK3jvVc8tuTjLNfPHfYAga6WaDzXJPoWpfemXaHg:iEzHzPjJ-XwRdZ4b4e7Hxw==/applications/com.amazon.sample.iapv2/purchases/products/com.amazon.iapsamplev2.expansion_set_1/tokens/mINy5VRd1FqjVOz-WBtTqw9FBGWhnuVx07kzTBMR600=:2:11
This call receives the following sample JSON response:
{
"cancelDate": null,
"cancelReason": null,
"kind": "androidpublisher#productPurchase",
"parentProductId": null,
"productId": "com.amazon.iapsamplev2.expansion_set_1",
"productType": "ENTITLED",
"purchaseState": 0,
"purchaseTimeMillis": "1399070753509",
"purchaseToken": "mINy5VRd1FqjVOz-WBtTqw9FBGWhnuVx07kzTBMR600=:2:11",
"purchaseType": null,
"quantity": 1,
"testTransaction": false
}
Subscription example
The following request is to verify the purchase of a subscription receipt on the RVS production server using the purchases.subscriptionsv2.get API:
https://appstore-sdk.amazon.com/version/1.0/developer/2:SPOkNr03vVx0_u04edvPTf5t6VC-HHS4535VkVviYJp7fCvSepKM5Ys-_ODYdtw8:Y-tOqaWFAXCHluaxssj9VQ==/applications/com.amazon.sample.iap/purchases/subscriptionsv2/tokens/JyGJ5iEtYgFu1ngnQovTqSIHQxR53GsMLqkR1tKLp5c=:3:11
This call receives the following sample JSON response:
{
"cancelDate": 1400784371000,
"canceledStateContext": {
"developerInitiatedCancellation": null,
"replacementCancellation": null,
"systemInitiatedCancellation": {},
"userInitiatedCancellation": null
},
"deferredDate": null,
"freeTrialEndDate": null,
"fulfillmentDate": null,
"fulfillmentResult": null,
"gracePeriodEndDate": null,
"kind": "androidpublisher#subscriptionPurchaseV2",
"lineItems": [
{
"autoRenewingPlan": {
"autoRenewEnabled": true
},
"deferredItemReplacement": null,
"expiryTime": "1400784371000",
"offerDetails": {
"basePlanId": "amzn1.appstore.iap.compatibility.baseplan.termsku.sub1-weekly",
"offerId": "amzn1.appstore.iap.compatibility.offer.termsku.sub1-weekly"
},
"productId": "sub1"
}
],
"productType": "SUBSCRIPTION",
"promotions": null,
"purchaseTimeMillis": "1400784241000",
"purchaseMetadataMap": null,
"receiptId": "JyGJ5iEtYgFu1ngnQovTqSIHQxR53GsMLqkR1tKLp5c=:3:11",
"renewalDate": null,
"startTime": "Thu May 22 18:44:01 UTC 2014",
"subscriptionState": "SUBSCRIPTION_STATE_EXPIRED",
"term": "1 Week",
"testPurchase": {},
"testTransaction": true
}
Related topics
- RVS for Consumables and Entitlements
- RVS for Subscriptions
- RVS Production Setup for Appstore Billing Compatibility
Last updated: May 22, 2024