Ad

Shopify Billing API Status Updates: Frozen, Expired, Etc

- 1 answer

I'm developing an app for Shopify and they show a flow diagram on this page: https://help.shopify.com/api/charging-for-your-app/recurring-application-charges

I'm doing a recurring charge, which is described here: https://help.shopify.com/api/reference/recurringapplicationcharge

Their docs say that when a user accepts/declines a charge, the user will be sent to return_url, where I can then verify the status.

But how do I handle / get notified on the other cases where payment is interrupted:

  1. User doesn't respond and charge becomes expired
  2. User cancels Shopify account
  3. User's credit card is removed/declined
  4. User's account is frozen
Ad

Answer

If the User declines, they do not visit the confirmation URL. But if you examine the charge, its state shows declined, not pending.

If the User cancels their account, you get an uninstall webhook if you're listening for that, so you can uninstall the shop.

If the User has credit card problems Shopify takes care of that.

If the account is frozen you can just sit on it for as long you care to, and then you can delete it if things persist.

Ad
source: stackoverflow.com
Ad