I can’t seem to find any way to test the refund flow for simple one time consumable non-subscription purchases (no entitlements). This is mission critical because my backend needs to deduct tokens from a user’s account if they refund.
I understand I should expect a CANCELLATION webhook event, but if I call GET /subscribers/{app_user_id} in response to the webhook, what will be the change to their user info object?
Will the purchase entry be removed from their list of purchases in the non-subscriptions json node?
Is there really no way to test refunds from the sandbox?
Best answer by chris_perriam
After the refund is processed (i.e. at the time we dispatch the CANCELLATION webhook), we’ll remove the consumable purchase from the non_subscriptions array in the response object for GET /v1/subscribers/{app_user_id}.
After the refund is processed (i.e. at the time we dispatch the CANCELLATION webhook), we’ll remove the consumable purchase from the non_subscriptions array in the response object for GET /v1/subscribers/{app_user_id}.
I did notice that if I use storekit, when purchase events come through the webhook, my calls to /GET subscribers/{app user id} return an empty user. I tried adding the X-Is-Sandbox: true header but it still was empty. I’m going to try using the full apple sandbox to see if theres a difference.
edit: it worked with the sandbox, just had to do the banking info/paid app agreement stuff on apple’s site and wait 24 hours