> ## 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 Intent

> Create a reusable onramp intent. For Orders, amount, destination currency, and wallet fields are derived server-side from the Order and cannot be overridden by the client.



## OpenAPI

````yaml https://api.coinvoyage.io/v3/openapi.json post /onramp/intents
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:
    post:
      tags:
        - onramp
      summary: Create Onramp Intent
      description: >-
        Create a reusable onramp intent. For Orders, amount, destination
        currency, and wallet fields are derived server-side from the Order and
        cannot be overridden by the client.
      operationId: createStripeOnrampIntent
      parameters:
        - description: API key for authentication
          in: header
          name: X-API-KEY
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnrampIntentRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampIntentResponse'
          description: Onramp intent created
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Card payments are not enabled
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Order not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request body or unsupported onramp destination
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Failed to create Stripe onramp intent
      security:
        - APIKeyHeader: []
components:
  schemas:
    OnrampIntentRequest:
      example:
        destination_amount: '100.00'
        destination_currency:
          address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          chain_id: 30000000000001
        order_id: cuidjkhg3e289y74u5t6v123
        source_amount: '125.00'
        source_currency: usd
        wallet_address: 0xabc123...
      properties:
        order_id:
          description: >-
            CoinVoyage Order ID. When set, amount, currency, and wallet fields
            are derived server-side and must not be included.
          example: cuidjkhg3e289y74u5t6v123
          type: string
        destination_amount:
          description: >-
            Crypto destination amount for a standalone onramp intent. Mutually
            exclusive with source_amount.
          example: '100.00'
          type: string
        destination_currency:
          $ref: '#/components/schemas/CurrencyBase'
          description: >-
            CoinVoyage destination currency. Use chain_id to select the
            destination chain and address to select a token; omit address for
            native assets where supported.
        source_amount:
          description: >-
            Fiat source amount for a standalone onramp intent. Mutually
            exclusive with destination_amount.
          example: '125.00'
          type: string
        source_currency:
          $ref: '#/components/schemas/StripeOnrampCurrency'
          example: usd
        wallet_address:
          example: 0xabc123...
          type: string
      required:
        - destination_currency
      type: object
    OnrampIntentResponse:
      example:
        destination_currency:
          address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          chain_id: 30000000000001
        expires_at: '2024-01-01T00:00:00Z'
        id: oi_123456789
        order_id: cuidjkhg3e289y74u5t6v123
        session_id: cos_test_123
        source_amount: '125.00'
        source_currency: usd
        status: requires_link_auth
        stripe_publishable_key: pk_test_123
        wallet_address: 0xabc123...
      properties:
        id:
          example: oi_123456789
          type: string
        order_id:
          example: cuidjkhg3e289y74u5t6v123
          type: string
        session_id:
          example: cos_test_123
          type: string
        status:
          $ref: '#/components/schemas/OnrampIntentStatus'
          example: requires_link_auth
        source_amount:
          example: '125.00'
          type: string
        source_currency:
          $ref: '#/components/schemas/StripeOnrampCurrency'
          example: usd
        stripe_publishable_key:
          example: pk_test_123
          type: string
        destination_amount:
          type: string
        destination_currency:
          $ref: '#/components/schemas/CurrencyBase'
        wallet_address:
          example: 0xabc123...
          type: string
        expires_at:
          example: '2024-01-01T00:00:00Z'
          format: date-time
          type: string
      required:
        - id
        - status
        - source_currency
        - stripe_publishable_key
        - destination_currency
        - wallet_address
        - expires_at
      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
    CurrencyBase:
      example:
        address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
        chain_id: 30000000000001
      properties:
        address:
          example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          type:
            - string
            - 'null'
        chain_id:
          $ref: '#/components/schemas/ChainID'
          example: 30000000000001
      required:
        - chain_id
      type: object
    StripeOnrampCurrency:
      description: Fiat source currency for Stripe embedded onramp intents
      enum:
        - usd
        - eur
      type: string
    OnrampIntentStatus:
      enum:
        - requires_link_auth
        - requires_kyc
        - requires_identity_verification
        - requires_document_verification
        - identity_verification_pending
        - session_created
      type: string
    ChainID:
      enum:
        - 1
        - 10
        - 56
        - 137
        - 8453
        - 42161
        - 20000000000001
        - 30000000000001
        - 30000000000002
      example: 1
      format: int64
      type: integer
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-KEY
      type: apiKey

````