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

# Create Onramp Order

> This endpoint is used to initiate an onramp transaction, converting fiat to crypto and delivering the crypto to a destination wallet.



## OpenAPI

````yaml /api_reference/onramp.yaml post /onramp
openapi: 3.0.3
info:
  version: '1.0'
  title: Crypto API
  description: Reference for Sardine Crypto API
  contact:
    email: support@sardine.io
    name: Sardine
    url: docs.sardine.io
servers:
  - url: https://api.sandbox.sardine.ai/v1
    description: Sandbox
  - url: https://api.sardine.ai/v1
    description: Prod Server
security: []
paths:
  /onramp:
    post:
      tags:
        - Order Execution
      summary: Create Onramp Order
      description: >-
        This endpoint is used to initiate an onramp transaction, converting fiat
        to crypto and delivering the crypto to a destination wallet.
      operationId: create-onramp-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - userId
                - fromCurrency
                - toCurrency
                - amount
                - chain
                - paymentMethodId
                - depositAddress
              properties:
                userId:
                  type: string
                  description: ID of the user placing the onramp order
                fromCurrency:
                  type: string
                  description: The fiat currency the user is paying with (e.g., USD)
                toCurrency:
                  type: string
                  description: The cryptocurrency to be delivered (e.g., ETH)
                amount:
                  type: number
                  description: Amount in fiat currency to convert
                chain:
                  type: string
                  description: Blockchain network to use (e.g., ethereum, polygon)
                paymentMethodId:
                  type: string
                  description: ID of the user's selected payment method
                depositAddress:
                  type: string
                  description: Wallet address where the crypto will be delivered
            examples:
              example-1:
                value:
                  userId: abc123
                  fromCurrency: USD
                  toCurrency: ETH
                  amount: 100
                  chain: ethereum
                  paymentMethodId: pay-987654321
                  depositAddress: 0xabc123def456ghi789jkl000mno111pqrs222tuv
      responses:
        '200':
          description: Onramp order successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    description: Unique identifier for the onramp order
                  status:
                    type: string
                    description: Current status of the order (e.g., pending, completed)
                  estimatedDelivery:
                    type: string
                    format: date-time
                    description: Estimated delivery time for crypto
              examples:
                example-1:
                  value:
                    orderId: ONR-20250417-001
                    status: pending
                    estimatedDelivery: '2025-04-17T15:45:00Z'

````