# 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

  customerId: ID

  customer: Customer

  billingDetails: ContactDetails

  shippingDetails: ContactDetails

  sequenceId: ID

  lastOrderId: ID

  lastPayment: LastPayment

  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[​](#fields "Direct link to Fields")

#### [`Subscription.id`](#id) ● [`ID!`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) non-null scalar[​](#id "Direct link to id")

Unique identifier for the subscription.

#### [`Subscription.accountId`](#account-id) ● [`ID!`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) non-null scalar[​](#account-id "Direct link to account-id")

MONEI account identifier.

#### [`Subscription.livemode`](#livemode) ● [`Boolean!`](https://docs.monei.com/apis/graphql/types/scalars/boolean/.md) non-null scalar[​](#livemode "Direct link to livemode")

Whether the subscription was created in live mode (`true`) or test mode (`false`).

#### [`Subscription.amount`](#amount) ● [`Int!`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) non-null scalar[​](#amount "Direct link to amount")

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

#### [`Subscription.trialAmount`](#trial-amount) ● [`Int`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) scalar[​](#trial-amount "Direct link to trial-amount")

Amount charged during the trial period in minor units. `null`/`0` means free trial.

#### [`Subscription.currency`](#currency) ● [`Currencies`](https://docs.monei.com/apis/graphql/types/enums/currencies/.md) enum[​](#currency "Direct link to currency")

Three-letter ISO 4217 currency code.

#### [`Subscription.allowedPaymentMethods`](#allowed-payment-methods) ● [`[SubscriptionPaymentMethods]`](https://docs.monei.com/apis/graphql/types/enums/subscription-payment-methods/.md) list enum[​](#allowed-payment-methods "Direct link to allowed-payment-methods")

List of payment methods allowed for subscriptions.

#### [`Subscription.description`](#description) ● [`String`](https://docs.monei.com/apis/graphql/types/scalars/string/.md) scalar[​](#description "Direct link to description")

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

#### [`Subscription.descriptor`](#descriptor) ● [`String`](https://docs.monei.com/apis/graphql/types/scalars/string/.md) scalar[​](#descriptor "Direct link to descriptor")

Statement descriptor shown on the customer's bank statement.

#### [`Subscription.cancelAtPeriodEnd`](#cancel-at-period-end) ● [`Boolean`](https://docs.monei.com/apis/graphql/types/scalars/boolean/.md) scalar[​](#cancel-at-period-end "Direct link to cancel-at-period-end")

If true, the subscription will be canceled at the end of the current period.

#### [`Subscription.pauseIntervalCount`](#pause-interval-count) ● [`Int`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) scalar[​](#pause-interval-count "Direct link to pause-interval-count")

Number of intervals when subscription will be paused before it activates again.

#### [`Subscription.pauseAtPeriodEnd`](#pause-at-period-end) ● [`Boolean`](https://docs.monei.com/apis/graphql/types/scalars/boolean/.md) scalar[​](#pause-at-period-end "Direct link to pause-at-period-end")

If true, the subscription will be paused at the end of the current period.

#### [`Subscription.skipIntervalCount`](#skip-interval-count) ● [`Int`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) scalar[​](#skip-interval-count "Direct link to skip-interval-count")

The number of intervals during which the subscription billing cycle will be skipped without altering the subscription status. Useful when payment for a specific period is received through different methods.

#### [`Subscription.currentPeriodStart`](#current-period-start) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#current-period-start "Direct link to current-period-start")

The start date of the current subscription period. Measured in seconds since the Unix epoch.

#### [`Subscription.currentPeriodEnd`](#current-period-end) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#current-period-end "Direct link to current-period-end")

The end date of the current subscription period. Measured in seconds since the Unix epoch.

#### [`Subscription.trialPeriodDays`](#trial-period-days) ● [`Int`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) scalar[​](#trial-period-days "Direct link to trial-period-days")

Number of days the trial period lasts.

#### [`Subscription.trialPeriodEnd`](#trial-period-end) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#trial-period-end "Direct link to trial-period-end")

The end date of the trial period. Measured in seconds since the Unix epoch.

#### [`Subscription.customerId`](#customer-id) ● [`ID`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) scalar[​](#customer-id "Direct link to customer-id")

Customer identifier associated with the subscription.

#### [`Subscription.customer`](#customer) ● [`Customer`](https://docs.monei.com/apis/graphql/types/objects/customer/.md) object[​](#customer "Direct link to customer")

Customer details.

#### [`Subscription.billingDetails`](#billing-details) ● [`ContactDetails`](https://docs.monei.com/apis/graphql/types/objects/contact-details/.md) object[​](#billing-details "Direct link to billing-details")

Billing details.

#### [`Subscription.shippingDetails`](#shipping-details) ● [`ContactDetails`](https://docs.monei.com/apis/graphql/types/objects/contact-details/.md) object[​](#shipping-details "Direct link to shipping-details")

Shipping details.

#### [`Subscription.sequenceId`](#sequence-id) ● [`ID`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) scalar[​](#sequence-id "Direct link to sequence-id")

A unique identifier representing a series of subsequent recurring payments.

#### [`Subscription.lastOrderId`](#last-order-id) ● [`ID`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) scalar[​](#last-order-id "Direct link to last-order-id")

An order ID created by your system that is attached to the last subscription payment.

#### [`Subscription.lastPayment`](#last-payment) ● [`LastPayment`](https://docs.monei.com/apis/graphql/types/objects/last-payment/.md) object[​](#last-payment "Direct link to last-payment")

Details of the last payment for the subscription.

#### [`Subscription.paymentMethod`](#payment-method) ● [`PaymentMethod`](https://docs.monei.com/apis/graphql/types/objects/payment-method/.md) object[​](#payment-method "Direct link to payment-method")

Details about the payment method at the time of the transaction.

#### [`Subscription.nextPaymentAt`](#next-payment-at) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#next-payment-at "Direct link to next-payment-at")

The date when the next payment will be made.

#### [`Subscription.createdAt`](#created-at) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#created-at "Direct link to created-at")

Time at which the subscription was created. Measured in seconds since the Unix epoch.

#### [`Subscription.updatedAt`](#updated-at) ● [`AWSTimestamp`](https://docs.monei.com/apis/graphql/types/scalars/awstimestamp/.md) scalar[​](#updated-at "Direct link to updated-at")

Time at which the subscription was last updated. Measured in seconds since the Unix epoch.

#### [`Subscription.interval`](#interval) ● [`Interval!`](https://docs.monei.com/apis/graphql/types/enums/interval/.md) non-null enum[​](#interval "Direct link to interval")

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

#### [`Subscription.intervalCount`](#interval-count) ● [`Int!`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) non-null scalar[​](#interval-count "Direct link to interval-count")

Number of intervals between subscription payments.

#### [`Subscription.retryCount`](#retry-count) ● [`Int`](https://docs.monei.com/apis/graphql/types/scalars/int/.md) scalar[​](#retry-count "Direct link to retry-count")

Number of retries left for the subscription.

#### [`Subscription.status`](#status) ● [`SubscriptionStatus!`](https://docs.monei.com/apis/graphql/types/enums/subscription-status/.md) non-null enum[​](#status "Direct link to status")

The status of the subscription.

#### [`Subscription.sessionDetails`](#session-details) ● [`SessionDetails`](https://docs.monei.com/apis/graphql/types/objects/session-details/.md) object[​](#session-details "Direct link to session-details")

Browser/device fingerprint captured at activation.

#### [`Subscription.traceDetails`](#trace-details) ● [`TraceDetails`](https://docs.monei.com/apis/graphql/types/objects/trace-details/.md) object[​](#trace-details "Direct link to trace-details")

Tracing details of the action that created or modified the subscription.

#### [`Subscription.callbackUrl`](#callback-url) ● [`String`](https://docs.monei.com/apis/graphql/types/scalars/string/.md) scalar[​](#callback-url "Direct link to callback-url")

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

#### [`Subscription.paymentCallbackUrl`](#payment-callback-url) ● [`String`](https://docs.monei.com/apis/graphql/types/scalars/string/.md) scalar[​](#payment-callback-url "Direct link to payment-callback-url")

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

#### [`Subscription.storeId`](#store-id) ● [`ID`](https://docs.monei.com/apis/graphql/types/scalars/id/.md) scalar[​](#store-id "Direct link to store-id")

Related store ID.

#### [`Subscription.retrySchedule`](#retry-schedule) ● [`[RetrySchedule!]`](https://docs.monei.com/apis/graphql/types/objects/retry-schedule/.md) list object[​](#retry-schedule "Direct link to retry-schedule")

Defines a custom schedule for retrying failed subscription payments. If not specified, the system's default retry schedule will be used.

#### [`Subscription.metadata`](#metadata) ● [`[KeyValueItem!]`](https://docs.monei.com/apis/graphql/types/objects/key-value-item/.md) list object[​](#metadata "Direct link to metadata")

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

### Returned By[​](#returned-by "Direct link to Returned By")

[`cancelSubscription`](https://docs.monei.com/apis/graphql/operations/mutations/cancel-subscription/.md) mutation ● [`createSubscription`](https://docs.monei.com/apis/graphql/operations/mutations/create-subscription/.md) mutation ● [`pauseSubscription`](https://docs.monei.com/apis/graphql/operations/mutations/pause-subscription/.md) mutation ● [`resumeSubscription`](https://docs.monei.com/apis/graphql/operations/mutations/resume-subscription/.md) mutation ● [`sendSubscriptionLink`](https://docs.monei.com/apis/graphql/operations/mutations/send-subscription-link/.md) mutation ● [`sendSubscriptionStatus`](https://docs.monei.com/apis/graphql/operations/mutations/send-subscription-status/.md) mutation ● [`subscription`](https://docs.monei.com/apis/graphql/operations/queries/subscription/.md) query ● [`updateSubscription`](https://docs.monei.com/apis/graphql/operations/mutations/update-subscription/.md) mutation

### Member Of[​](#member-of "Direct link to Member Of")

[`SubscriptionsConnection`](https://docs.monei.com/apis/graphql/types/objects/subscriptions-connection/.md) object
