Saltar al contenido principal

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
trialIntervalCount: Int
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 for each billing period of the trial, as a positive integer in the smallest currency unit. A trial set by trialPeriodDays or trialPeriodEnd is one billing period, charged at activation. Once the trial ends, the regular amount is charged.

CreateSubscriptionInput.currency ● Currencies enum​

Three-letter ISO 4217 currency code. Defaults to the default currency of the account, else EUR.

CreateSubscriptionInput.allowedPaymentMethods ● [SubscriptionPaymentMethods] list enum​

Payment methods the customer can use. Defaults to card. With bizum, live mode accepts only month and year intervals, and a trial is not allowed.

CreateSubscriptionInput.description ● String scalar​

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

CreateSubscriptionInput.descriptor ● String scalar​

Statement descriptor shown on the customer's bank statement. Up to 25 characters.

CreateSubscriptionInput.customer ● CustomerInput input​

Customer details.

CreateSubscriptionInput.billingDetails ● ContactDetailsInput input​

Billing details.

CreateSubscriptionInput.shippingDetails ● ContactDetailsInput input​

Shipping details.

CreateSubscriptionInput.interval ● IntervalInput enum​

Unit of the billing period. Defaults to month. minute and hour are accepted in test mode only.

CreateSubscriptionInput.intervalCount ● Int scalar​

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

CreateSubscriptionInput.trialPeriodDays ● Int scalar​

Number of days the trial period lasts. Ignored when trialPeriodEnd is set. The trial cannot end more than 5 years from now.

CreateSubscriptionInput.trialPeriodEnd ● AWSTimestamp scalar​

The end date of the trial period. Measured in seconds since the Unix epoch. Must be in the future and not more than 5 years from now. Takes precedence over trialPeriodDays.

CreateSubscriptionInput.trialIntervalCount ● Int scalar​

Number of billing periods charged at trialAmount before the regular amount applies, from 1 to 31. Requires trialAmount; cannot be combined with trialPeriodDays or trialPeriodEnd.

CreateSubscriptionInput.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.

CreateSubscriptionInput.paymentCallbackUrl ● String scalar​

Callback URL set on each payment the subscription creates: the activation payment, renewals and proration charges. It receives the payment object.

CreateSubscriptionInput.storeId ● ID scalar​

Related store ID. A caller restricted to a store always creates the subscription in that store. A caller restricted to a point of sale always creates it for that point of sale, in the store of the point of sale.

CreateSubscriptionInput.retrySchedule ● [RetryScheduleInput!] list input​

Defines a custom schedule for retrying failed subscription payments. Total retry duration must not exceed one billing period. Without it, the default schedule makes 3 retries.

CreateSubscriptionInput.metadata ● [KeyValueInput!] list input​

A set of key-value pairs attached to the subscription. A key has up to 50 characters, and a value up to 500.

Member Of​

createSubscription mutation