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

# Mint a tokenization intent for client-side Basis Theory sessions

> Server-side only. Returns a short-lived bearer token (`tokintent_...`) the browser passes to `POST /tokenization/sessions` instead of a checkout session token. Requires a merchant↔customer link.



## OpenAPI

````yaml /openapi.json post /tokenization/intents
openapi: 3.0.0
info:
  title: PayGood Merchant API
  description: Server-to-server integration surface for merchant API keys.
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.paygood.co
    description: Sandbox
  - url: https://api.paygood.co
    description: Production
security: []
paths:
  /tokenization/intents:
    post:
      tags:
        - tokenization
      summary: Mint a tokenization intent for client-side Basis Theory sessions
      description: >-
        Server-side only. Returns a short-lived bearer token (`tokintent_...`)
        the browser passes to `POST /tokenization/sessions` instead of a
        checkout session token. Requires a merchant↔customer link.
      operationId: TokenizationIntentsController_create
      parameters: []
      requestBody:
        required: true
        description: Customer to tokenize a payment instrument for.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenizationIntentDto'
            examples:
              embedSaveCard:
                summary: Save-card embed flow
                value:
                  customerId: cust_01hxy8m1nqk9g3x3y3p0azq2zz
      responses:
        '201':
          description: >-
            Intent minted. Pass `token` as the Bearer token on `POST
            /tokenization/sessions`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenizationIntentResponseDto'
        '401':
          description: Missing or invalid merchant API key or member session.
        '404':
          description: Customer is not linked to the authenticated merchant.
      security:
        - bearer: []
components:
  schemas:
    CreateTokenizationIntentDto:
      type: object
      properties:
        customerId:
          type: string
      required:
        - customerId
    CreateTokenizationIntentResponseDto:
      type: object
      properties:
        intentId:
          type: string
        token:
          type: string
          minLength: 1
        expiresAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - intentId
        - token
        - expiresAt
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: merchant_<prefix>_<secret>
      type: http
      description: >-
        Merchant API key bearer token. Legacy wire prefixes `api_key_` and
        `api_` are also accepted.

````