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

# Create Checkout SDK Token

> Generates a short-lived, tamper-proof checkout token for initializing Paywint Inline Checkout.

This endpoint performs the following actions:
- Authenticates the developer using `X-Api-Key` and `X-Api-Secret`
- Resolves or creates a per-initiator signing secret
- Issues a signed checkout token embedding initiator and payer context
- Returns the token and its expiry for use by the frontend SDK

The returned token must be supplied on all SDK-facing calls as:



## OpenAPI

````yaml POST /api/checkout/token/developer
openapi: 3.1.0
info:
  title: paywint
  version: 0.1.0
servers:
  - url: https://api.sandbox.paywint.com
  - url: https://api.paywint.com
security: []
paths:
  /api/checkout/token/developer:
    post:
      tags:
        - Inline Checkout
      summary: Generate Checkout Token (Developer)
      description: >-
        Generates a short-lived, tamper-proof checkout token for initializing
        Paywint Inline Checkout.


        This endpoint performs the following actions:

        - Authenticates the developer using `X-Api-Key` and `X-Api-Secret`

        - Resolves or creates a per-initiator signing secret

        - Issues a signed checkout token embedding initiator and payer context

        - Returns the token and its expiry for use by the frontend SDK


        The returned token must be supplied on all SDK-facing calls as:
      operationId: create_developer_checkout_token_api_checkout_token_developer_post
      parameters:
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
            description: >-
              Your API Key (UUID format). Required to identify and authorize
              each request
            title: X-Api-Key
          description: >-
            Your API Key (UUID format). Required to identify and authorize each
            request
        - name: X-Api-Secret
          in: header
          required: true
          schema:
            type: string
            description: >-
              Secret associated with your API Key. Used for authenticating
              requests. Keep this secure.
            title: X-Api-Secret
          description: >-
            Secret associated with your API Key. Used for authenticating
            requests. Keep this secure.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutDeveloperTokenCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse_CheckoutTokenResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CheckoutDeveloperTokenCreateRequest:
      properties:
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
          description: Payer email address. Provide this OR phone+phone_country_code.
          example: jane@example.com
        phone:
          anyOf:
            - type: string
              maxLength: 20
              minLength: 5
            - type: 'null'
          title: Phone
          description: >-
            Payer phone number (digits only, no country code). Required if email
            is not provided.
          example: '5550001234'
        phone_country_code:
          anyOf:
            - type: string
              maxLength: 10
              minLength: 1
            - type: 'null'
          title: Phone Country Code
          description: Phone country code (e.g. +1). Required if phone is provided.
          example: '+1'
        amount:
          type: number
          maximum: 100000
          exclusiveMinimum: 0
          title: Amount
          description: Payment amount (canonical).
        currency:
          type: string
          maxLength: 10
          minLength: 3
          title: Currency
          description: Payment currency code (canonical).
          default: USD
      type: object
      required:
        - amount
      title: CheckoutDeveloperTokenCreateRequest
      description: >-
        Token generation request for Inline Checkout (developer initiator).


        Notes

        The developer passes the payer's email OR phone+phone_country_code.

        The backend resolves or creates the payer user (platform_id=1) and
        issues the token.
    CommonResponse_CheckoutTokenResponse_:
      properties:
        success:
          type: boolean
          title: Success
          description: Indicates whether the request was processed successfully.
          default: true
          example: true
        message:
          type: string
          title: Message
          description: >-
            A short, human-readable message describing the result of the
            request.
          default: Success
          example: Operation completed.
        data:
          anyOf:
            - $ref: '#/components/schemas/CheckoutTokenResponse'
            - type: 'null'
          description: The main response payload, if applicable
        queryGeneratedTime:
          anyOf:
            - type: number
            - type: 'null'
          title: Querygeneratedtime
          description: >-
            The Unix timestamp (in seconds) indicating when the response was
            generated.
          default: 1778161546.973489
          example: 1718006400
      type: object
      title: CommonResponse[CheckoutTokenResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CheckoutTokenResponse:
      properties:
        checkout_token:
          type: string
          title: Checkout Token
          description: Signed Inline Checkout token.
        expires_at:
          type: string
          format: date-time
          title: Expires At
          description: Token expiration timestamp (UTC).
      type: object
      required:
        - checkout_token
        - expires_at
      title: CheckoutTokenResponse
      description: Checkout token response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````