Skip to main content
GET
cURL
Anti-Polling Warning: Avoid polling this endpoint; use webhooks for real-time updates. See Anti-Polling Policy.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

subscriptionId
string
required

Unique identifier of the subscription

Example:

"sub_fooBOwYsaK50AEfK"

Response

Successful response with subscription details

subscriptionId
string

Unique identifier of the subscription

Example:

"sub_fooBOwYsaK50AEfK"

interval
enum<string>

The interval group between subscriptions.

Available options:
DAY,
WEEK,
MONTH,
YEAR
Example:

"MONTH"

intervalCount
integer<int64>

The number of intervals between subscription billings. For example, interval = MONTH and intervalCount = 3 bills every 3 months.

Example:

2

cycleCount
integer<int64>

The number of billing cycles for which the subscription will renew before ending. The first cycle is included in this count.

Example:

2

remainingCycleCount
integer<int64>

The number of billing cycles remaining for the subscription.

Example:

2

currency
string

Three-letter currency code

Example:

"USD"

amount
integer<int64>

The amount in lowest count unit (e.g., cents for USD)

Example:

100

presentmentCurrency
string

The currency that the customer paid in

Example:

"USD"

createdAt
string<date-time>

Timestamp of when the subscription was created

Example:

"2024-09-26T10:41:50.472+00:00"

status
string

The status of the subscription. Refer subscription statuses

Example:

"CREATED"

upfrontAmount
integer<int64>

The amount charged to the customer at the time the subscription was activated. This replaces the first billing cycle charge; regular billing resumes from the next cycle.

Example:

200

trialPeriodCount
integer<int64>

The number of trial periods before the first billing cycle.

Example:

7

trialPeriodInterval
enum<string>

The interval for the trial period.

Available options:
DAY,
WEEK,
MONTH,
YEAR
Example:

"DAY"

metadata
object

A collection of key-value pairs that can be attached to an object for storing additional structured information. This is useful for capturing custom data or context-specific attributes.

Constraints:

  • Maximum of 50 key-value pairs allowed.
  • Each key must be no longer than 40 characters.
  • Each value must be a string and cannot exceed 500 characters.
Example:

The URL to redirect the customer to the xPay payment gateway for updating the payment method. Available only for subscriptions in TRIALING, ACTIVE, or UNPAID status.

Example:

"https://pay.xpaycheckout.com/subscription/update?subscription_id=sub_123"

paymentMetadata
object

Payment metadata for the subscription, including the payment method and card details if applicable