GET
/
subscription
/
get-subscription
/
{subscriptionId}
curl --request GET \
  --url https://api.xpaycheckout.com/subscription/get-subscription/{subscriptionId} \
  --header 'Authorization: Basic <encoded-value>'
{
  "subscriptionId": "66f53a6e2097773e4f0112c8",
  "interval": "MONTH",
  "intervalCount": 2,
  "cycleCount": 2,
  "remainingCycleCount": 2,
  "currency": "USD",
  "amount": 100,
  "presentmentCurrency": "USD",
  "mode": "TEST",
  "createdAt": "2024-09-26T10:41:50.472+00:00",
  "status": "CREATED",
  "description": "Order for 2 items",
  "upfrontAmount": 200
}

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

Response

200
application/json
Successful response with subscription details
subscriptionId
string

Unique identifier of the subscription

interval
enum<string>

The interval group between subscriptions.

Available options:
DAY,
WEEK,
MONTH,
YEAR
intervalCount
integer

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

cycleCount
integer

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

remainingCycleCount
integer

The number of billing cycles remaining for the subscription.

currency
string

Three-letter currency code

amount
integer

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

presentmentCurrency
string

The currency that the customer paid in

mode
enum<string>

The mode in which the transaction was made (e.g., TEST or LIVE)

Available options:
TEST,
LIVE
createdAt
string

Timestamp of when the subscription was created

status
enum<string>

The status of the subscription

Available options:
ACTIVE,
INACTIVE,
INCOMPLETE,
CREATED,
CANCELLED
description
string

Description of the order, if any

upfrontAmount
integer

The amount to be charged at the start of the subscription. The upfront amount replaces the first subscription cycle amount. Regular amount apply from the next cycle.