Test Device Purchases
If you used the is_test_device:true flag in your LWA registration request, DRS will treat this as a test device. A replenish API call for a test device will generate a "trial purchase," which simulates a purchase event, including applicable notifications, without charging the customer’s payment instrument or shipping a consumable.
The Order Placed and Item Shipped SNS notifications will be sent. Trial purchases cannot be canceled and will not appear in the customer’s Amazon.com order history.
A test order can be canceled by calling a CancelTestOrder API. The standard order can be canceled by customers through their Amazon account.
Real purchases vs Test purchases
| Action | Real purchase | Test purchase | 
|---|---|---|
| E-mail notification to the user | Y | Y (address will be "N/A") | 
| SNS notification | Y | Y | 
| Consumable shipment/payment | Y | N | 
Replenish API detailCode response
 | 
STANDARD_ORDER_PLACED
 | 
TEST_ORDER_PLACED
 | 
| Cancelling orders | Within 24 hours from Amazon.com > Orders | CancelTestOrder API | 
JavaScript Sample Request
var options = new Object();
var scope = ('dash:replenish');
var scope_data = new Object();
scope_data['dash:replenish'] = {"device_model":modelX,"serial":serialY,"is_test_device":true};
options['scope_data'] = scope_data;
options['scope'] = scope;
options['response_type'] = code;
amazon.Login.authorize(options,"https://mysite/redirect_here");
Last updated: Aug 07, 2018

