Check customer payment status

Highlighted
Shopify Partner
22 0 2

I'm setting up a process to run daily to check the status of customer accounts to verify that they are still in good standing with shopify.  That is, suppose a customer installs our app, and then they get charged for that first month, that's fine.  But suppose 3 months later, the customer's card fails to charge when shopify charges them for the month.  How would we know that our app's recurring charge failed that month? 

 

Right now, I'm planning on calling the admin/api/2020-01/recurring_application_charges.json  for the shop to get the recurring charges, and check to see if there are any with an 'active' status. 

 

If there are no active status recurring charges from this call, would that indicate the customer has failed to pay? 

 

I already have a handler for the app/uninstalled to remove the account when the uninstall our app, and have endpoints for plan/billing changes, but there is no endpoint for when the monthly recurring charge fails to go through, and I'm just trying to create a process to check that each day.  Would what I propose above work?

0 Likes
Highlighted
Shopify Partner
22 0 2

Anyone with experience with this?

0 Likes
Highlighted
Shopify Partner
22 0 2

Any thoughts?  This is somewhat important to figure out...

0 Likes
Highlighted
Shopify Staff
Shopify Staff
592 72 131

Hey @provenq,

 

Shopify handles any cases where a customer's card is declined. Our billing system will automatically re-attempt payment and send a notification to the merchant if their card declines a charge. If the payment continues to decline after multiple attempts, the shop is frozen until payment is made. Your app should continue to provide service to any shop as long as the RecurringApplicationCharge is in an active state. 

 

This doc outlines the process in more detail as well. 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes