# YoPrint subscription

Section: Team settings. Part of the [API reference](https://developer.yoprint.com/reference.md). Web page: https://developer.yoprint.com/reference/yoprint-subscription/

This page and all 16 operation pages, in 2 files: https://developer.yoprint.com/llms/yoprint-subscription.txt (operations 1 to 9), https://developer.yoprint.com/llms/yoprint-subscription-2.txt (operations 10 to 16)

Your shop's own YoPrint plan and billing: plans, checkout, card, invoices, cancellation and the billing operations that track each change.

## Operations (15)

- [List your YoPrint invoices](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-invoice-index.md): `GET /v1/api/store/{team_slug}/setting/subscription/invoice`. Returns the invoices YoPrint has billed your team for its subscription, newest first, a page at a time (the team's page size, 50 by default).
- [List YoPrint plans you can choose](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-plan-index.md): `GET /v1/api/store/{team_slug}/setting/subscription/plan`. Returns the YoPrint plans your team can subscribe to, including any private plan YoPrint gave your team: each with its `id`, `name`, `billing_cycle`, `price`, features, the extras you can configure…
- [Check a YoPrint coupon](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-check-coupon.md): `PUT /v1/api/store/{team_slug}/setting/subscription/check_coupon`. Checks a coupon code for a plan and, when it is valid, returns its discount and a `coupon_token`.
- [Get your YoPrint subscription](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-show.md): `GET /v1/api/store/{team_slug}/setting/subscription/current`. Returns the team's current YoPrint subscription: its plan and extras, price, state, dates and the card on file (brand and last four digits only).
- [Check a failed YoPrint payment before retrying](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-retry-payment-preview.md): `GET /v1/api/store/{team_slug}/setting/subscription/current/retry_payment_preview`. Reads the open renewal invoice that failed to charge: `amount_remaining` (in cents, as Stripe counts it: `7000` is 70.00, Stripe's own unit, unlike the thousandths or decimal pairs used elsewhere in…
- [Get a YoPrint billing operation](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-operation-show.md): `GET /v1/api/store/{team_slug}/setting/subscription/operation/{operation_id}`. Returns one billing operation by the `operation_id` you chose: its `kind`, `state`, whether it is `terminal`, its `outcome` and the `next_action` to take.
- [Get the unfinished YoPrint billing operation](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-operation-current.md): `GET /v1/api/store/{team_slug}/setting/subscription/operation/current`. Returns the team's billing operation that hasn't finished, as `operation`, or `operation: null` when there is none.
- [Preview a YoPrint plan change](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-plan-preview.md): `PUT /v1/api/store/{team_slug}/setting/subscription/plan/preview`. Shows what a plan change would cost before you make it: `amount_due` now and the `ending_balance`, as Stripe calculates them, in thousandths (`69000` is 69.00; see Money and quantities).
- [Resume your YoPrint subscription](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-resume.md): `PATCH /v1/api/store/{team_slug}/setting/subscription/current/resume`. This changes what your shop pays YoPrint.
- [Retry a failed YoPrint payment](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-retry-payment.md): `POST /v1/api/store/{team_slug}/setting/subscription/current/retry_payment`. This changes what your shop pays YoPrint.
- [Replace the card for your YoPrint subscription](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-update-card.md): `PUT /v1/api/store/{team_slug}/setting/subscription/current/update_card`. This changes what your shop pays YoPrint.
- [Recover a YoPrint billing operation](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-operation-recover.md): `POST /v1/api/store/{team_slug}/setting/subscription/operation/{operation_id}/recover`. Finishes a billing operation whose `next_action` is `recover`: YoPrint reads Stripe and settles the operation to match.
- [Subscribe to or change your YoPrint plan](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-plan-checkout.md): `POST /v1/api/store/{team_slug}/setting/subscription/plan/checkout`. This changes what your shop pays YoPrint.
- [Choose the plan for your free trial](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-plan-select-trial.md): `POST /v1/api/store/{team_slug}/setting/subscription/plan/select_trial`. Sets which plan's features the team gets during its free trial.
- [Cancel your YoPrint subscription](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-subscription-current-cancel.md): `PATCH /v1/api/store/{team_slug}/setting/subscription/current/cancel`. This changes what your shop pays YoPrint.

## Legacy and internal operations (1)

Prefer the operations above. Legacy ones name their replacement; internal ones are built for YoPrint's own apps.

- [Get a link to the billing page](https://developer.yoprint.com/reference/yoprint-subscription/v1-setting-billing-portal-redirect.md): `GET /v1/api/store/{team_slug}/setting/billing_portal` (internal: built for YoPrint's own apps, don't build on it). Meant to return `{"url": ...}`, a link to manage YoPrint billing: the billing page for the team owner, an error page for anyone else.
