Skip to content

Instantly share code, notes, and snippets.

@ardeearam
Last active July 13, 2020 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ardeearam/fedcb5cafcb49bf13738c600ee4a37ac to your computer and use it in GitHub Desktop.
Save ardeearam/fedcb5cafcb49bf13738c600ee4a37ac to your computer and use it in GitHub Desktop.
Modify subscription price and frequency
export function RECURRING_CREATE(url) {
return gql`
mutation {
appSubscriptionCreate(
name: "Super Duper Plan"
returnUrl: "${url}"
test: true,
trialDays: 7,
lineItems: [
{
plan: {
appRecurringPricingDetails: {
price: { amount: 10, currencyCode: USD }
}
}
}
]
) {
userErrors {
field
message
}
confirmationUrl
appSubscription {
id
}
}
}`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment