A place to discuss charging merchants for your apps and services using the billing API.
Hi,
Currently I'm developing a Shopify app with two plans: Free Plan and a paid plan.
The default plan will be free and there will be various limitations for the free plan. Therefore I need to keep track of the subscription start and end dates (in order to calculate the actions taken by the merchant between those dates). I am trying to create a free subscription plan with the following graphQL mutation.
const variables =
{
"lineItems": {
"plan": {
"appRecurringPricingDetails": {
"price": {
"amount": "0",
"currencyCode": "USD"
},
"interval": "EVERY_30_DAYS"
},
}
},
"name": "Free Subscription Plan",
"returnUrl": "myreturnURL",
"test": true,
}
const query = `
mutation appSubscriptionCreate($lineItems: [AppSubscriptionLineItemInput!]!, $name: String!, $returnUrl: URL!, $test: Boolean) {
appSubscriptionCreate(lineItems: $lineItems, name: $name, returnUrl: $returnUrl, test: $test) {
userErrors {
field
message
}
appSubscription {
createdAt
id
name
lineItems{
id
plan{
pricingDetails
}
}
returnUrl
status
currentPeriodEnd
}
confirmationUrl
}
}
`
Yet I get the following response.
Having the same problem here. Could you find any solutions?