Use RVS Cloud Sandbox
RVS Cloud Sandbox is a sandbox environment for RVS (Receipt Verification Service) that you can use to verify receipts generated by App Tester. Use RVS Cloud Sandbox in the development phase of your app, before publishing your app to the Amazon Appstore.
- Environment requirements
- RVS response objects
- Send an RVS Cloud Sandbox request
- RVS Cloud Sandbox example
Environment requirements
Before you use RVS Cloud Sandbox, make sure your environment meets the following requirements.
App Tester
RVS Cloud Sandbox is used to validate receipts generated by the App Tester. You must install the Amazon App Tester tool on an Android mobile device/Tablet/FireTV before you can use the RVS Cloud Sandbox. See App Tester Setup for more details.
The App Tester sends a receipt for each completed in app purchase. You need to pass the App Tester receipt to your app server, then call RVS Cloud Sandbox to verify the receipt.
Secure protocol
The server needs to communicate securely with RVS Cloud Sandbox via a secure protocol such as HTTPS. Your server sends validation requests to RVS Cloud Sandbox and processes the responses.
RVS response objects
The RVS Cloud Sandbox request uses data from the PurchaseResponse
object, or the PurchaseUpdatesResponse
object. From these response objects, you can extract a UserId
, which denotes a unique identifier of the user. The PurchaseResponse
object contains a ReceiptId
, which is used along with the UserId
to perform an out-of-band server-side validation of the purchase.
Send an RVS Cloud Sandbox request
To use RVS Cloud Sandbox, you must send a request over HTTPS to the RVS Cloud Sandbox endpoint: https://appstore-sdk.amazon.com/sandbox
.
Use the following format for your request, replacing the terms in the angle brackets with the values in the table below:
https://appstore-sdk.amazon.com/sandbox/version/{operation-version-number}/verifyReceiptId/developer/{shared-secret}/user/{user-id}/receiptId/{receipt-id}
Parameter | Description |
---|---|
operation-version-number | Version number of the verifyReceiptId operation. This version number is independent of the IAP version number. The current verifyReceiptId version number is "1.0". |
shared-secret | Shared secret used to identify the developer issuing the request. Your shared secret can be found on the Shared Key page in the Developer Console: https://developer.amazon.com/sdk/shared-key.html. For the RVS Cloud Sandbox, the shared secret can be any non-empty string. The RVS Cloud Sandbox server does not validate the shared secret, as it's only validated for the production servers. |
user-id | ID representing a distinct Amazon customer for your Appstore app. Obtain the user ID from PurchaseResponse.getUserData().getUserId() . |
receipt-id | Unique ID for the purchase. Obtain the reciept ID from PurchaseResponse.getReceipt().getReceiptId() or PurchaseUpdatesResponse.getReceipts() → Receipt.getReceiptId() . |
RVS Cloud Sandbox example
The following request verifies a receipt in the RVS Cloud Sandbox:
https://appstore-sdk.amazon.com/sandbox/version/1.0/verifyReceiptId/developer/developerSecret/user/l3HL7XppEMhrOGDnur9-ulvqomrSg6qyODKmah76lJU=/receiptId/q1YqVbJSyjH28DGPKChw9c0o8nd3ySststQtzSkrzM8tCk43K6z0d_HOTcwwN8vxCrVV0lEqBmpJzs_VS8xNrMrP0ysuTSo2BAqXKFkZ6SilACUNzQxMzAyNjYyNDQ3MgDKJSlZpiTnFqTpK6UpWJUWlQEYahFELAA
This call receives a JSON response from the RVS Cloud Sandbox server:
{
"autoRenewing": false,
"betaProduct": false,
"cancelDate": null,
"cancelReason": null,
"deferredDate": null,
"deferredSku": null,
"freeTrialEndDate": 1606985788979,
"gracePeriodEndDate": 1606985788979,
"parentProductId": null,
"productId": "com.amazon.subs1",
"productType": "SUBSCRIPTION",
"promotions": null,
"purchaseDate": 1604613233106,
"quantity": 1,
"receiptId": "q1YqVbJSyjH28DGPKChw9c0o8nd3ySststQtzSkrzM8tCk43K6z0d_HOTcwwN8vxCrVV0lEqBmpJzs_VS8xNrMrP0ysuTSo2BAqXKFkZ6SilACUNzQxMzAyNjYyNDQ3MgDKJSlZpiTnFqTpK6UpWJUWlQEYahFELAA",
"renewalDate": 1606985788979,
"term": "1 Month",
"termSku": "com.amazon.subs1_term",
"testTransaction": true
}
For descriptions of the fields in the response, see RVS response fields. For an example of how to set up your app server, see RVS Production Setup for Appstore SDK IAP.
Last updated: May 22, 2024