We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to fetch the information about canceled subscription?

Solved

How to fetch the information about canceled subscription?

attaboiaj
Shopify Partner
35 4 16
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
1972 564 567

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!

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 3 (3)

BSSCommerce-B2B
Shopify Partner
1972 564 567

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!

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

attaboiaj
Shopify Partner
35 4 16

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

BSSCommerce-B2B
Shopify Partner
1972 564 567

Glad to hear that 😁 It's my pleasure.

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now