Last active
July 13, 2020 04:10
-
-
Save ardeearam/fedcb5cafcb49bf13738c600ee4a37ac to your computer and use it in GitHub Desktop.
Modify subscription price and frequency
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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