Skip to content

YoPrint subscription

Open .md

API reference Team settings

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

15 operations

  • GETList your YoPrint invoices/v1/api/store/{team_slug}/setting/subscription/invoiceReturns 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).
  • GETList YoPrint plans you can choose/v1/api/store/{team_slug}/setting/subscription/planReturns 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 (config_option), and the…
  • PUTCheck a YoPrint coupon/v1/api/store/{team_slug}/setting/subscription/check_couponChecks a coupon code for a plan and, when it is valid, returns its discount and a coupon_token.
  • GETGet your YoPrint subscription/v1/api/store/{team_slug}/setting/subscription/currentReturns the team's current YoPrint subscription: its plan and extras, price, state, dates and the card on file (brand and last four digits only).
  • GETCheck a failed YoPrint payment before retrying/v1/api/store/{team_slug}/setting/subscription/current/retry_payment_previewReads 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 YoPrint), currency, the card it would…
  • GETGet a YoPrint billing operation/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.
  • GETGet the unfinished YoPrint billing operation/v1/api/store/{team_slug}/setting/subscription/operation/currentReturns the team's billing operation that hasn't finished, as operation, or operation: null when there is none.
  • PUTPreview a YoPrint plan change/v1/api/store/{team_slug}/setting/subscription/plan/previewShows 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).
  • PATCHResume your YoPrint subscription/v1/api/store/{team_slug}/setting/subscription/current/resumeThis changes what your shop pays YoPrint.
  • POSTRetry a failed YoPrint payment/v1/api/store/{team_slug}/setting/subscription/current/retry_paymentThis changes what your shop pays YoPrint.
  • PUTReplace the card for your YoPrint subscription/v1/api/store/{team_slug}/setting/subscription/current/update_cardThis changes what your shop pays YoPrint.
  • POSTRecover a YoPrint billing operation/v1/api/store/{team_slug}/setting/subscription/operation/{operation_id}/recoverFinishes a billing operation whose next_action is recover: YoPrint reads Stripe and settles the operation to match.
  • POSTSubscribe to or change your YoPrint plan/v1/api/store/{team_slug}/setting/subscription/plan/checkoutThis changes what your shop pays YoPrint.
  • POSTChoose the plan for your free trial/v1/api/store/{team_slug}/setting/subscription/plan/select_trialSets which plan's features the team gets during its free trial.
  • PATCHCancel your YoPrint subscription/v1/api/store/{team_slug}/setting/subscription/current/cancelThis changes what your shop pays YoPrint.

Legacy and internal (1)

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

  • GETGet a link to the billing pageInternal/v1/api/store/{team_slug}/setting/billing_portalMeant to return {"url": ...}, a link to manage YoPrint billing: the billing page for the team owner, an error page for anyone else.