v1

latestOpenAPI 3.0.02026-07-2475182625.5 KB
Subscriptions

Retrieve a subscription

Retrieves the details of a subscription with the given subscription_id.

get/subscriptions/{subscription_id}

Path parameters

subscription_idstring required
Example:1abc2DE_FGhIjKLm3NoPQR

Unique identifier for the subscription.

Query parameters

accountIdstring
Example:abCdE1FGH2Hij3KLMnOpqR

Filter subscriptions by the associated account ID.

beginstring date
Example:2025-01-01

Specify the beginning of a date range in yyyy-mm-dd format.

endstring date
Example:2025-12-31

Specify the end of a date range in yyyy-mm-dd format.

event'canceled' | 'charged' | 'created' | 'deactivated' | 'trialended' | 'trialstarted'
Example:created

Specify the event type to filter results. Valid values include canceled, charged, created, deactivated, trialended, or trialstarted. Must be used with the begin and end parameters.

productsstring
Example:product-12345

Filter subscriptions by specific product IDs. Use commas to separate multiple values.

scope'all' | 'live' | 'test'
Example:live

Specify the scope to filter by test or live subscriptions. If not provided, both live and test subscriptions are returned by default.

status'active' | 'canceled' | 'deactivated' | 'overdue' | 'trial'
Example:active

Specify the subscription status to filter results. Valid values include active, canceled, deactivated, overdue, or trial.

Response

OK

idstring

Unique identifier for the subscription.

subscriptionstring

Identifier for the subscription, same as id.

activeboolean

Indicates if the subscription is active.

statestring

Current state of the subscription (e.g., trial, active, canceled).

isSubscriptionEligibleForPauseByBuyerboolean

Indicates if the buyer can pause the subscription.

isPauseScheduledboolean

Indicates if a pause is scheduled for the subscription.

changedinteger

Timestamp of the last change to the subscription in milliseconds.

changedValueinteger

Value of the last change timestamp in milliseconds.

changedInSecondsinteger

Value of the last change timestamp in seconds.

changedDisplaystring

Human-readable display of the last change date.

liveboolean

Indicates if the subscription is live or in test mode.

declineReasonstring

Reason for payment decline, if applicable.

paymentMethodstring

The payment method associated with the subscription.

expirystring

Expiry date of the payment method in MM/YY format.

cardEndingstring

Last four digits of the payment card.

cardTypestring

Type of payment card used (e.g., VISA, Mastercard).

currencystring

Currency used for subscription billing.

accountstring

Account ID associated with the subscription.

productstring

Product path of the subscription.

skustring

SKU of the subscription product.

displaystring

Display name of the subscription product.

quantityinteger

Quantity of the subscription product.

adhocboolean

Indicates if the subscription is ad-hoc.

autoRenewboolean

Indicates if the subscription is set to auto-renew.

pricenumber

Price of the subscription.

priceDisplaystring

Human-readable display of the subscription price.

priceInPayoutCurrencynumber

Subscription price in the payout currency.

priceInPayoutCurrencyDisplaystring

Human-readable display of the subscription price in payout currency.

discountnumber

Discount amount applied to the subscription.

discountDisplaystring

Human-readable display of the discount amount.

discountInPayoutCurrencynumber

Discount amount in the payout currency.

discountInPayoutCurrencyDisplaystring

Human-readable display of the discount in payout currency.

subtotalnumber

Subtotal amount of the subscription.

subtotalDisplaystring

Human-readable display of the subscription subtotal.

subtotalInPayoutCurrencynumber

Subtotal amount in the payout currency.

subtotalInPayoutCurrencyDisplaystring

Human-readable display of the subtotal in payout currency.

attributesobject

Custom attributes associated with the subscription.

nextChargeDatestring date-time

The next charge date for the subscription.

Example response

{
  "id": "1abc2DE_FGhIjKLm3NoPQR",
  "subscription": "1abc2DE_FGhIjKLm3NoPQR",
  "active": true,
  "state": "trial",
  "isPauseScheduled": true,
  "changed": 1573257599032,
  "changedValue": 1573257599032,
  "changedInSeconds": 1573257599,
  "changedDisplay": "11/8/19",
  "declineReason": "Invalid Card number",
  "paymentMethod": "CREDIT_CARD",
  "expiry": "12/25",
  "cardType": "VISA",
  "currency": "USD",
  "account": "N8FjcSWcQNeYCc-suM1O8g",
  "product": "example-monthly-subscription",
  "sku": "skusub1",
  "display": "Example Monthly Subscription",
  "quantity": 1,
  "autoRenew": true,
  "price": 14.95,
  "priceDisplay": "$14.95",
  "priceInPayoutCurrency": 14.95,
  "priceInPayoutCurrencyDisplay": "$14.95",
  "discount": 3.74,
  "discountDisplay": "$3.74",
  "discountInPayoutCurrency": 3.74,
  "discountInPayoutCurrencyDisplay": "$3.74",
  "subtotal": 16.21,
  "subtotalDisplay": "$16.21",
  "subtotalInPayoutCurrency": 16.21,
  "subtotalInPayoutCurrencyDisplay": "$16.21",
  "attributes": {
    "Furious": "Falcon",
    "CustomAttribute2": "CustomValue2"
  },
  "addons": [
    {
      "product": "example-product-3",
      "sku": "skuex3",
      "display": "Example Product 3",
      "quantity": 1,
      "price": 5,
      "priceDisplay": "$5.00"
    }
  ],
  "nextChargeDate": "2025-12-01T00:00:00.000Z"
}