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

# Create a checkout link

> Create a checkout link that sells one tier of the plan. The returned url is the public entry point that creates a cart and redirects the buyer to the customerfront of the sales channel.



## OpenAPI

````yaml post /api/plans/{id}/checkout-links
openapi: 3.1.0
info:
  title: Fynn V2 Plans API
  version: 2026-06
  description: >-
    REST API for the Fynn V2 Plans. Use it to define plans with upgrade and
    downgrade tiers, sell them through checkout links, and let customers switch
    tiers from your customer portal. All amounts use the minor or decimal
    representation documented per field. Authenticate setup endpoints with an
    API token and customer endpoints with a customer token.
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - ApiToken: []
tags:
  - name: Plans
    description: Create and manage plans, tiers and items.
  - name: Checkout Links
    description: Sell a plan tier through a hosted checkout link.
  - name: Plan switching (customer)
    description: Customer facing upgrade and downgrade between tiers.
paths:
  /api/plans/{id}/checkout-links:
    post:
      tags:
        - Checkout Links
      summary: Create a checkout link
      description: >-
        Create a checkout link that sells one tier of the plan. The returned url
        is the public entry point that creates a cart and redirects the buyer to
        the customerfront of the sales channel.
      operationId: createPlanCheckoutLink
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 1280792f-4e23-793d-8e9c-3a1bf36630bd
          description: The plan UUID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlanCheckoutLinkInput'
            example:
              planTierId: f5ece259-08ea-77a4-8bd9-9f3a9ed9e246
              couponsAllowed: false
              isEnabled: true
              salesChannel: default
      responses:
        '201':
          description: The created checkout link.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanCheckoutLink'
        '401':
          description: Authentication is missing or the token is invalid.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '403':
          description: The token is valid but lacks the required permission.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '404':
          description: The requested resource does not exist for this Organisation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '409':
          description: >-
            The request conflicts with the current state, for example a
            duplicate plan code or checkout link slug.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '422':
          description: The request failed validation or a business rule was violated.
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - $ref: '#/components/schemas/ProblemError'
components:
  schemas:
    CreatePlanCheckoutLinkInput:
      type: object
      required:
        - planTierId
      properties:
        planTierId:
          type: string
          description: UUID of the tier the checkout link sells. Must belong to this plan.
        slug:
          type: string
          minLength: 3
          maxLength: 64
          pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
          nullable: true
          description: Custom URL slug. When omitted a unique slug is generated.
        couponsAllowed:
          type: boolean
          default: false
          description: Whether buyers may enter a coupon code during checkout.
        isEnabled:
          type: boolean
          default: true
          description: Whether the link is active and reachable.
        salesChannel:
          type: string
          nullable: true
          description: >-
            Sales channel as a UUID or as a technical name such as default. When
            omitted the active channel of the request is used, otherwise the
            Organisation default channel.
    PlanCheckoutLink:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 1280792f-4e23-793d-8e9c-3a1bf36630bd
        slug:
          type: string
          example: pro-plan-pro
        planTierId:
          type: string
        planTierName:
          type: string
          example: Pro
        couponsAllowed:
          type: boolean
        isEnabled:
          type: boolean
        url:
          type: string
          format: uri
          description: Public checkout URL that creates a cart and redirects the buyer.
          example: https://coreapi.io/checkout-link/pro-plan-pro/cart
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        salesChannel:
          $ref: '#/components/schemas/SalesChannelReference'
    ProblemError:
      type: object
      description: >-
        Problem detail error body (application/problem+json). Additional members
        may be present depending on the error.
      properties:
        status:
          type: integer
          example: 404
        type:
          type: string
          description: Stable machine readable error key.
          example: PLAN__NOT_FOUND
        title:
          type: string
          example: An error occurred
        detail:
          type: string
          example: Plan not found.
      required:
        - status
        - type
        - title
        - detail
    ValidationError:
      type: object
      description: >-
        Validation error body (application/problem+json) returned when input
        fails field level validation.
      properties:
        status:
          type: integer
          example: 422
        type:
          type: string
          example: https://tools.ietf.org/html/rfc2616#section-10
        title:
          type: string
          example: Validation Failed
        violations:
          type: array
          items:
            type: object
            properties:
              propertyPath:
                type: string
                example: tiers[0].name
              message:
                type: string
                example: This value should not be blank.
              code:
                type: string
                nullable: true
      required:
        - status
        - type
        - title
        - violations
    SalesChannelReference:
      type: object
      nullable: true
      properties:
        id:
          type: string
        name:
          type: string
          description: Stable technical name of the sales channel.
          example: default
        brandName:
          type: string
          description: Display brand name of the sales channel.
          example: Pro Plan
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      description: >-
        Organisation API token. Send it as Authorization: Bearer api_... The
        token is scoped to a single Organisation.

````