Skip to content

Get your YoPrint subscription

Open .md

GET/v1/api/store/{team_slug}/setting/subscription/current

v1Operation ID v1_public_setting_subscription_current_show

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). A team with no subscription (for example during a trial) gets 422 no_active_plan. Reading it changes nothing.

Permission

The team owner, or a member with the Manage Billing permission. Manage Settings alone is not enough.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team

Request body

This operation takes no request body.

Response

200Successful response.

  • dataobjectrequired
    Child fields (15)
    • activebooleanrequired

      Whether YoPrint treats the subscription as active now.

    • billing_cyclestringrequired
      • One of: "monthly", "annually"
    • planobjectrequired
      Child fields (11)
      • idstringrequired

        Send it as new_plan to preview and checkout.

      • namestringrequired
      • typestringrequired

        paid for a plan you subscribe to.

        • One of: "monthly", "annually"
      • config_optionarray of objects | null
        Fields of each item (7)
        • idstring

          The config[].type to send to preview and checkout.

          • One of: "warehouse", "pricing_group", "user_limit", "pricing_rule"
        • includedinteger

          How many the plan includes.

        • labelstring
        • maxinteger
        • mininteger

          The smallest config[].value: what the plan includes.

        • priceobject

          The price of each extra one; {"type": "none"} when the plan sells none.

        • typestring
      • Whether extras can be added (config_option).

      • display_featuresarray | object

        What the plan includes, as the pricing page lists it: rows of {text, tooltip, has_tooltip, is_bold, is_new}.

      • freeboolean
      • An old plan, still listed when YoPrint gave it to your team privately.

      • priceinteger

        The plan's price per billing cycle before extras, coupons and tax. Thousandths, an older encoding: 39000 is 39.00. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5 is 1.2345), or as a string ("1234.5") when you send X-Yoprint-Decimal-Format: exact-v1. See Money and quantities.

      • trial_plan_idstring | null

        Send it as plan_id to choose this plan for a trial.

    • priceintegerrequired

      What each billing cycle costs, with extras. Thousandths, an older encoding: 69000 is 69.00. Usually a whole number; an amount finer than a thousandth comes back as a number with a fraction (1234.5 is 1.2345), or as a string ("1234.5") when you send X-Yoprint-Decimal-Format: exact-v1. See Money and quantities.

    • statusstringrequired

      The subscription's state at Stripe, as YoPrint last saw it.

    • attempt_countinteger | null

      Failed payment attempts on the open invoice.

    • config_optionarray | object | null

      The limits on this subscription, as {type, value} for warehouse, pricing_group, user_limit and pricing_rule; [] when the plan has no extras.

    • ends_atstring (date-time) | null

      Set when a cancellation is scheduled: the plan ends then.

    • featuresobject | array

      The plan's features and limits.

    • last_invoice_datestring (date-time) | null
    • last_warning_sentinteger | boolean

      Whether a payment warning was sent, as the database keeps it: 0 or 1.

    • next_payment_attemptstring (date-time) | null
    • stripe_card_brandstring | null
    • trial_ends_atstring (date-time) | null
  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

    When
    You are not the owner and your role lacks Manage Billing. The body is {"message": "Insufficient Permission"}, without the error envelope.
    Fix
    Use the owner's key, or that of a member with Manage Billing.
  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

  • 422The request was refused and changed nothing. validation_failed lists what to fix in error.fields; other codes name a business rule, explained in error.message. A few checks answer with only {"message": "..."}. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer connect_timeout ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.

    When
    The team has no subscription: error.code no_active_plan.
    Fix
    Choose a plan with checkout.

Notes

  • Part of your YoPrint subscription: what your shop pays YoPrint, not your customers' payments.
  • AI apps (MCP connections) can't call this operation: they get 403 agent_operation_not_available. Use a personal API key.