Revoke Purchase

Every time a purchase needs to be revoked, an API call with the user ID, product ID, and purchase token is sent to your fulfill endpoint. The response must indicate whether the item was successfully revoked. Independently of the SDK, you will be interacting with RevokePurchaseRequest and RevokePurchaseResponse.

RevokePurchaseRequest

Field Description
operation The name of the operation. Always Revoke for purchases.
reason An enumerated value explaining why the message was passed:
CUSTOMER_SERVICE_REQUEST (Sent on a revoke initiated by customer service)
PAYMENT_PROBLEM (Sent on a revoke initiated due to Fraud/problems with a payment)
productId The third party product code for the item that is fulfilled. This is provided to Amazon when the item is ingested.
userId The customer ID (provided to Amazon in the Link response) that identifies which user to deliver the item to. This is the same ID that you will return in the GetUserId call.
purchaseToken Unique identifier for the transaction. It is a requirement to store this to maintain state.

RevokePurchaseResponse

Field Description
response Valid response codes are:
OK
FAIL_INVALID_PURCHASETOKEN (Purchase token was not recognized)
FAIL_USER_INVALID (User Id set was invalid)
FAIL_OTHER (Catch all Error code)