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

# Get an offramp order

> By the order `id`. A customer bearer reads that customer's orders; an API key with `deposits:read`, the project's.



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json get /offramp/orders/{id}
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:
  /offramp/orders/{id}:
    get:
      tags:
        - Offramp
      summary: Get an offramp order
      description: >-
        By the order `id`. A customer bearer reads that customer's orders; an
        API key with `deposits:read`, the project's.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: 'Integrator API key: the project’s orders'
          required: false
          description: 'Integrator API key: the project’s orders'
          name: x-api-key
          in: header
        - schema:
            type: string
            description: >-
              Customer bearer from `POST /compliance/sessions`, or a
              project-scoped platform bearer where the route permits tenant
              access
            example: Bearer eyJhbGciOi...
          required: false
          description: >-
            Customer bearer from `POST /compliance/sessions`, or a
            project-scoped platform bearer where the route permits tenant access
          name: authorization
          in: header
      responses:
        '200':
          description: The order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfframpOrder'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
        '403':
          description: >-
            The bearer no longer matches its customer, or the API key lacks
            `deposits:read`
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
        '404':
          description: No such order
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
        '500':
          description: Internal failure serving the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
        '503':
          description: The customer could not be read; retry
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - VERIFICATION_REQUIRED
                      - PROVIDER_UNAVAILABLE
                      - PROVIDER_REJECTED
                      - PROVIDER_FORBIDDEN
                      - READ_ONLY_SESSION
                    description: >-
                      VERIFICATION_REQUIRED: the customer must resume hosted
                      verification for this currency, then retry.
                      PROVIDER_UNAVAILABLE (502): the provider did not answer;
                      retry. PROVIDER_REJECTED (502): the provider refused the
                      request; `providerError` says what, and retrying it
                      unchanged fails again. PROVIDER_FORBIDDEN (403): the
                      provider will not serve this customer. READ_ONLY_SESSION
                      (403): the customer bearer came from a `resumeOnly`
                      session, which can only read; mint a session without
                      `resumeOnly` to make changes
                  providerError:
                    $ref: '#/components/schemas/ProviderError'
                required:
                  - error
      security:
        - tenantApiKey: []
        - internalProjectBearer: []
        - complianceSessionBearer: []
components:
  schemas:
    OfframpOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        provider:
          type: string
          enum:
            - noah
            - swapped
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - refunded
        terminal:
          type: boolean
          description: No stage will change again
        stages:
          type: object
          properties:
            receipt:
              $ref: '#/components/schemas/OnrampReceiptStage'
            conversion:
              $ref: '#/components/schemas/OnrampConversionStage'
            delivery:
              $ref: '#/components/schemas/OfframpPayoutStage'
            return:
              $ref: '#/components/schemas/OnrampReturnStage'
          required:
            - receipt
            - conversion
            - delivery
            - return
          additionalProperties: false
        rail:
          oneOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - fiat
                method:
                  type: string
              required:
                - kind
                - method
              additionalProperties: false
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - exchange
                connection:
                  type: string
              required:
                - kind
                - connection
              additionalProperties: false
          description: '`provider_selected` / `unknown` when the provider did not say'
        fiat:
          type: object
          properties:
            charged:
              type:
                - object
                - 'null'
              properties:
                total:
                  type:
                    - string
                    - 'null'
                  description: The sale, fees included; null when not stated
                net:
                  type:
                    - string
                    - 'null'
                  description: What the bank receives, after fees
                currency:
                  type: string
              required:
                - total
                - net
                - currency
              additionalProperties: false
              description: The payout, in the currency the bank receives
            eur:
              type:
                - object
                - 'null'
              properties:
                total:
                  type:
                    - string
                    - 'null'
                  description: The sale, fees included; null when not stated
                net:
                  type:
                    - string
                    - 'null'
                  description: What the bank receives, after fees
              required:
                - total
                - net
              additionalProperties: false
            usd:
              type:
                - object
                - 'null'
              properties:
                total:
                  type:
                    - string
                    - 'null'
                  description: The sale, fees included; null when not stated
                net:
                  type:
                    - string
                    - 'null'
                  description: What the bank receives, after fees
              required:
                - total
                - net
              additionalProperties: false
          required:
            - charged
            - eur
            - usd
          additionalProperties: false
          description: >-
            What the bank receives, after fees; null until the provider states
            it
        crypto:
          type:
            - object
            - 'null'
          properties:
            asset:
              type: string
            network:
              type: string
            amount:
              type: string
          required:
            - asset
            - network
            - amount
          additionalProperties: false
        providerStatus:
          type: string
          description: >-
            The provider’s own status of its latest leg, else ours (`reserved`,
            `opened`, `refused`, `unknown`, `expired`); informational
        createdAt:
          type: string
          format: date-time
          description: When the provider says the order began
        updatedAt:
          type: string
          format: date-time
        sender:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            The address the provider takes the crypto from: `source.address`, or
            the withdrawal account it pays into
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        payment:
          anyOf:
            - $ref: '#/components/schemas/OfframpPayment'
            - type: 'null'
          description: >-
            Null until the provider’s rule exists: while it is being created, or
            when the rule was refused or its outcome is unknown; through a
            withdrawal account, also until its funding is configured. A `direct`
            payment is still served after `expiresAt`, until the order expires
            30 minutes later and reads `failed` (`expired`), not terminal: the
            provider may still match a late transfer. A `withdrawal_account`
            payment is null again once a transfer can no longer fund the order:
            one already did, the order moved past `pending`, or 30 minutes
            passed after `expiresAt`.
        expiresAt:
          type: string
          format: date-time
          description: Send the payment before this
      required:
        - id
        - provider
        - status
        - terminal
        - stages
        - rail
        - fiat
        - crypto
        - providerStatus
        - createdAt
        - updatedAt
        - sender
        - payment
        - expiresAt
      additionalProperties: false
    ProviderError:
      type: object
      properties:
        provider:
          type: string
        status:
          type:
            - integer
            - 'null'
          description: >-
            The provider’s HTTP status; null when it answered outside its
            contract
        type:
          type:
            - string
            - 'null'
          description: The provider’s error category, e.g. `InvalidMessage`
        fields:
          type: array
          items:
            type: object
            properties:
              path:
                type:
                  - string
                  - 'null'
                description: >-
                  The provider’s request path, e.g.
                  `Form.BankDetails.AccountNumber`; null when it names no field
                  we send
              reason:
                type:
                  - string
                  - 'null'
                description: >-
                  e.g. `SchemaValidation`, `NotSupported`; null when
                  unrecognised
            required:
              - path
              - reason
            additionalProperties: false
          description: Request fields the provider refused
        reference:
          type:
            - string
            - 'null'
          description: 'The provider’s id for this failure: quote it to its support'
      required:
        - provider
        - status
        - type
        - fields
        - reference
      additionalProperties: false
      description: 'PROVIDER_REJECTED and PROVIDER_FORBIDDEN: what the provider refused'
    OnrampReceiptStage:
      oneOf:
        - type: object
          properties:
            status:
              type: string
              enum:
                - not_started
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - pending
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - on_hold
            reason:
              type: string
              enum:
                - kyc_required
                - rfi_open
                - review
          required:
            - status
            - reason
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - processing
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - completed
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - failed
            reason:
              type: string
              enum:
                - cancelled
                - declined
                - expired
                - provider_error
          required:
            - status
            - reason
          additionalProperties: false
    OnrampConversionStage:
      oneOf:
        - type: object
          properties:
            status:
              type: string
              enum:
                - not_started
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - processing
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - on_hold
            reason:
              type: string
              enum:
                - rfi_open
                - review
          required:
            - status
            - reason
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - completed
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - failed
            reason:
              type: string
              enum:
                - sub_fee
                - provider_error
          required:
            - status
            - reason
          additionalProperties: false
    OfframpPayoutStage:
      oneOf:
        - type: object
          properties:
            status:
              type: string
              enum:
                - not_started
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - pending
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - on_hold
            reason:
              type: string
              enum:
                - rfi_open
                - review
          required:
            - status
            - reason
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - processing
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - submitted
          required:
            - status
          additionalProperties: false
          description: The provider sent the payment to the bank
        - type: object
          properties:
            status:
              type: string
              enum:
                - completed
          required:
            - status
          additionalProperties: false
          description: The bank accepted the payment
        - type: object
          properties:
            status:
              type: string
              enum:
                - failed
            reason:
              type: string
              enum:
                - sub_fee
                - provider_error
              description: '`sub_fee`: the fees took the whole amount'
          required:
            - status
            - reason
          additionalProperties: false
      description: The fiat payout to the bank
    OnrampReturnStage:
      oneOf:
        - type: object
          properties:
            status:
              type: string
              enum:
                - none
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - pending
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - processing
          required:
            - status
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - completed
            outcome:
              type: string
              enum:
                - full_refund
                - adjustment
                - unresolved
          required:
            - status
            - outcome
          additionalProperties: false
        - type: object
          properties:
            status:
              type: string
              enum:
                - failed
          required:
            - status
          additionalProperties: false
    OfframpPayment:
      oneOf:
        - $ref: '#/components/schemas/OfframpDirectPayment'
        - $ref: '#/components/schemas/OfframpWithdrawalAccountPayment'
      discriminator:
        propertyName: kind
        mapping:
          direct: '#/components/schemas/OfframpDirectPayment'
          withdrawal_account: '#/components/schemas/OfframpWithdrawalAccountPayment'
      description: >-
        How to pay the order, by `kind`: `direct` from a source on the
        provider’s chain and token, `withdrawal_account` from any other
    OfframpDirectPayment:
      type: object
      properties:
        kind:
          type: string
          enum:
            - direct
        from:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: 'The sender: an EOA, or the smart account executing the transfer'
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        to:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        chain:
          type: string
          description: CAIP-2
        token:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        amount:
          type: string
          pattern: ^\d+$
          description: 'Exact, in base units of `token`: the value of the ERC-20 transfer'
          example: '100000000'
      required:
        - kind
        - from
        - to
        - chain
        - token
        - amount
      additionalProperties: false
      description: >-
        Send exactly `amount` of `token` on `chain` from `from` to `to`, as a
        direct ERC-20 transfer whose sender is `from` (an EOA, or the smart
        account executing it). A different amount or sender is not matched and
        stays with the provider until recovery.
    OfframpWithdrawalAccountPayment:
      type: object
      properties:
        kind:
          type: string
          enum:
            - withdrawal_account
        from:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            `source.address`: an EOA, or the smart account executing the
            transfer
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        to:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: The customer’s withdrawal account
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        chain:
          type: string
          description: 'CAIP-2: `source.chain`'
        token:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: '`source.token`'
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        amount:
          type: string
          pattern: ^\d+$
          description: >-
            Exact, in base units of `token`: the value of the transfer. Quoted
            to deliver the order’s amount of the provider’s token on the
            cheapest route, plus a margin for the fees the customer pays (or,
            for another asset, 1% for its price); may be a few base units higher
            when another open withdrawal from this source holds it
          example: '100000000'
      required:
        - kind
        - from
        - to
        - chain
        - token
        - amount
      additionalProperties: false
      description: >-
        Send exactly `amount` of `token` on `chain` from `from` to `to`, the
        customer’s withdrawal account, after the order opens and before
        `expiresAt`; we pay the provider from it, and what the payment does not
        spend stays there for an operator. A different amount or sender, or a
        transfer mined more than 30 minutes after `expiresAt`, is not matched:
        it stays on the account until an operator refunds it.
  securitySchemes:
    tenantApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Integrator API key for tenant API requests.
    internalProjectBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Project-scoped platform bearer for tenant API requests. This API does
        not issue platform tokens.
    complianceSessionBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Required 15-minute customer-scoped browser session from POST
        /compliance/sessions. Application keys are not accepted.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.