How to fetch the information about canceled subscription?

Solved

How to fetch the information about canceled subscription?

attaboiaj
Shopify Partner
22 4 5
Billing API only returns Active Subscription.

const
billingCheck = await billing.check({
    plans: [MONTHLY_PLAN, ANNUAL_PLAN],
    isTest: true,
  });
 
Returns
 

{ "hasActivePayment": true, "oneTimePurchases": [], "appSubscriptions": [ { "id": "gid://shopify/AppSubscription/xxxxx", "name": "Annual subscription", "test": true, "lineItems": [ { "id": "gid://shopify/AppSubscriptionLineItem/xxxxx?v=1&index=0", "plan": { "pricingDetails": { "price": { "amount": "19.0", "currencyCode": "USD" }, "interval": "ANNUAL", "discount": null } } } ] } ] }

So what if my customer cancel there subscription before the month/year ends but I still want to give them pro features till the month/year ends.

and this `check Billing API` returns no information about canceled Subscription 

how I get that info and update my UI

do I have to save information in my OWN database and write logics?


Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
565 114 137

This is an accepted solution.

Hi @attaboiaj

 

If I was right, you are using the Billing API of Shopify App Remix. You should try Admin REST API to get ALL recurring charges.

Here are the docs: 

1. Shopify App Remix doc https://shopify.dev/docs/api/shopify-app-remix/v3/apis/admin-api#example-rest

2. REST API doc https://shopify.dev/docs/api/admin-rest/2024-04/resources/recurringapplicationcharge

 

Hope you solve the issue soon!

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


B2B Solution & Custom Pricing |BSS: B2B Portal, Quote, Net 30 | BSS: B2B Login Lock Hide Price


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 3 (3)

BSSCommerce-B2B
Shopify Partner
565 114 137

This is an accepted solution.

Hi @attaboiaj

 

If I was right, you are using the Billing API of Shopify App Remix. You should try Admin REST API to get ALL recurring charges.

Here are the docs: 

1. Shopify App Remix doc https://shopify.dev/docs/api/shopify-app-remix/v3/apis/admin-api#example-rest

2. REST API doc https://shopify.dev/docs/api/admin-rest/2024-04/resources/recurringapplicationcharge

 

Hope you solve the issue soon!

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


B2B Solution & Custom Pricing |BSS: B2B Portal, Quote, Net 30 | BSS: B2B Login Lock Hide Price


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
attaboiaj
Shopify Partner
22 4 5

Thanks a lot I am looking for this. you saved my a..

BSSCommerce-B2B
Shopify Partner
565 114 137

Glad to hear that 😁 It's my pleasure.

If our suggestions are useful, please let us know by giving it a like, marking it as a solution.


B2B Solution & Custom Pricing |BSS: B2B Portal, Quote, Net 30 | BSS: B2B Login Lock Hide Price


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency