Shopify Billing API status updates: frozen, expired, etc
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 (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 (https://help.shopify.com/api/reference/recurringapplicationcharge)
Their docs say that when a user accepts/declines a charge, the user will be sent toreturn_url
, where I can then verify the status.
But how do I handle / get notified on the other cases where payment is interrupted:
- User doesn't respond and charge becomes expired
- User cancels Shopify account
- User's credit card is removed/declined
- User's account is frozen
Answer
Solution:
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.
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.