Subscription
Recurring subscription billing a customer on a fixed cadence.
type Subscription {
id: ID!
accountId: ID!
livemode: Boolean!
amount: Int!
trialAmount: Int
currency: Currencies
allowedPaymentMethods: [SubscriptionPaymentMethods]
description: String
descriptor: String
cancelAtPeriodEnd: Boolean
pauseIntervalCount: Int
pauseAtPeriodEnd: Boolean
skipIntervalCount: Int
currentPeriodStart: AWSTimestamp
currentPeriodEnd: AWSTimestamp
trialPeriodDays: Int
trialPeriodEnd: AWSTimestamp
trialIntervalCount: Int
customerId: ID
customer: Customer
billingDetails: ContactDetails
shippingDetails: ContactDetails
sequenceId: ID
lastOrderId: ID
lastPayment: LastPayment
lastProrationAt: AWSTimestamp
lastProration: LastProration
paymentMethod: PaymentMethod
nextPaymentAt: AWSTimestamp
createdAt: AWSTimestamp
updatedAt: AWSTimestamp
interval: Interval!
intervalCount: Int!
retryCount: Int
status: SubscriptionStatus!
sessionDetails: SessionDetails
traceDetails: TraceDetails
callbackUrl: String
paymentCallbackUrl: String
storeId: ID
retrySchedule: [RetrySchedule!]
metadata: [KeyValueItem!]
}
Fields
Subscription.id ● ID! non-null scalar
Unique identifier for the subscription.
Subscription.accountId ● ID! non-null scalar
MONEI account identifier.
Subscription.livemode ● Boolean! non-null scalar
Whether the subscription was created in live mode (true) or test mode (false).
Subscription.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).
Subscription.trialAmount ● Int scalar
Amount charged for each billing period of the trial, as a positive integer in the smallest currency unit. A trial set by days or by end date is one billing period, charged at activation. Once the trial ends, the regular amount is charged.
Subscription.currency ● Currencies enum
Three-letter ISO 4217 currency code.
Subscription.allowedPaymentMethods ● [SubscriptionPaymentMethods] list enum
List of payment methods allowed for subscriptions.
Subscription.description ● String scalar
An arbitrary string attached to the subscription. Often useful for displaying to users. Each renewal payment uses it as its description, followed by the order ID.
Subscription.descriptor ● String scalar
Statement descriptor shown on the customer's bank statement. Up to 25 characters.
Subscription.cancelAtPeriodEnd ● Boolean scalar
If true, the subscription will be canceled at the end of the current period.
Subscription.pauseIntervalCount ● Int scalar
Number of billing periods left to skip while the subscription is paused. It goes down by one at each skipped payment. After the last one, the subscription becomes ACTIVE again.
Subscription.pauseAtPeriodEnd ● Boolean scalar
If true, the subscription will be paused at the end of the current period.
Subscription.skipIntervalCount ● Int scalar
Number of upcoming payments to skip. The status does not change. It goes down by one at each skipped payment. Useful when payment for a specific period is received through different methods. The dashboard shows it as "Payments to skip".
Subscription.currentPeriodStart ● AWSTimestamp scalar
The start date of the current subscription period. Measured in seconds since the Unix epoch.
Subscription.currentPeriodEnd ● AWSTimestamp scalar
The end date of the current subscription period. Measured in seconds since the Unix epoch.
Subscription.trialPeriodDays ● Int scalar
Number of days the trial period lasts.
Subscription.trialPeriodEnd ● AWSTimestamp scalar
The end date of the trial period. Measured in seconds since the Unix epoch.
Subscription.trialIntervalCount ● Int scalar
Number of trial billing periods left, counting the current one. Each period is charged at trialAmount. It goes down by one after each renewal payment in the trial, and is removed when the trial ends.
Subscription.customerId ● ID scalar
ID of the saved customer linked to the subscription.
Subscription.customer ● Customer object
Customer details.
Subscription.billingDetails ● ContactDetails object
Billing details.
Subscription.shippingDetails ● ContactDetails object
Shipping details.
Subscription.sequenceId ● ID scalar
ID of the first payment of the recurring sequence. Renewal payments charge the payment method of this sequence. An activation that changes the payment method replaces it.
Subscription.lastOrderId ● ID scalar
Order ID of the last activation or renewal payment. MONEI generates it.
Subscription.lastPayment ● LastPayment object
The last activation or renewal payment, including a failed one. A proration charge does not change it.
Subscription.lastProrationAt ● AWSTimestamp scalar
Time of the most recent prorated change. Measured in seconds since the Unix epoch. A billing period that an earlier change resized, by a moved nextPaymentAt or an interval change, cannot be prorated again until the next renewal.
Subscription.lastProration ● LastProration object
Amounts settled by the most recent prorated change.
Subscription.paymentMethod ● PaymentMethod object
Payment method of the last payment. Renewal payments use it.
Subscription.nextPaymentAt ● AWSTimestamp scalar
When the next payment will be made. While PAST_DUE, the time of the next retry. Null when no payment is scheduled, for example after a cancellation at period end is scheduled. Measured in seconds since the Unix epoch.
Subscription.createdAt ● AWSTimestamp scalar
Time at which the subscription was created. Measured in seconds since the Unix epoch.
Subscription.updatedAt ● AWSTimestamp scalar
Time at which the subscription was last updated. Measured in seconds since the Unix epoch.
Subscription.interval ● Interval! non-null enum
Unit of the billing period. The period is intervalCount of this unit.
Subscription.intervalCount ● Int! non-null scalar
Number of intervals between subscription payments.
Subscription.retryCount ● Int scalar
Number of retries scheduled so far for a failed payment. A successful payment clears it.
Subscription.status ● SubscriptionStatus! non-null enum
The status of the subscription.
Subscription.sessionDetails ● SessionDetails object
Browser session of the customer during the latest activation payment, including the IP address and the device fingerprint.
Subscription.traceDetails ● TraceDetails object
Tracing details of the action that created or modified the subscription.
Subscription.callbackUrl ● String scalar
URL that receives a POST request with the subscription object each time the status changes or a payment retry is scheduled. The request carries a MONEI-Signature header.
Subscription.paymentCallbackUrl ● String scalar
Callback URL set on each payment the subscription creates: the activation payment, renewals and proration charges. It receives the payment object.
Subscription.storeId ● ID scalar
Related store ID.
Subscription.retrySchedule ● [RetrySchedule!] list object
Defines a custom schedule for retrying failed subscription payments. Each entry is the wait before the next retry, counted from the previous attempt. When the last retry fails, the subscription is canceled. Without it, the default schedule makes 3 retries, with waits of 1, 5 and 9 days. The waits are 1, 2 and 3 hours for a subscription billed by the day, 5, 10 and 15 minutes by the hour, and 1, 5 and 9 minutes by the minute.
Subscription.metadata ● [KeyValueItem!] list object
A set of key-value pairs attached to the subscription.
Returned By
cancelSubscription mutation ● createSubscription mutation ● pauseSubscription mutation ● resumeSubscription mutation ● sendSubscriptionLink mutation ● sendSubscriptionStatus mutation ● subscription query ● updateSubscription mutation
Member Of
SubscriptionsConnection object