v1

latestOpenAPI 3.0.02026-07-24103118224.7 KB
Subscription

Get subscription details by ID

Retrieves details of a specific subscription by ID

get/subscription/{id}

Path parameters

idstring required
Example:id_1234567890abcdef

Unique identifier of the subscription

Response

Get subscription details by ID successful

idstring required

The unique identifier of the subscription

namestring required

The name of the subscription

descriptionstring required

The description of the subscription

amountInCentsnumber required

The amount in cents for the subscription

currencystring required

The currency of the subscription

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

The billing interval

intervalCountnumber required

The billing interval count

cycleCountnumber

The cycle count

trialPeriodDaysnumber nullable

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

status'INITIATION' | 'ACTIVE' | 'TRIAL' | 'PAST_DUE' | 'UNPAID' | 'INACTIVE' | 'PENDING_CANCELLATION' | 'CANCELED' required

The status of the subscription

userIdstring required

The user ID who owns the subscription

subscriptionOfferIdstring nullable required

The subscription offer ID

metadatasobject

Optional custom metadata for the subscription

successUrlstring nullable

The success URL for subscription first payment

cancelUrlstring nullable

The cancel URL for subscription first payment

unsubscribeTokenstring nullable

Token to unsubscribe from the subscription

trialEndDatestring date-time nullable

Date of the end of the free trial period

createdAtstring date-time required

The creation date

updatedAtstring date-time required

The last update date

Example response

{
  "trialPeriodDays": 14
}