v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Subscription

Create a subscription offer

Creates a new subscription offer

post/subscription/offer

Request body

namestring required

The name of the subscription offer

descriptionstring required

The description of the subscription offer

currency'EUR' | 'USD' required

The currency for the subscription offer

amountInCentsnumber required

The amount in cents for the subscription offer

entryFeesInCentsnumber

Optional entry fees in cents for the first payment. If set, the first payment will be entryFeesInCents, and subsequent recurring payments will be amountInCents. If not set, all payments will be amountInCents.

interval'day' | 'week' | 'month' | 'year' required

The billing interval for the subscription

intervalCountnumber required

The number of intervals between billing cycles. Maximum depends on the selected interval: day up to 365, week up to 52, month up to 12, year up to 3.

cycleCountnumber

The number of cycles the customer will be billed for, if cycleCount is 12 for example if the interval is month and intervalCount is 1, the customer will be billed for 12 months and the subscription will be cancelled after 12 months

trialPeriodDaysnumber

Trial period length in days for subscriptions created from this offer.

statementDescriptorstring

Optional statement descriptor (max 11 characters) shown on the customer's bank statement as 'INFLOWPAY* <descriptor>'. Falls back to the account-level statement descriptor if omitted.

successUrlstring

The URL to redirect to after successful subscription first payment. This will be used as default for all subscriptions from this offer.

cancelUrlstring

The URL to redirect to after failed/cancelled subscription first payment. This will be used as default for all subscriptions from this offer.

Example request

{
  "name": "Premium Plan",
  "description": "Access to premium features",
  "currency": "EUR",
  "amountInCents": 2999,
  "entryFeesInCents": 2000,
  "interval": "month",
  "intervalCount": 1,
  "cycleCount": 12,
  "trialPeriodDays": 14,
  "sessionCustomization": {
    "bgColor": "#ffffff",
    "fontColor": "#000000"
  },
  "statementDescriptor": "MY BRAND",
  "successUrl": "https://yoursite.com/subscription/success",
  "cancelUrl": "https://yoursite.com/subscription/cancel"
}

Response

Create a subscription offer successful

idstring required

Unique identifier of the subscription offer

namestring required

Name of the subscription offer

descriptionstring required

Description of the subscription offer

amountInCentsnumber required

Amount in cents (e.g., 2999 = €29.99)

currency'EUR' | 'GBP' | 'USD' required

Currency for the subscription

interval'day' | 'week' | 'month' | 'year' required

Billing interval

intervalCountnumber required

Number of intervals between each billing

isArchivedboolean required

Whether the subscription offer is archived

waitlistEnabledboolean

Whether the subscription offer is using the waitlist flow (capture later).

userIdstring required

User ID who created the subscription offer

createdAtstring date-time required

Creation timestamp

updatedAtstring date-time required

Last update timestamp

trialPeriodDaysnumber nullable

Trial period length in days. If present and >0, subscription is currently in free trial until creation date + trialPeriodDays.

Example response

{
  "id": "sub_offer_1234567890abcdef",
  "name": "Premium Plan",
  "description": "Premium subscription with advanced features",
  "amountInCents": 2999,
  "currency": "EUR",
  "interval": "month",
  "intervalCount": 1,
  "waitlistEnabled": true,
  "userId": "user_1234567890abcdef",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-01T00:00:00.000Z",
  "trialPeriodDays": 14
}