Get subscription details

Returns one subscription by ID, including billing details, status, schedule, coupon snapshot, and refund history when present.

GET/v1/subscriptions/:subscriptionId

Authorization

api_key_auth
AuthorizationBearer <token>

API key authentication. Use "Bearer YOUR_API_KEY" format.

In: header

Path Parameters

subscriptionIdstringrequired

The ID of the subscription to retrieve. Use the list subscriptions endpoint first if you need to discover a subscription ID by email, name, customer, page, or date range.

^[0-9a-fA-F]{24}$

Query Parameters

livemodestring

Set to false to return test-mode records created while a page was in test mode. Defaults to the mode of the API key. Test API keys can only read test data.

truefalse

Returns

Subscription retrieved successfully

    • idstring
    • orderId?string
    • stripeSubscriptionId?string
    • stripeCustomerId?string
    • customerEmail?string
    • customerName?string
    • currency?string
    • amountnumber
    • amountUsd?number
    • taxSource?string, nullable

      How tax was applied. fixed_tax_rate when tax rates were applied directly to the record. stripe_tax when tax was calculated by Stripe based on the transaction details and Stripe Tax settings.

      fixed_tax_ratestripe_tax
    • Fixed tax rates applied to this record. Populated when taxSource is fixed_tax_rate.

    • interval?string
    • intervalCount?number
    • planIterations?number
    • What the customer chose to add to every payment to cover the processing fee, worked out on each payment's total with tax. Not one of fees. Absent when the customer did not choose it.

    • setupFee?number
    • setupFeeDiscountAmount?number
    • setupFeeTotal?number
    • setupFeeUsd?number
    • setupFeeInvoiceItemId?string
    • setupFeeInvoiceItemPaid?boolean
    • quantity?number
    • productPrice?number
    • priceId?string, nullable

      Id of the price the customer selected at checkout.

    • Frozen snapshot of the purchased price at the point of purchase.

    • dynamicPrice?number
    • discountedFromPrice?number
    • sku?string
    • couponId?string
    • licenseKeyId?string
    • livemode?boolean
    • status?string
      draftdraft_expiredincompleteincomplete_expiredtrialingpausedscheduledactive
    • paymentStatus?string
      draftdeletedopenpaiduncollectiblevoidrequires_payment_methodrequires_confirmation
    • paymentError?string
    • locale?string
    • sessionId?string
    • clientIp?string
    • userAgent?string
    • screenWidth?number
    • visitId?string
    • queryParameters?Record<string, string>
    • stripePaymentIntentId?string
    • stripeSetupIntentId?string
    • startDate?string

      date-time

    • trialEnd?string

      date-time

    • trialStart?string

      date-time

    • cancelAt?string

      date-time

    • cancelAtPeriodEnd?boolean
    • currentPeriodStart?string

      date-time

    • currentPeriodEnd?string

      date-time

    • upsell?boolean
    • upsellPageId?string

      For an upsell record, the ID of the page the buyer paid on before accepting the upsell (the start of the funnel).

    • upsellChargeId?string

      For an upsell record, the ID of the payment made on the page before the upsell.

    • upsellSubscriptionId?string

      For an upsell record, the ID of the subscription created on the page before the upsell.

    • sellerId?string
    • customerId?string
    • pageId?string

      ID of the page the subscription was bought on. A sale made through your store carries an ID that is not a checkout page in the API.

    • storeId?string

      ID of the store it was sold in. Absent for a sale made outside a store. Match this to find everything a store sold.

    • productId?string
    • productTitle?string
    • lastRefundAt?string

      date-time

    • lastRefundReason?string
    • lastRefundReasonNote?string
    • canceledAt?string

      date-time

    • canceledBy?string
    • canceledByApiKey?string

      ID of the API key that canceled the subscription, when cancellation was initiated via the seller API. Best-effort reference — the underlying ApiKey document may be hard-deleted, in which case canceledByApiKeyName is the durable audit trail.

    • canceledByApiKeyName?string

      Snapshot of the API key's human-readable name at the time of cancellation. Survives a later hard-delete of the ApiKey document.

    • reason?string
    • isAbandoned?boolean
    • recoveredAt?string

      date-time

    • abandonmentStatus?string

      'abandoned': checkout was started but not completed and not recovered yet. 'recovered': was abandoned but the customer returned and paid. Absent when the subscription is not an abandoned cart.

      abandonedrecovered
    • abandonedCartEmailStatus?string
      pendingfirst_sentsecond_sentthird_sentconvertedskipped
    • abandonedCartEmailSentAt?string

      date-time

    • pageSlug?string
    • createdAtstring

      date-time

    • updatedAtstring

      date-time

Bad request - Invalid request parameters

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Unauthorized - Missing or invalid API key

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Forbidden - Insufficient permissions or validation error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Subscription not found

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Rate Limit Exceeded - Please try again later.

  • messagestring

    Human-readable error message.

Internal server error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

import { createCheckoutPageClient } from '@checkoutpage/sdk';const checkoutpage = createCheckoutPageClient({  apiKey: process.env.CHECKOUTPAGE_API_KEY!,});const response = await checkoutpage.subscriptions.get('6812fe6e9f39b6760576f01c');
{
  "data": {
    "id": "string",
    "orderId": "string",
    "stripeSubscriptionId": "string",
    "stripeCustomerId": "string",
    "customerEmail": "string",
    "customerName": "string",
    "currency": "string",
    "amount": 0,
    "amountUsd": 0,
    "taxSource": "fixed_tax_rate",
    "taxRates": [
      {
        "taxRate": "65f4a1c2e4a9f3d2b1c0a9e8",
        "stripeId": "string",
        "displayName": "VAT",
        "default": true,
        "active": true,
        "inclusive": true,
        "percentage": 0,
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "interval": "string",
    "intervalCount": 0,
    "planIterations": 0,
    "fees": [
      {
        "name": "string",
        "amount": 0,
        "percentage": 0,
        "percentageAmount": 0,
        "fixedAmount": 0,
        "stripeProductId": "string"
      }
    ],
    "processingFeeContribution": {
      "name": "string",
      "amount": 0,
      "percentage": 0,
      "percentageAmount": 0,
      "fixedAmount": 0,
      "renewalAmount": 0,
      "discountedRenewalAmount": 0
    },
    "setupFee": 0,
    "setupFeeDiscountAmount": 0,
    "setupFeeFees": [
      {
        "name": "string",
        "amount": 0,
        "percentage": 0,
        "stripeInvoiceItemId": "string"
      }
    ],
    "setupFeeTotal": 0,
    "setupFeeUsd": 0,
    "setupFeeInvoiceItemId": "string",
    "setupFeeInvoiceItemPaid": true,
    "quantity": 0,
    "productPrice": 0,
    "priceId": "string",
    "priceSnapshot": {
      "priceId": "string",
      "label": "string",
      "description": "string",
      "badge": "string",
      "reference": "string",
      "billingType": "string",
      "amount": 0,
      "currency": "string",
      "discountedFromPrice": 0,
      "setupFee": 0,
      "setupFeeMultipliesWithQuantity": true,
      "stripePriceId": "string",
      "stripePriceLivemode": true,
      "managedInStripe": true,
      "payWhatYouWant": true,
      "pwywSuggestedPrice": 0,
      "recurring": {
        "interval": "string",
        "intervalCount": 0,
        "trialPeriodDays": 0,
        "billingCycleAnchorConfig": {
          "enabled": true,
          "dayOfMonth": 0,
          "month": 0
        },
        "startDate": "2019-08-24T14:15:22Z"
      },
      "paymentPlan": {
        "interval": "string",
        "intervalCount": 0,
        "trialPeriodDays": 0,
        "billingCycleAnchorConfig": {
          "enabled": true,
          "dayOfMonth": 0,
          "month": 0
        },
        "startDate": "2019-08-24T14:15:22Z",
        "planIterations": 0
      }
    },
    "dynamicPrice": 0,
    "discountedFromPrice": 0,
    "sku": "string",
    "billing": {
      "name": "string",
      "companyName": "string",
      "email": "string",
      "billingEmail": "string",
      "phone": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string"
      }
    },
    "shipping": {
      "name": "string",
      "phone": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "postalCode": "string",
        "country": "string"
      }
    },
    "fields": [
      {
        "fieldId": "string",
        "label": "string",
        "value": "string",
        "values": [
          "string"
        ],
        "element": "checkbox",
        "type": "",
        "meta": {
          "property1": null,
          "property2": null
        },
        "reference": "string"
      }
    ],
    "variants": [
      {
        "name": "string",
        "variantId": "string",
        "reference": "string",
        "selectionType": "single",
        "selectedOptions": [
          {
            "optionId": "string",
            "optionType": "one_time",
            "optionName": "string",
            "sku": "string",
            "quantity": 0,
            "additionalChargeAmount": 0,
            "discountAmount": 0,
            "fees": [
              {
                "name": "string",
                "amount": 0,
                "percentage": 0,
                "stripeInvoiceItemId": "string"
              }
            ],
            "additionalChargeAmountTotal": 0,
            "additionalChargeAmountUsd": 0,
            "optionStripePriceId": "string",
            "optionStripeProductId": "string",
            "optionInvoiceItemId": "string",
            "optionInvoiceItemPaid": true
          }
        ],
        "fees": [
          {
            "name": "string",
            "amount": 0,
            "percentage": 0,
            "stripeInvoiceItemId": "string"
          }
        ]
      }
    ],
    "couponId": "string",
    "couponSnapshot": {
      "label": "string",
      "code": "string",
      "amountOff": 0,
      "percentOff": 0,
      "appliesToSetupFee": true,
      "duration": "once",
      "durationInMonths": 0,
      "redeemBy": "2019-08-24T14:15:22Z",
      "maxRedemptions": 0,
      "timesRedeemed": 0,
      "currency": "string",
      "deleted": true
    },
    "licenseKeyId": "string",
    "livemode": true,
    "status": "draft",
    "paymentStatus": "draft",
    "paymentError": "string",
    "paymentMethod": {
      "gateway": "stripe",
      "method": "string",
      "wallet": "string",
      "mode": "default",
      "brand": "string",
      "last4": "string",
      "country": "string",
      "expMonth": 0,
      "expYear": 0,
      "funding": "string"
    },
    "locale": "string",
    "sessionId": "string",
    "clientIp": "string",
    "userAgent": "string",
    "screenWidth": 0,
    "visitId": "string",
    "queryParameters": {
      "property1": "string",
      "property2": "string"
    },
    "stripePaymentIntentId": "string",
    "stripeSetupIntentId": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "trialEnd": "2019-08-24T14:15:22Z",
    "trialStart": "2019-08-24T14:15:22Z",
    "cancelAt": "2019-08-24T14:15:22Z",
    "cancelAtPeriodEnd": true,
    "currentPeriodStart": "2019-08-24T14:15:22Z",
    "currentPeriodEnd": "2019-08-24T14:15:22Z",
    "upsell": true,
    "upsellPageId": "string",
    "upsellChargeId": "string",
    "upsellSubscriptionId": "string",
    "sellerId": "string",
    "customerId": "string",
    "pageId": "string",
    "storeId": "string",
    "productId": "string",
    "productTitle": "string",
    "lastRefundAt": "2019-08-24T14:15:22Z",
    "lastRefundReason": "string",
    "lastRefundReasonNote": "string",
    "canceledAt": "2019-08-24T14:15:22Z",
    "canceledBy": "string",
    "canceledByApiKey": "65f4a1c2e4a9f3d2b1c0a9e8",
    "canceledByApiKeyName": "string",
    "reason": "string",
    "isAbandoned": true,
    "recoveredAt": "2019-08-24T14:15:22Z",
    "abandonmentStatus": "abandoned",
    "abandonedCartEmailStatus": "pending",
    "abandonedCartEmailSentAt": "2019-08-24T14:15:22Z",
    "pageSlug": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "status": "error",
  "type": "ValidationError",
  "message": "Bad request - Invalid body: Field 'email' must be a valid email address",
  "errors": [
    {
      "param": "email",
      "message": "must be a valid email address"
    }
  ]
}
{
  "status": "error",
  "type": "error",
  "message": "Missing or invalid API key"
}
{
  "status": "error",
  "type": "error",
  "message": "Insufficient permissions requires: BOOKINGS_WRITE"
}
{
  "status": "error",
  "type": "error",
  "message": "Subscription not found"
}
{
  "message": "API key rate limit exceeded. Please try again later."
}
{
  "status": "error",
  "type": "error",
  "message": "Internal server error"
}