> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enricho.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create plan checkout

> Hosted monthly self-serve subscription payment link.

```bash theme={null}
curl -X POST 'https://mcp.enricho.co/api/billing/checkout/plan' \
  -H 'Authorization: Bearer enr_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"plan":"pro"}'
```

`plan` must be exactly `pro`, `growth` or `scale`. No quantity, customer ID or card details are needed. Invalid/missing plan values return 422. An already-active plan returns 409 (`validation_failed`); buy packs for more credits without changing that plan.

The result contains `checkout_url`, `item`, `price_usd` (formatted with a dollar sign), `credits` and `note`. Creating checkout consumes no credits and does not charge a card. Open the hosted link to pay. Monthly credits refill on the first of each month UTC; switching plans ends the old subscription when confirmed.

Wait for payment confirmation, then [read usage](https://docs.enricho.co/api-reference/usage.md). Checkout HTTP 200 alone does not change your plan. Payment-provider failures can return 502; unavailable checkout returns 503.


## OpenAPI

````yaml api-reference/openapi.json POST /api/billing/checkout/plan
openapi: 3.1.0
info:
  title: Enricho Public REST API
  version: 1.0.0
  description: >-
    Public directory search and billing APIs. Full search costs 1 credit per
    returned record; previews and usage calls use no credits. Request and
    response contracts reflect the current public gateway and service handlers.
servers:
  - url: https://mcp.enricho.co
security:
  - apiKey: []
  - headerKey: []
tags:
  - name: Directory
  - name: Billing
paths:
  /api/billing/checkout/plan:
    post:
      tags:
        - Billing
      summary: Create plan checkout
      description: >-
        No credits consumed. Creates a hosted monthly-subscription checkout; no
        charge or plan change occurs until payment is completed and confirmed.
        Monthly credits refill on the first of the calendar month UTC. Switching
        plans ends the old subscription.
      operationId: checkoutPlan
      requestBody:
        required: true
        description: 'Send JSON with Content-Type: application/json.'
        content:
          application/json:
            schema:
              type: object
              properties:
                plan:
                  type: string
                  enum:
                    - pro
                    - growth
                    - scale
                  description: Exact lowercase self-serve plan SKU.
              required:
                - plan
      responses:
        '200':
          description: Success envelope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  result:
                    $ref: '#/components/schemas/Checkout'
                  message:
                    type: string
                required:
                  - success
                  - result
                  - message
        '400':
          description: 'bad_request: body cannot be parsed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'unauthorized: missing, invalid or revoked API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            validation_failed: already subscribed to this plan; buy packs for
            additional credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: 'validation_failed: plan must be pro, growth or scale.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            rate_limited: key, account or client-IP request limit exceeded; wait
            a minute before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'internal: unexpected server failure.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            upstream_unavailable: gateway could not reach the service, or
            payment provider failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            upstream_unavailable: authentication or service dependency
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Checkout:
      type: object
      properties:
        checkout_url:
          type: string
          format: uri
          description: >-
            Hosted payment link. Open it to complete payment; creating the link
            does not charge a card or grant credits.
        item:
          type: string
          description: Display name of the purchased item.
        price_usd:
          type: string
          description: Formatted total price, including a dollar sign (for example $25.00).
        credits:
          type: integer
          description: >-
            Monthly allowance for a plan, or total credits for all requested
            packs.
        note:
          type: string
          description: Human-readable payment instructions and terms.
      required:
        - checkout_url
        - item
        - price_usd
        - credits
        - note
    Error:
      type: object
      properties:
        success:
          type: boolean
          const: false
        result:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code.
          required:
            - code
        message:
          type: string
          description: Human-readable error; do not parse this as a stable identifier.
      required:
        - success
        - result
        - message
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Enricho API key (enr_...)
    headerKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        An Enricho API key (enr_...). Use this or Authorization: Bearer, not
        both.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.