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

# Create Onramp Session

> Create a headless Stripe embedded onramp session from a server-held onramp intent using the server-held Link OAuth access token. If Stripe identity or KYC action is required, this endpoint returns 422 with action fields in error.details, including status, reason, kyc_next_step, kyc_status, kyc_required, identity_verification_required, and identity_verification_status.



## OpenAPI

````yaml https://api.coinvoyage.io/v3/openapi.json post /onramp/intents/{intent_id}/session
openapi: 3.1.0
info:
  title: CoinVoyage API (v3)
  description: >-
    CoinVoyage v3 payment API. Unified Intent envelope, snake_case money via the
    Amount shape, and a single SHA-256 signature scheme.
  version: 3.0.0
servers:
  - url: https://api.coinvoyage.io/v3
security: []
paths:
  /onramp/intents/{intent_id}/session:
    post:
      tags:
        - onramp
      summary: Create Onramp Session
      description: >-
        Create a headless Stripe embedded onramp session from a server-held
        onramp intent using the server-held Link OAuth access token. If Stripe
        identity or KYC action is required, this endpoint returns 422 with
        action fields in error.details, including status, reason, kyc_next_step,
        kyc_status, kyc_required, identity_verification_required, and
        identity_verification_status.
      operationId: createStripeOnrampSessionFromIntent
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-KEY
          required: true
          schema:
            type: string
        - in: path
          name: intent_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampSessionRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampSessionResponse'
          description: Headless onramp session created
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Onramp intent not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >-
            Invalid request body, unsupported onramp destination, or Stripe
            identity/KYC action required
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Failed to create onramp session
      security:
        - APIKeyHeader: []
components:
  schemas:
    OnrampSessionRequest:
      additionalProperties: false
      properties:
        auth_intent_id:
          description: Stripe Link auth intent ID returned by /onramp/auth/intent
          example: lai_test_123
          type: string
        crypto_customer_id:
          description: >-
            Crypto customer ID returned by the Stripe embedded component after
            Link authentication
          example: ccus_test_123
          type: string
        payment_token:
          description: >-
            cryptoPaymentToken returned by the Stripe embedded component payment
            method collection step
          example: cpt_test_123
          type: string
      required:
        - auth_intent_id
        - crypto_customer_id
        - payment_token
      type: object
    OnrampSessionResponse:
      properties:
        id:
          type: string
        quote_expires_at:
          type:
            - integer
            - 'null'
      required:
        - id
      type: object
    ErrorResponse:
      example:
        code: 400
        error: Bad Request
        message: Invalid request parameters
      properties:
        error:
          example: Bad Request
          type: string
        message:
          example: Invalid request parameters
          type: string
        code:
          example: 400
          format: int64
          type: integer
        details:
          anyOf:
            - type: string
            - type: number
            - type: object
      required:
        - error
        - message
        - code
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````