Getting shop subscription status

YuriS
Shopify Partner
14 0 4

So I've been looking through the Billing API docs, some things are not clear. Specifically:

Is there a way to get a shop paying/not paying status from the API?

If there's no such way, how do you guys know when a shop started/stopped paying for a plan?

 

Thanks

Replies 3 (3)

SBD_
Shopify Staff
1829 269 405

Hey @YuriS,

 

Once you create a charge, a customer has to approve it, at which point they'll be redirected back to your app with a charge_id parameter. From there, you can activate the approved charge to commence the billing cycle. 

 

Once you activate the charge, the recurring application charge 'status' becomes 'active'. If you see the charge is active, you can keep a record on your side to know they're paying.

 

If a customer uninstalls you app, the charges are automatically stopped.

 

If you're even unsure if a customer is paying, get their recurring application charges and look for an active charge.

Scott | Developer Advocate @ Shopify 

YuriS
Shopify Partner
14 0 4

Thanks for the elaborate answer. Is there a way to filter for active charges only? Or do I have to iterate through every charge object returned?

Thanks

sravans
Shopify Partner
23 1 6

 

We no longer need to "activate" the charge.

Once the merchant approves the subscription, the subscription status will automatically change from "pending" to "active" (no more "accepted" in between).

Here: https://shopify.dev/changelog/auto-activation-of-charges-and-subscriptions

Verification:

We will get the charge_id query parameter with the return url. Use this to check if the subscription is indeed active with,

GET /admin/api/2021-01/recurring_application_charges/{charge_id}.json