Skip to main content

CreateSubscriptionInput

Input for createSubscription.

input CreateSubscriptionInput {
amount: Int!
trialAmount: Int
currency: Currencies
allowedPaymentMethods: [SubscriptionPaymentMethods]
description: String
descriptor: String
customer: CustomerInput
billingDetails: ContactDetailsInput
shippingDetails: ContactDetailsInput
interval: IntervalInput
intervalCount: Int
trialPeriodDays: Int
trialPeriodEnd: AWSTimestamp
callbackUrl: String
paymentCallbackUrl: String
storeId: ID
retrySchedule: [RetryScheduleInput!]
metadata: [KeyValueInput!]
}

Fields

CreateSubscriptionInput.amount ● Int! non-null scalar

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge 1.00 USD).

CreateSubscriptionInput.trialAmount ● Int scalar

Amount charged during the trial period in minor units. Use 0 for a free trial.

CreateSubscriptionInput.currency ● Currencies enum

Three-letter ISO 4217 currency code.

CreateSubscriptionInput.allowedPaymentMethods ● [SubscriptionPaymentMethods] list enum

List of payment methods allowed for subscriptions.

CreateSubscriptionInput.description ● String scalar

An arbitrary string attached to the subscription. Often useful for displaying to users.

CreateSubscriptionInput.descriptor ● String scalar

Statement descriptor shown on the customer's bank statement.

CreateSubscriptionInput.customer ● CustomerInput input

Customer details.

CreateSubscriptionInput.billingDetails ● ContactDetailsInput input

Billing details.

CreateSubscriptionInput.shippingDetails ● ContactDetailsInput input

Shipping details.

CreateSubscriptionInput.interval ● IntervalInput enum

Subscription interval. The minute and hour intervals are only available in test mode.

CreateSubscriptionInput.intervalCount ● Int scalar

Number of intervals between subscription payments. Total period (interval × intervalCount) cannot exceed one year.

CreateSubscriptionInput.trialPeriodDays ● Int scalar

Number of days the trial period lasts. Mutually exclusive with trialPeriodEnd.

CreateSubscriptionInput.trialPeriodEnd ● AWSTimestamp scalar

The end date of the trial period. Measured in seconds since the Unix epoch. Mutually exclusive with trialPeriodDays.

CreateSubscriptionInput.callbackUrl ● String scalar

The URL will be called each time subscription status changes. You will receive a subscription object in the body of the request.

CreateSubscriptionInput.paymentCallbackUrl ● String scalar

The URL will be called each time subscription creates a new payment. You will receive the payment object in the body of the request.

CreateSubscriptionInput.storeId ● ID scalar

Related store ID.

CreateSubscriptionInput.retrySchedule ● [RetryScheduleInput!] list input

Defines a custom schedule for retrying failed subscription payments. Total retry duration must not exceed one billing period.

CreateSubscriptionInput.metadata ● [KeyValueInput!] list input

A set of key-value pairs attached to the subscription.

Member Of

createSubscription mutation