In Graphql Billing API when making the request to create a subscription mutation
appSubscriptionCreate
fields of:
test, trialDays
are not processed:
Example:
Request:
GRAPHQL {{shopify_API_shop_admin_domain}}{{shopify_API_version}}{{shopify_API_graphQL_entrypoint}}
Content-Type: application/json
X-Shopify-Access-Token: {{shopify-access-token}}
mutation appSubscriptionCreate($lineItems: [AppSubscriptionLineItemInput!]!, $name: String!, $returnUrl: URL!) {
appSubscriptionCreate(lineItems: $lineItems, name: $name, returnUrl: $returnUrl) {
appSubscription {
id
name
test
trialDays
returnUrl
}
confirmationUrl
userErrors {
field
message
}
}
}
{
"test": true,
"trialDays": 14,
"lineItems": {
"plan": {
"appRecurringPricingDetails": {
"interval": "EVERY_30_DAYS",
"price": {
"amount": 8.00,
"currencyCode": "USD"
}
}
}
},
"name": "MY AWESOME PLAN",
"returnUrl": "https://shop-domain.myshopify.com/admin/apps/my-app"
}
Response:
{
"data": {
"appSubscriptionCreate": {
"appSubscription": {
"id": "gid:\/\/shopify\/AppSubscription\/25893175455",
"name": "MY AWESOME PLAN",
"test": false,
"trialDays": 0,
"returnUrl": "https:\/\/shop-domain.myshopify.com\/admin\/apps\/my-app"
},
"confirmationUrl": "https:\/\/theoptishop.myshopify.com\/admin\/charges\/6702869\/25893175455\/RecurringApplicationCharge\/confirm_recurring_application_charge?signature=BAh7BzoHaWRsKwifgFoHBgA6EmF1dG9fYWN0aXZhdGVU--24baf5d062ada47f14da4d1c1d161bc0803c5a9b",
"userErrors": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 990,
"restoreRate": 50.0
}
}
}
}