Gracias por tu visita. Esta página solo está disponible en inglés.

RVS Examples

RVS examples for the RVS sandbox environment and the Amazon RVS production server, along with the responses for each example. Note that these examples use working URLs, so if you paste the request into a browser, you should receive the same response as the example.

Example: RVS Sandbox request

The following request verifies a receipt in the RVS Sandbox:

http://localhost:8080/RVSSandbox/version/1.0/verifyReceiptId/developer/developerSecret/user/99FD_DL23EMhrOGDnur9-ulvqomrSg6qyLPSD3CFE=/receiptId/q1YqVrJSSs7P1UvMTazKz9PLTCwoTswtyEktM9JLrShIzCvOzM-LL04tiTdW0lFKASo2NDEwMjCwMDM2MTC0AIqVAsUsLd1c4l18jIxdfTOK_N1d8kqLLHVLc8oK83OLgtPNCit9AoJdjJ3dXG2BGkqUrAxrAQ

This call receives the following sample JSON response:

{
    "betaProduct":false,
    "cancelDate":null,
    "parentProductId":null,
    "productId":"com.amazon.iapsamplev2.expansion_set_3",
    "productType":"ENTITLED",
    "purchaseDate":1402008634018,
    "quantity":1,
    "receiptId":"q1YqVrJSSs7P1UvMTazKz9PLTCwoTswtyEktM9JLrShIzCvOzM-LL04tiTdW0lFKASo2NDEwMjCwMDM2MTC0AIqVAsUsLd1c4l18jIxdfTOK_N1d8kqLLHVLc8oK83OLgtPNCit9AoJdjJ3dXG2BGkqUrAxrAQ",
    "renewalDate":null,
    "term":null,
    "termSku":null,
    "testTransaction":true
}

Example: Consumable Purchase Via RVS Production Server

The following request is to verify the purchase of a consumable receipt on the production server:

https://appstore-sdk.amazon.com/version/1.0/verifyReceiptId/developer/2:smXBjZkWCxDMSBvQ8HBGsUS1PK3jvVc8tuTjLNfPHfYAga6WaDzXJPoWpfemXaHg:iEzHzPjJ-XwRdZ4b4e7Hxw==/user/LRyD0FfW_3zeOlfJyxpVll-Z1rKn6dSf9xD3mUMSFg0=/receiptId/wE1EG1gsEZI9q9UnI5YoZ2OxeoVKPdR5bvPMqyKQq5Y=:1:11

This call receives the following sample JSON response:

{
 "betaProduct":false,
 "cancelDate":null,
 "parentProductId":null,
 "productId":"com.amazon.iapsamplev2.gold_medal",
 "productType":"CONSUMABLE",
 "purchaseDate":1399070221749,
 "quantity":1,
 "receiptId":"wE1EG1gsEZI9q9UnI5YoZ2OxeoVKPdR5bvPMqyKQq5Y=:1:11",
 "renewalDate":null,
 "term":null,
 "termSku":null,
 "testTransaction":true
}

The purchaseDate and cancelDate are represented as time in milliseconds. You can call java.util.Date(timeInMillis) to convert the values into a date object. A cancelDate of null indicates that the purchase has not been canceled. If the receipt is for a canceled purchase the cancelDate would reflect the date the purchase was canceled by Amazon customer support.

Example: Subscription Purchase Via RVS Production Server

The following request is to verify the purchase of a subscription receipt on the production server:

https://appstore-sdk.amazon.com/version/1.0/verifyReceiptId/developer/2:SPOkNr03vVx0_u04edvPTf5t6VC-HHS4535VkVviYJp7fCvSepKM5Ys-_ODYdtw8:Y-tOqaWFAXCHluaxssj9VQ==/user/7m7UQpSnce0DcAOgcCZFVW5-sNc2rVYE6aQCGc6URNU=/receiptId/JyGJ5iEtYgFu1ngnQovTqSIHQxR53GsMLqkR1tKLp5c=:3:11
{
    "betaProduct":true,
    "cancelDate":1400784371000,
    "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 purchaseData and cancelDate are represented as time in milliseconds. You can call java.util.Date(timeInMillis) to convert the values into a date object. A cancelDate of null indicates that the subscription for this receipt is still active. If the receipt is for an expired subscription the cancelDate would reflect the date the subscription expired, or the date it was canceled by Amazon customer support.

Example: Entitlement Purchase Via RVS Production Server

The following request is to verify the purchase of a subscription receipt on the production server:

https://appstore-sdk.amazon.com/version/1.0/verifyReceiptId/developer/2:smXBjZkWCxDMSBvQ8HBGsUS1PK3jvVc8tuTjLNfPHfYAga6WaDzXJPoWpfemXaHg:iEzHzPjJ-XwRdZ4b4e7Hxw==/user/LRyD0FfW_3zeOlfJyxpVll-Z1rKn6dSf9xD3mUMSFg0=/receiptId/mINy5VRd1FqjVOz-WBtTqw9FBGWhnuVx07kzTBMR600=:2:11

This call receives the following sample JSON response:

{
    "betaProduct":false,
    "cancelDate":null,
    "parentProductId":null,
    "productId":"com.amazon.iapsamplev2.gold_medal",
    "productType":"ENTITLED",
    "purchaseDate":1399070221749,
    "quantity":1,
    "receiptId":"mINy5VRd1FqjVOz-WBtTqw9FBGWhnuVx07kzTBMR600=:2:11",
    "renewalDate":null,
    "term":null,
    "termSku":null,
    "testTransaction":true
}

The purchaseDate and cancelDate are represented as time in milliseconds. You can call java.util.Date(timeInMillis) to convert the values into a date object. A cancelDate of null indicates that the purchase has not been canceled. If the receipt is for a canceled purchase the cancelDate would reflect the date the purchase was canceled by Amazon customer support.