> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.paymentkit.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paymentkit.com/_mcp/server.

# Get Subscription

GET https://app.paymentkit.com/api/{account_id}/subscriptions/{subscription_id}

Get a subscription by ID.

Works for both User and API Key authentication.
Account access is automatically validated via endpoint dependency.

Reference: https://docs.paymentkit.com/api-reference/api-reference/subscriptions/get-subscription

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://app.paymentkit.com` (Production, default)
- `https://staging.paymentkit.com` (Staging)

## Request

### Path parameters

- `subscription_id` (string, required)
- `account_id` (string, required)

### Query parameters

- `expand` (list of string, optional, nullable)

## Response

### 200

Successful Response

- `id` (string, required)
- `state` (enum, required) — The possible states of a subscription. Most are self-explanatory: it starts INCOMPLETE (created, not yet paid for), or TRIALING / SCHEDULED, becomes ACTIVE once paid, and can end up PAUSED, PAST_DUE (a payment failed), or CANCELLED. ACTIVE_UNSETTLED is the unusual one, added for slow bank rails like SEPA where the money does not arrive until days later. It means: "we already let the customer in at checkout, but their payment has not actually settled yet." A subscription is created straight into this state -- nothing ever moves INTO it from another state. It has exactly two ways out: it becomes ACTIVE if the payment settles, or CANCELLED if the payment fails, times out, or is later reversed (a chargeback).
  - Allowed values: `incomplete`, `trialing`, `scheduled`, `active`, `active_unsettled`, `paused`, `past_due`, `cancelled`
- `currency` (enum, required) — ISO 4217 currency codes.
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
- `description` (string, required, nullable)
- `current_period_start` (datetime, required)
- `current_period_end` (datetime, required)
- `trial_start` (datetime, required, nullable)
- `trial_end` (datetime, required, nullable)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `items` (list of object, required)
  - `id` (string, required)
  - `price` (object, required)
    - `id` (string, required)
    - `account_id` (string, required)
    - `product_id` (string, required)
    - `name` (string, required, nullable)
    - `unit_amount_atom` (integer, required, nullable)
    - `currency` (enum, required) — ISO 4217 currency codes.
      - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
    - `is_active` (boolean, required)
    - `unit_label` (string, required, nullable)
    - `pricing_type` (string, required)
    - `recurring_interval` (string, required, nullable)
    - `recurring_interval_count` (integer, required, nullable)
    - `auto_renew` (boolean, required, nullable)
    - `contract_term_multiple` (integer, required, nullable)
    - `trial_days` (integer, required)
    - `usage_type` (string, required)
    - `metered_id` (string, required, nullable)
    - `billing_scheme` (string, required)
    - `tier_amount_info` (object, required, nullable) — Tiered pricing configuration.
      - `mode` (enum, required) — Pricing mode: 'volume' or 'graduated'
        - Allowed values: `volume`, `graduated`
      - `amount_atoms` (list of object, required) — List of pricing tiers
        - `unit_amount_atom` (integer, required) — Price per unit in this tier (in atomic units)
        - `units_upto` (integer, optional, nullable) — Upper limit for this tier. Use null for infinity (last tier)
        - `flat_amount_atom` (integer, optional, default: 0) — Flat fee for this tier (in atomic units)
    - `prerequisite_price_ids` (list of string, required, nullable)
    - `exclusive_customer_ids` (list of string, required, nullable)
    - `metadata` (map from string to any, required, nullable)
    - `created_at` (datetime, required)
    - `updated_at` (datetime, required)
    - `product_name` (string, optional, nullable)
    - `product_description` (string, optional, nullable)
    - `custom_fields` (map from string to any, optional, nullable) — Custom field values. Only included when expand=custom_fields is specified.
    - `quantity_divisor` (integer, optional, default: 1)
    - `quantity_rounding` (enum, optional) — Rounding mode for fractional billable units in metered pricing. - CEIL (default): Round up to next whole unit — for packaged pricing - PROPORTIONAL: Keep exact fractions — for percentage-based fees (e.g., 0.65% of volume) - FLOOR: Round down to whole unit - ROUND: Standard rounding (0.5+ rounds up)
      - Allowed values: `ceil`, `proportional`, `floor`, `round`
  - `quantity` (integer, required)
  - `product_name` (string, required)
  - `is_active` (boolean, optional, default: true)
  - `start_at_end` (boolean, optional, default: false)
  - `drop_at_end` (boolean, optional, default: false)
  - `product_description` (string, optional, nullable)
  - `aggregated_usage` (double, optional, nullable)
  - `plan_options` (list of object, optional)
    - `product_id` (string, required)
    - `product_name` (string, required)
    - `rank` (integer, required)
    - `product_description` (string, optional, nullable)
    - `is_current` (boolean, optional, default: false)
    - `prices` (list of object, optional)
      - `id` (string, required)
      - `account_id` (string, required)
      - `product_id` (string, required)
      - `name` (string, required, nullable)
      - `unit_amount_atom` (integer, required, nullable)
      - `currency` (enum, required) — ISO 4217 currency codes.
        - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
      - `is_active` (boolean, required)
      - `unit_label` (string, required, nullable)
      - `pricing_type` (string, required)
      - `recurring_interval` (string, required, nullable)
      - `recurring_interval_count` (integer, required, nullable)
      - `auto_renew` (boolean, required, nullable)
      - `contract_term_multiple` (integer, required, nullable)
      - `trial_days` (integer, required)
      - `usage_type` (string, required)
      - `metered_id` (string, required, nullable)
      - `billing_scheme` (string, required)
      - `tier_amount_info` (object, required, nullable) — Tiered pricing configuration.
        - `mode` (enum, required) — Pricing mode: 'volume' or 'graduated'
          - Allowed values: `volume`, `graduated`
        - `amount_atoms` (list of object, required) — List of pricing tiers
          - `unit_amount_atom` (integer, required) — Price per unit in this tier (in atomic units)
          - `units_upto` (integer, optional, nullable) — Upper limit for this tier. Use null for infinity (last tier)
          - `flat_amount_atom` (integer, optional, default: 0) — Flat fee for this tier (in atomic units)
      - `prerequisite_price_ids` (list of string, required, nullable)
      - `exclusive_customer_ids` (list of string, required, nullable)
      - `metadata` (map from string to any, required, nullable)
      - `created_at` (datetime, required)
      - `updated_at` (datetime, required)
      - `product_name` (string, optional, nullable)
      - `product_description` (string, optional, nullable)
      - `custom_fields` (map from string to any, optional, nullable) — Custom field values. Only included when expand=custom_fields is specified.
      - `quantity_divisor` (integer, optional, default: 1)
      - `quantity_rounding` (enum, optional) — Rounding mode for fractional billable units in metered pricing. - CEIL (default): Round up to next whole unit — for packaged pricing - PROPORTIONAL: Keep exact fractions — for percentage-based fees (e.g., 0.65% of volume) - FLOOR: Round down to whole unit - ROUND: Standard rounding (0.5+ rounds up)
        - Allowed values: `ceil`, `proportional`, `floor`, `round`
    - `subscription_item_id` (string, optional, nullable)
    - `quantity` (integer, optional, nullable)
    - `addons` (list of object, optional)
  - `is_pending` (boolean, optional, default: false) — True if this item is from a scheduled pending plan change (not yet active).
- `customer` (object, required)
  - `id` (string, required)
  - `name` (string, required, nullable)
  - `first_name` (string, required, nullable)
  - `last_name` (string, required, nullable)
  - `email` (string, required, nullable)
  - `phone` (string, required, nullable)
  - `billing_email` (string, required, nullable)
  - `business_name` (string, required, nullable)
  - `address` (object, required, nullable)
    - `id` (string, required)
    - `line1` (string, required, nullable)
    - `line2` (string, required, nullable)
    - `line3` (string, required, nullable)
    - `city` (string, required, nullable)
    - `state` (string, required, nullable)
    - `zip_code` (string, required, nullable)
    - `country` (string, required, nullable)
  - `shipping_address` (object, required, nullable)
    - `id` (string, required)
    - `line1` (string, required, nullable)
    - `line2` (string, required, nullable)
    - `line3` (string, required, nullable)
    - `city` (string, required, nullable)
    - `state` (string, required, nullable)
    - `zip_code` (string, required, nullable)
    - `country` (string, required, nullable)
  - `tax_ids` (list of string, required, nullable)
  - `currency` (enum, required, nullable) — ISO 4217 currency codes.
    - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
  - `language` (string, required, nullable)
  - `invoice_settings` (map from string to any, required, nullable)
  - `total_spent` (object, required, nullable) — Cash captured from this customer, minus refunds and chargebacks. Null when no cash was captured — including invoices settled outside the platform and customers who were fully refunded.
    - `amount_atom` (integer, required) — Cash captured from this customer, minus refunds and chargebacks, in the smallest unit of the currency. Excludes credit notes, applied credit balance, and unpaid invoice face values.
    - `currency` (enum, required) — Currency of the total. Customers who paid in more than one currency have their amounts summed and labelled with a single currency.
      - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
  - `metadata` (map from string to any, required, nullable)
  - `created_at` (datetime, required)
  - `updated_at` (datetime, required)
  - `credit_balance` (object, optional, nullable) — Primary credit balance (largest currency). Deprecated: use credit_balances.
    - `amount_atom` (integer, required) — Credit balance amount in smallest currency unit
    - `currency` (enum, required) — Currency code
      - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
  - `credit_balances` (list of object, optional, nullable) — Credit balances per currency
    - `amount_atom` (integer, required) — Credit balance amount in smallest currency unit
    - `currency` (enum, required) — Currency code
      - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
  - `processor_overrides` (map from string to any, optional, nullable) — Per-processor overrides keyed by processor id, e.g. \{"proc\_...": \{"email": "institutional\@edu"}}. Currently Stripe + email only. When set, the override email is used for that processor instead of the primary email; the primary email is never mutated and non-Stripe processors are unaffected.
  - `custom_fields` (map from string to any, optional, nullable) — Custom field values. Only included when expand=custom_fields is specified.
- `collection_method` (enum, required)
  - Allowed values: `charge_automatically`, `send_invoice`
- `payment_method` (object, required, nullable) — Payment method API response model.
  - `id` (string, required)
  - `account_id` (string, required)
  - `customer_id` (string, required, nullable)
  - `provider_type` (enum, required) — Type of payment method.
    - Allowed values: `credit_card`, `paypal`, `google_pay`, `apple_pay`, `stripe_link`, `klarna`, `afterpay`, `affirm`, `sepa`
  - `name` (string, required)
  - `is_active` (boolean, required)
  - `metadata` (map from string to any, required, nullable) — Free-form metadata about the payment method. For credit cards this includes `last4`, `brand`, `exp_month`, `exp_year`, and (for VGS-vaulted cards) issuer intelligence resolved at setup time: - `bin` — issuer BIN, 6 or 8 digits (string; may be absent). - `card_attributes` — VGS card attribute object (may be absent; fields within may be absent; values are UPPERCASE as returned by VGS). Includes `card_type`, `card_segment_type`, `prepaid_card`, `virtual_card`, `country_name`, `country_numeric`, `regulated`, and additional card details. Read with e.g. `metadata?.bin` and `metadata?.card_attributes?.card_type`.
  - `created_at` (datetime, required)
  - `updated_at` (datetime, required)
  - `used_in_subscription` (boolean, optional, default: false)
  - `network_token_status` (string, optional, nullable)
- `billing_interval` (string, optional, nullable)
- `billing_interval_count` (integer, optional, nullable)
- `paused_at` (datetime, optional, nullable)
- `resumes_at` (datetime, optional, nullable)
- `pause_at_end` (boolean, optional, nullable)
- `cancel_at_period_end` (boolean, optional, nullable)
- `cancel_at` (datetime, optional, nullable)
- `cancellation_refund_option` (enum, optional, nullable) — Refund options when cancelling a subscription. - NONE: Cancel with no refund (current behavior) - FULL: Refund full current period amount - PRORATED: Refund unused portion of current period - CANCEL_UNPAID: Use dunning_end_behavior for unpaid invoices
  - Allowed values: `none`, `full`, `prorated`, `cancel_unpaid`
- `cancellation_details` (object, optional, nullable) — Details about why a subscription was cancelled. All fields are optional — callers can provide any combination. Stored as JSONB on the subscription entity.
  - `comment` (string, optional, nullable) — Free-text comment from the customer
  - `feedback` (string, optional, nullable) — Structured feedback category (e.g., too_expensive, missing_features, switched_service, unused, other)
  - `reason` (string, optional, nullable) — Cancellation reason code (e.g., customer_request, payment_failure)
  - `target_product_names` (list of string, optional, nullable) — Product names the subscription is changing to (for cross-interval plan changes)
- `net_d` (integer, optional, nullable)
- `statement_descriptor_suffix` (string, optional, nullable) — Statement descriptor suffix for this subscription.
- `show_payment_link` (boolean, optional, default: false)
- `total_billing_cycles` (integer, optional, nullable)
- `remaining_billing_cycles` (integer, optional, nullable)
- `contract_auto_renew` (boolean, optional, nullable)
- `discount` (object, optional, nullable) — Response schema for discount data.
  - `id` (string, required)
  - `coupon_id` (string, required)
  - `promotion_code_id` (string, required, nullable)
  - `attachment_level` (string, required)
  - `customer_id` (string, required, nullable)
  - `subscription_id` (string, required, nullable)
  - `invoice_id` (string, required, nullable)
  - `invoice_item_id` (string, required, nullable)
  - `start_date` (datetime, required)
  - `end_date` (datetime, required, nullable)
  - `is_active` (boolean, required)
  - `metadata` (map from string to any, required, nullable)
  - `created_at` (datetime, required)
  - `updated_at` (datetime, required)
- `last_successful_processor_id` (string, optional, nullable)
- `metadata` (map from string to any, optional, nullable)
- `split_from_subscription` (string, optional, nullable) — ID of the subscription this was split from (cross-interval plan change).
- `split_to_subscriptions` (list of string, optional, nullable) — IDs of subscriptions created from this one (cross-interval plan change).
- `pending_plan_change` (object, optional, nullable) — Pending plan change scheduled for period end. Present when a deferred plan change is awaiting execution.
  - `id` (string, required) — Unique ID of the pending change
  - `created_at` (datetime, required) — When the pending change was created
  - `scheduled_for` (datetime, required) — When the change will execute (period_end)
  - `items` (list of object, required) — Item mappings to apply when executed
    - `action` (enum, required) — Action to perform: add, update, or delete
      - Allowed values: `add`, `update`, `delete`
    - `subscription_item_id` (string, optional, nullable) — ID of existing item (required for UPDATE/DELETE, must be None for ADD)
    - `new_price_id` (string, optional, nullable) — ID of target price (required for ADD/UPDATE, must be None for DELETE)
    - `quantity` (integer, optional, nullable) — Quantity (defaults to 1 for ADD if not specified, keeps existing for UPDATE)
    - `new_product_name` (string, optional, nullable) — Product name for the new price (populated for pending changes, read-only)
  - `reason` (string, required) — Reason for the plan change
  - `proration_behavior` (string, required) — Proration behavior to apply
  - `metadata` (map from string to string, optional, nullable) — Additional metadata
- `custom_fields` (map from string to any, optional, nullable) — Custom field values. Only included when expand=custom_fields is specified.

## Examples

**Response**

```json
{
  "id": "string",
  "state": "incomplete",
  "currency": "aed",
  "description": "string",
  "current_period_start": "2024-01-15T09:30:00Z",
  "current_period_end": "2024-01-15T09:30:00Z",
  "trial_start": "2024-01-15T09:30:00Z",
  "trial_end": "2024-01-15T09:30:00Z",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "items": [
    {
      "id": "string",
      "price": {
        "id": "string",
        "account_id": "string",
        "product_id": "string",
        "name": "string",
        "unit_amount_atom": 1,
        "currency": "aed",
        "is_active": true,
        "unit_label": "string",
        "pricing_type": "string",
        "recurring_interval": "string",
        "recurring_interval_count": 1,
        "auto_renew": true,
        "contract_term_multiple": 1,
        "trial_days": 1,
        "usage_type": "string",
        "metered_id": "string",
        "billing_scheme": "string",
        "tier_amount_info": {
          "mode": "volume",
          "amount_atoms": [
            {
              "unit_amount_atom": 1,
              "units_upto": 1,
              "flat_amount_atom": 0
            }
          ]
        },
        "prerequisite_price_ids": [
          "string"
        ],
        "exclusive_customer_ids": [
          "string"
        ],
        "metadata": {},
        "created_at": "2024-01-15T09:30:00Z",
        "updated_at": "2024-01-15T09:30:00Z",
        "product_name": "string",
        "product_description": "string",
        "custom_fields": {},
        "quantity_divisor": 1,
        "quantity_rounding": "ceil"
      },
      "quantity": 1,
      "product_name": "string",
      "is_active": true,
      "start_at_end": false,
      "drop_at_end": false,
      "product_description": "string",
      "aggregated_usage": 1.1,
      "plan_options": [
        {
          "product_id": "string",
          "product_name": "string",
          "rank": 1,
          "product_description": "string",
          "is_current": false,
          "prices": [
            {
              "id": "string",
              "account_id": "string",
              "product_id": "string",
              "name": "string",
              "unit_amount_atom": 1,
              "currency": "aed",
              "is_active": true,
              "unit_label": "string",
              "pricing_type": "string",
              "recurring_interval": "string",
              "recurring_interval_count": 1,
              "auto_renew": true,
              "contract_term_multiple": 1,
              "trial_days": 1,
              "usage_type": "string",
              "metered_id": "string",
              "billing_scheme": "string",
              "tier_amount_info": {
                "mode": "volume",
                "amount_atoms": [
                  {
                    "unit_amount_atom": 1,
                    "units_upto": 1,
                    "flat_amount_atom": 0
                  }
                ]
              },
              "prerequisite_price_ids": [
                "string"
              ],
              "exclusive_customer_ids": [
                "string"
              ],
              "metadata": {},
              "created_at": "2024-01-15T09:30:00Z",
              "updated_at": "2024-01-15T09:30:00Z",
              "product_name": "string",
              "product_description": "string",
              "custom_fields": {},
              "quantity_divisor": 1,
              "quantity_rounding": "ceil"
            }
          ],
          "subscription_item_id": "string",
          "quantity": 1,
          "addons": [
            null
          ]
        }
      ],
      "is_pending": false
    }
  ],
  "customer": {
    "id": "string",
    "name": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone": "string",
    "billing_email": "string",
    "business_name": "string",
    "address": {
      "id": "string",
      "line1": "string",
      "line2": "string",
      "line3": "string",
      "city": "string",
      "state": "string",
      "zip_code": "string",
      "country": "string"
    },
    "shipping_address": {
      "id": "string",
      "line1": "string",
      "line2": "string",
      "line3": "string",
      "city": "string",
      "state": "string",
      "zip_code": "string",
      "country": "string"
    },
    "tax_ids": [
      "string"
    ],
    "currency": "aed",
    "language": "string",
    "invoice_settings": {},
    "total_spent": {
      "amount_atom": 1,
      "currency": "aed"
    },
    "metadata": {},
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "credit_balance": {
      "amount_atom": 1,
      "currency": "aed"
    },
    "credit_balances": [
      {
        "amount_atom": 1,
        "currency": "aed"
      }
    ],
    "processor_overrides": {},
    "custom_fields": {}
  },
  "collection_method": "charge_automatically",
  "payment_method": {
    "id": "string",
    "account_id": "string",
    "customer_id": "string",
    "provider_type": "credit_card",
    "name": "string",
    "is_active": true,
    "metadata": {},
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "used_in_subscription": false,
    "network_token_status": "string"
  },
  "billing_interval": "string",
  "billing_interval_count": 1,
  "paused_at": "2024-01-15T09:30:00Z",
  "resumes_at": "2024-01-15T09:30:00Z",
  "pause_at_end": true,
  "cancel_at_period_end": true,
  "cancel_at": "2024-01-15T09:30:00Z",
  "cancellation_refund_option": "none",
  "cancellation_details": {
    "comment": "string",
    "feedback": "string",
    "reason": "string",
    "target_product_names": [
      "string"
    ]
  },
  "net_d": 1,
  "statement_descriptor_suffix": "string",
  "show_payment_link": false,
  "total_billing_cycles": 1,
  "remaining_billing_cycles": 1,
  "contract_auto_renew": true,
  "discount": {
    "id": "string",
    "coupon_id": "string",
    "promotion_code_id": "string",
    "attachment_level": "string",
    "customer_id": "string",
    "subscription_id": "string",
    "invoice_id": "string",
    "invoice_item_id": "string",
    "start_date": "2024-01-15T09:30:00Z",
    "end_date": "2024-01-15T09:30:00Z",
    "is_active": true,
    "metadata": {},
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z"
  },
  "last_successful_processor_id": "string",
  "metadata": {},
  "split_from_subscription": "string",
  "split_to_subscriptions": [
    "string"
  ],
  "pending_plan_change": {
    "id": "string",
    "created_at": "2024-01-15T09:30:00Z",
    "scheduled_for": "2024-01-15T09:30:00Z",
    "items": [
      {
        "action": "add",
        "subscription_item_id": "string",
        "new_price_id": "string",
        "quantity": 1,
        "new_product_name": "string"
      }
    ],
    "reason": "string",
    "proration_behavior": "string",
    "metadata": {}
  },
  "custom_fields": {}
}
```

**SDK Code**

```python
import requests

url = "https://app.paymentkit.com/api/account_id/subscriptions/subscription_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.paymentkit.com/api/account_id/subscriptions/subscription_id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.paymentkit.com/api/account_id/subscriptions/subscription_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.paymentkit.com/api/account_id/subscriptions/subscription_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.paymentkit.com/api/account_id/subscriptions/subscription_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.paymentkit.com/api/account_id/subscriptions/subscription_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.paymentkit.com/api/account_id/subscriptions/subscription_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.paymentkit.com/api/account_id/subscriptions/subscription_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```