How to test Shopify application subscription / recurring process. I am using appSubscriptionCreate for creating subscriptions and referance from This Docs. In this appSubscriptionCreate method, I pass “test”: true, but when the subscription is created that time automatically sets the subscription test as false. then what is the issue? and I attached my code with this. please check that.
const createResponse = await client.query({
data: {
"query": `mutation AppSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $returnUrl: URL!) {
appSubscriptionCreate(name: $name, returnUrl: $returnUrl, lineItems: $lineItems) {
userErrors {
field
message
}
appSubscription {
createdAt
currentPeriodEnd
id
name
returnUrl
status
test
trialDays
}
confirmationUrl
}
}`,
"variables": {
"name": MONTHLY_PLAN,
"returnUrl": "https://admin.shopify.com/store/test-app/apps/my-node-app-324/pricing",
"test": true,
"lineItems": [
{
"plan": {
"appRecurringPricingDetails": {
"price": {
"amount": billingPlan.amount,
"currencyCode": billingPlan.currencyCode
},
"interval": billingPlan.interval
}
}
}
]
},
},
});