app Subscription Create
Creates a recurring or usage-based that charges merchants for app features and services. The subscription includes one or more objects that define the pricing structure, billing intervals, and optional values.
Returns a confirmation URL where the merchant approves or declines the charges. After approval, the subscription becomes active and billing begins after any trial period expires. You can specify to control how this subscription interacts with existing active subscriptions.
Learn more about creating app subscriptions.
Arguments
- lineItems ([AppSubscriptionLineItemInput!]!)
- name (String!)
- replacementBehavior (AppSubscriptionReplacementBehavior)
- returnUrl (URL!)
- test (Boolean)
- trialDays (Int)
- Anchor to lineItemsline•[App
Items Subscription Line Item Input!]! required Attaches one or more pricing plans to an app subscription. Only one pricing plan can be defined for each available type.
- Anchor to namename•String!required
A descriptive name for the app subscription.
- Anchor to replacementBehaviorreplacement•App
Behavior Subscription Replacement Behavior Default:STANDARD The replacement behavior when creating an app subscription for a merchant with an already existing app subscription.
- Anchor to returnUrlreturn•URL!
Url required The URL pointing to the page where the merchant is redirected after approving the app subscription.
- Anchor to testtest•BooleanDefault:false
Whether the app subscription is a test transaction.
- Anchor to trialDaystrial•Int
Days The number of days of the free trial period, beginning on the day that the merchant approves the app charges.
- appSubscription (AppSubscription)
- confirmationUrl (URL)
- userErrors ([UserError!]!)
- Anchor to appSubscriptionapp•App
Subscription Subscription The newly-created app subscription.
- Anchor to confirmationUrlconfirmation•URL
Url The URL pointing to the page where the merchant approves or declines the charges for an app subscription.
- Anchor to userErrorsuser•[User
Errors Error!]! non-null The list of errors that occurred from executing the mutation.