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

# Start an onramp order

> Signs a hosted checkout for the account. The order is visible at `GET /onramp/orders/{orderId}` once the provider first reports it.



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json post /onramp/orders
openapi: 3.1.0
info:
  title: Deposit Service API
  version: 1.0.0
  description: >-
    Rhinestone Deposits API: accept deposits from any chain, asset or payment
    method, and settle them as one token on one chain.
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /onramp/orders:
    post:
      tags:
        - Onramp
      summary: Start an onramp order
      description: >-
        Signs a hosted checkout for the account. The order is visible at `GET
        /onramp/orders/{orderId}` once the provider first reports it.
      parameters:
        - schema:
            type: string
            description: API key for authentication
            example: your-api-key
          required: true
          description: API key for authentication
          name: x-api-key
          in: header
        - schema:
            type: string
            pattern: ^[A-Z]{2}$
            description: >-
              Trusted edge-resolved ISO country. When present it overrides
              body.baseCountry and x-client-ip, and enables country-specific
              payment-method validation.
            example: PH
          required: false
          description: >-
            Trusted edge-resolved ISO country. When present it overrides
            body.baseCountry and x-client-ip, and enables country-specific
            payment-method validation.
          name: x-user-country
          in: header
        - schema:
            type: string
            description: >-
              The end user's IP address as observed by the edge, for edges that
              can name the IP but cannot resolve a country themselves (no local
              GeoIP database). Used only when x-user-country is absent, and
              ignored unless it is a publicly-routable address. Prefer
              x-user-country when your edge already has a country — for example
              Cloudflare's cf-ipcountry — since it needs no lookup here.
            example: 203.0.113.7
          required: false
          description: >-
            The end user's IP address as observed by the edge, for edges that
            can name the IP but cannot resolve a country themselves (no local
            GeoIP database). Used only when x-user-country is absent, and
            ignored unless it is a publicly-routable address. Prefer
            x-user-country when your edge already has a country — for example
            Cloudflare's cf-ipcountry — since it needs no lookup here.
          name: x-client-ip
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOnrampOrderRequest'
      responses:
        '202':
          description: Hosted checkout ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnrampOrderStarted'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Authentication required or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: API key lacks deposits:read, or the account is not yours
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: Internal failure serving the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '503':
          description: Onramp not configured, or a dependency is unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  schemas:
    CreateOnrampOrderRequest:
      oneOf:
        - $ref: '#/components/schemas/SwappedFiatOrderRequest'
        - $ref: '#/components/schemas/SwappedExchangeOrderRequest'
      discriminator:
        propertyName: kind
        mapping:
          fiat:
            $ref: '#/components/schemas/SwappedFiatOrderRequest'
          exchange:
            $ref: '#/components/schemas/SwappedExchangeOrderRequest'
    OnrampOrderStarted:
      type: object
      properties:
        orderId:
          type: string
          format: uuid
        nextAction:
          $ref: '#/components/schemas/HostedNextAction'
        expiresAt:
          type: string
          format: date-time
          description: Start the checkout before this
      required:
        - orderId
        - nextAction
        - expiresAt
      additionalProperties: false
    SwappedFiatOrderRequest:
      type: object
      properties:
        provider:
          type: string
          enum:
            - swapped
        account:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: The registered account to fund
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        kind:
          type: string
          enum:
            - fiat
        email:
          type: string
        baseCountry:
          type: string
          pattern: ^[A-Z]{2}$
          description: ISO-3166-1 alpha-2 country code
          example: US
        baseCurrencyCode:
          type: string
          pattern: ^[A-Z]{3,4}$
          description: ISO fiat currency code
          example: USD
        baseCurrencyAmount:
          type: number
          exclusiveMinimum: 0
        locale:
          type: string
        method:
          type: string
          description: >-
            Optional. Preselects a Swapped payment method (a `payment_group`) in
            the widget — e.g. "creditcard", "apple-pay", "bank-transfer",
            "skrill", "pix", "sepa-bank-transfer". Any Swapped-supported value
            is accepted and forwarded as-is; omit it to let Swapped auto-select
            the best method for the user based on their location and other
            signals. See Swapped's Get Payment Methods endpoint for the full,
            per-region list.
          example: apple-pay
        methodSelectionSource:
          type: string
          enum:
            - personalized
            - fallback
            - configured
          description: >-
            How the caller obtained `method`. Use `personalized` only for a
            method rendered from the regional payment-method response; with a
            trusted `x-user-country`, this opts into strict catalog validation.
            `fallback`, `configured`, and omission preserve the legacy
            exact-method pass-through behavior.
          example: personalized
      required:
        - provider
        - account
        - kind
      additionalProperties: false
    SwappedExchangeOrderRequest:
      type: object
      properties:
        provider:
          type: string
          enum:
            - swapped
        account:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: The registered account to fund
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        kind:
          type: string
          enum:
            - exchange
        baseCountry:
          type: string
          pattern: ^[A-Z]{2}$
          description: ISO-3166-1 alpha-2 country code
          example: US
        baseCurrencyCode:
          type: string
          pattern: ^[A-Z]{3,4}$
          description: ISO fiat currency code
          example: USD
        locale:
          type: string
        connection:
          type: string
        connections:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 64
          minItems: 1
          maxItems: 26
          example:
            - coinbase
            - kraken
        merchantName:
          type: string
          maxLength: 64
          description: >-
            Optional. Overrides the merchant name Swapped Connect shows on its
            confirm screen — both the "To:" row and its tooltip ("Funds will be
            delivered to your <name> wallet."). Omit it to inherit the
            Rhinestone default. Send it raw; the service URL-encodes it.
          example: Superform
        merchantLogoUrl:
          type: string
          maxLength: 2048
          format: uri
          description: >-
            Optional. Publicly accessible HTTPS URL of the merchant's logo,
            shown beside `merchantName` on the Swapped Connect confirm screen.
            PNG or SVG recommended. Send it raw; the service URL-encodes it.
          example: https://cdn.example.com/logo.svg
      required:
        - provider
        - account
        - kind
      additionalProperties: false
    HostedNextAction:
      type: object
      properties:
        type:
          type: string
          enum:
            - hosted
        url:
          type: string
          format: uri
        presentation:
          type: string
          enum:
            - iframe
      required:
        - type
        - url
        - presentation
      additionalProperties: false

````