Hi. I have a minor naming suggestion for the "Connections.Response" request (from the code readability perspective only):
Results for both Upsell and Cancel operations are called "purchaseResult" :
request['payload']['purchaseResult']
I understand that it's best to have a unified naming but the word "purchase" in purchaseResult while returning from a Cancel operation is a little bit confusing. For instance, in the attached "request" example, catching a glimpse (without paying attention to the "name": "Cancel"), "purchaseResult": "ACCEPTED" implies that this was a successful *purchase* operation; however, this is indeed a *cancel* operation...
I guess something that works for both Upsell and Cancel would be best, e.g., "payloadResult" or simply "Result"...
----------
"request": { "type": "Connections.Response", "requestId": ..., "timestamp": ..., "locale": "en-US", "status": { "code": "200", "message": "OK" }, "name": "Cancel", "payload": { "purchaseResult": "ACCEPTED", "productId": ... }, "token":... }