What's your biggest current challenge? Have your say in Community Polls along the right column.

How to fetch the information about canceled subscription?

Solved

How to fetch the information about canceled subscription?

attaboiaj
Shopify Partner
30 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
1969 564 566

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
1969 564 566

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
30 4 16

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

BSSCommerce-B2B
Shopify Partner
1969 564 566

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