Hello, I would like to use this post to report our findings and the issues encountered while integrating managed app pricing with our app.
- Incorrect object structure returned for billing
We were able to replicate this once during the first charge created for this app. All subsequent charges or plan changes were unaffected, and we were unable to reproduce it again. The issue was that billing.check() returned an object with an incorrect structure, differing from both a) subsequent results and b) TypeScript types defined in @shopify/shopify-api. This was the structure observed for the first plan charge:
{
hasActivePayment: true,
oneTimePurchases: [],
appSubscriptions: [
{
id: "gid://shopify/AppSubscription/4242234365767624",
name: "Starter",
test: true,
status: "ACTIVE",
lineItems: [
{
id: "323322?V=1&index=0",
plan: {
pricingDetails: {
pricing: {
interval: "EVERY_30_DAYS",
discount: null,
amount: "11.0",
currencyCode: "USD",
},
},
},
},
],
},
],
};
The problem is that interval and discount were located inside the pricing object, whereas in the type and all subsequent invocations (after changing the plan) had the correct structure, with these fields under pricingDetails.
-
Type mismatch for the
amountfield between types in the@shopify/shopify-apipackage and the actual values returned:amountis typed as anumberbut appears as a string in the response. -
It is unclear how to test an expired subscription and/or understand how the
lineItemswould change in the case of a failed or expired payment. Additionally, the role ofhasActivePaymentis unclear — does it reflect an active payment method (e.g., an expired card) or just the subscription status? What about thestatusfield? -
Currently, the only way for a store to cancel an app subscription with managed pricing is by uninstalling the app. Will this be an issue during app submission/review? We would like to follow best practices and integrate with the new managed pricing approach, but this scenario is not mentioned anywhere in the docs.
We would appreciate it if someone from the Shopify team could clarify these points and flag type/object mismatches to the development team.