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

# Mint a signed Swapped Connect URL (CEX funding)

> Returns a signed Swapped Connect URL the modal embeds in an iframe so the user can fund from a centralized exchange. Current callers send the exact picker rate as acceptedExchangeFeeBps; omission preserves legacy fee-free delivery, while a stale rate returns 409 before any URL or session state is minted. Requires a configured public webhook callback URL.



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json post /onramp/swapped/connect-url
openapi: 3.1.0
info:
  title: Deposit Service API
  version: 1.0.0
  description: >-
    Cross-chain deposit processing service with automatic token bridging and gas
    sponsorship
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /onramp/swapped/connect-url:
    post:
      tags:
        - Onramp
      summary: Mint a signed Swapped Connect URL (CEX funding)
      description: >-
        Returns a signed Swapped Connect URL the modal embeds in an iframe so
        the user can fund from a centralized exchange. Current callers send the
        exact picker rate as acceptedExchangeFeeBps; omission preserves legacy
        fee-free delivery, while a stale rate returns 409 before any URL or
        session state is minted. Requires a configured public webhook callback
        URL.
      parameters:
        - schema:
            type: string
            description: API key for authentication (omit when sending Authorization)
            example: your-api-key
          required: false
          description: API key for authentication (omit when sending Authorization)
          name: x-api-key
          in: header
        - schema:
            type: string
            description: >-
              Bearer platform token (e.g. forwarded by user-service). Takes
              precedence over `x-api-key` when both are present.
            example: Bearer eyJhbGciOi...
          required: false
          description: >-
            Bearer platform token (e.g. forwarded by user-service). Takes
            precedence over `x-api-key` when both are present.
          name: authorization
          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:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwappedConnectUrlRequestBody'
      responses:
        '200':
          description: Signed Connect URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwappedUrlResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required or invalid credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            API key lacks the required deposits scope, or the account is not
            registered to the calling project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            The Exchange Fee changed after the caller loaded the picker; the
            returned rate must be disclosed and accepted before retrying
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwappedExchangeFeeChangedResponse'
        '500':
          description: Server misconfigured or signing failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Swapped on-ramp is not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SwappedConnectUrlRequestBody:
      type: object
      properties:
        smartAccount:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        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
        acceptedExchangeFeeBps:
          type: integer
          minimum: 0
          maximum: 10000
      required:
        - smartAccount
    SwappedUrlResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
        url:
          type: string
        currencyCode:
          type: string
        sandbox:
          type: boolean
        externalCustomerId:
          type: string
        expiresAt:
          type: string
        exchangeFeeBps:
          type: integer
          minimum: 0
      required:
        - ok
        - url
        - currencyCode
        - sandbox
        - externalCustomerId
        - expiresAt
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              code:
                type: string
            required:
              - message
      required:
        - error
    SwappedExchangeFeeChangedResponse:
      type: object
      properties:
        error:
          type: string
        exchangeFeeBps:
          type: integer
          minimum: 0
          maximum: 10000
      required:
        - error
        - exchangeFeeBps

````