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

# Open a Stripe Link auth intent

> Start Link authentication for a buyer's email.

Starts Link authentication for a buyer's email. Hand the returned id to the
client SDK's `authenticate(...)`, then exchange the consented intent at
[Exchange an auth intent for tokens](/api/stripe/tokens).


## OpenAPI

````yaml api/openapi.json POST /v1/stripe/auth-intent
openapi: 3.1.0
info:
  description: Fiat-to-USDC onramp API. The URL prefix (`/v1`) is the version contract.
  license:
    identifier: LicenseRef-Proprietary
    name: Proprietary
  title: Calm API
  version: v1
servers:
  - description: Production
    url: https://api.calmtreasury.xyz
  - description: Sandbox
    url: https://api.sandbox.calmtreasury.xyz
security: []
paths:
  /v1/stripe/auth-intent:
    post:
      summary: Open a Stripe Link auth intent
      description: >-
        Opens a Link OAuth intent for the buyer's email and returns its id
        (handed to the client SDK's `authenticate(...)`) plus its expiry.
      operationId: createStripeAuthIntent
      requestBody:
        content:
          application/json:
            schema:
              properties:
                email:
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  type: string
                wallet:
                  pattern: ^0x[a-fA-F0-9]{40}$
                  type: string
              required:
                - wallet
                - email
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  auth_intent_id:
                    type: string
                  expires_at:
                    type: number
                required:
                  - auth_intent_id
                  - expires_at
                type: object
          description: The opened auth intent.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Request — `error.code` includes: publishable_key_missing,
            validation_error.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Unauthorized — `error.code` includes: invalid_publishable_key.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Forbidden — `error.code` includes: origin_not_allowed.'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Not Found — `error.code` includes: link_not_found.'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Too Many Requests — `error.code` includes: rate_limited.'
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Gateway — an upstream dependency failed; the body carries the
            standard error envelope with a cause-specific `error.code`.
      security:
        - publishableKey: []
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    publishableKey:
      description: Publishable key identifying the calling app.
      in: header
      name: x-calm-publishable-key
      type: apiKey

````