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

# Mock a transaction

> Creates a new fiat transaction directly from an autoramp configuration for testing purposes.
This bypasses the normal deposit flow and creates a ramp transaction with the specified amount
using the autoramp's configuration (customer, recipient, currencies, etc.).



## OpenAPI

````yaml /spec.yaml post /sandbox/transaction
openapi: 3.1.0
info:
  description: The Stablecoin Payment Network
  title: Iron API - Sandbox
  version: 1.0-17078
servers:
  - url: https://api.sandbox.iron.xyz/api
security: []
tags:
  - description: >-
      Wallet and bank account registration


      Every wallet address that interacts with Iron must be registered (linked)
      to a customer **before** it can be used in any flow — onramp, offramp, or
      swap. This is a regulatory requirement under the **Travel Rule**, which
      obliges Virtual Asset Service Providers to exchange originator and
      beneficiary information for crypto transfers.


      Iron supports two wallet types:


      - **Self-hosted wallets** — the customer controls the private key.
      Registration requires a signed proof-of-ownership message.

      - **Hosted wallets** — the wallet is custodied by another VASP (e.g.
      Coinbase, Kraken). Registration requires the VASP's DID so Iron can
      exchange travel-rule data with the custodian.


      Similarly, fiat bank accounts must be registered before they can receive
      offramp payouts.
    name: Addresses
  - description: Operations on Autoramp
    name: Autoramp
  - description: Operations on Chronicle collateral
    name: ChronicleCollateral
  - description: Operations on Currencies
    name: Currencies
  - description: Operations on Customers
    name: Customer
  - description: Operations on Exchange Rate
    name: ExchangeRate
  - description: Operations on Fee Profiles
    name: FeeProfiles
  - description: Operations for Sandbox Testing
    name: Sandbox
  - description: Operations on SSE
    name: Sse
  - description: Operations on Terms and Conditions
    name: TermsAndConditions
  - description: Operations on Webhooks
    name: Webhooks
paths:
  /sandbox/transaction:
    post:
      tags:
        - Sandbox
      summary: Mock a transaction
      description: >-
        Creates a new fiat transaction directly from an autoramp configuration
        for testing purposes.

        This bypasses the normal deposit flow and creates a ramp transaction
        with the specified amount

        using the autoramp's configuration (customer, recipient, currencies,
        etc.).
      operationId: createSandboxTransaction
      parameters:
        - deprecated: false
          description: a UUID ensuring a Ramp Transaction operation is only processed once
          explode: true
          in: header
          name: IDEMPOTENCY-KEY
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/XApiVersion'
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: '#/components/schemas/CreateSandboxTransactionParams'
        description: Parameters required to create a new sandbox ramp transaction
        required: true
      responses:
        '201':
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/SandboxSandboxTransaction'
          description: ''
        '400':
          content:
            application/json; charset=utf-8:
              schema:
                type: string
          description: ''
        '401':
          content:
            application/json; charset=utf-8:
              schema:
                type: string
          description: ''
        '404':
          content:
            application/json; charset=utf-8:
              schema:
                type: string
          description: ''
        '500':
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  parameters:
    XApiVersion:
      description: >-
        Selects the API version for this request, as an ISO date (`YYYY-MM-DD`).
        Omit to use the default version (`2025-03-13`). Supported versions:
        2025-03-13, 2026-07-01.
      in: header
      name: X-API-Version
      required: false
      schema:
        type: string
  schemas:
    CreateSandboxTransactionParams:
      properties:
        amount:
          description: The amount to deposit (in the autoramp's input currency)
          format: decimal
          type: string
        amount_out:
          description: >-
            Optional: Specify the output amount directly (if not provided,
            calculated from amount, fee, and fx_rate)
          format: decimal
          type: string
        autoramp_id:
          description: The autoramp ID to use for the transaction
          format: uuid
          type: string
        deposit_id:
          description: >-
            Optional: Specify a deterministic deposit ID instead of generating
            one
          format: uuid
          type: string
        fee:
          description: 'Optional: Specify the fee amount (defaults to 0.25% of amount)'
          format: decimal
          type: string
        fx_rate:
          description: 'Optional: Specify the exchange rate (defaults to 1.0)'
          format: decimal
          type: string
        initial_state:
          $ref: '#/components/schemas/SandboxTransactionState'
        input_currency:
          $ref: '#/components/schemas/Currency'
        source:
          $ref: '#/components/schemas/RampTransactionSource'
        transaction_id:
          description: >-
            Optional: Specify a deterministic transaction ID instead of
            generating one
          format: uuid
          type: string
      required:
        - autoramp_id
        - amount
      title: CreateSandboxTransactionParams
      type: object
    SandboxSandboxTransaction:
      properties:
        amount_in:
          description: The amount deposited
          format: decimal
          type: string
        amount_out:
          description: The amount to be paid out
          format: decimal
          type: string
        autoramp_id:
          description: The autoramp ID used
          format: uuid
          type: string
        created_at:
          description: When the transaction was created
          format: date-time
          type: string
        currency_in:
          description: The input currency
          type: string
        currency_out:
          description: The output currency
          type: string
        customer_id:
          description: The customer ID
          format: uuid
          type: string
        id:
          description: The ID of the created ramp transaction
          format: uuid
          type: string
        state:
          description: The initial state
          type: string
      required:
        - id
        - autoramp_id
        - amount_in
        - currency_in
        - amount_out
        - currency_out
        - customer_id
        - state
        - created_at
      title: SandboxSandboxTransaction
      type: object
    ApiError:
      description: |-
        Standard error response returned to API clients for server errors.
        Includes a trace_id that clients can reference when reporting issues.
      properties:
        message:
          description: Human-readable error message
          type: string
        trace_id:
          description: Trace ID that can be used to look up request details in logs
          type: string
      required:
        - message
        - trace_id
      title: ApiError
      type: object
    SandboxTransactionState:
      enum:
        - Pending
        - Completed
        - Failed
      type: string
    Currency:
      anyOf:
        - $ref: '#/components/schemas/Currency_Crypto'
        - $ref: '#/components/schemas/Currency_Fiat'
      description: |
        Currency

        Can be either crypto or fiat
      discriminator:
        mapping:
          Crypto:
            $ref: '#/components/schemas/Currency_Crypto'
          Fiat:
            $ref: '#/components/schemas/Currency_Fiat'
        propertyName: type
      type: object
    RampTransactionSource:
      anyOf:
        - $ref: '#/components/schemas/ApiWalletDepositSource'
        - $ref: '#/components/schemas/ApiBankAccountSource'
      description: The source of the autoramp transaction
      type: object
    Currency_Crypto:
      allOf:
        - properties:
            type:
              enum:
                - Crypto
              example: Crypto
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Crypto'
      description: |
        Currency

        Can be either crypto or fiat
    Currency_Fiat:
      allOf:
        - properties:
            type:
              enum:
                - Fiat
              example: Fiat
              type: string
          required:
            - type
          type: object
        - $ref: '#/components/schemas/Fiat'
      description: |
        Currency

        Can be either crypto or fiat
    ApiWalletDepositSource:
      description: A wallet deposit source of an autoramp transaction
      example:
        blockchain: Solana
        deposit_tx_hash: >-
          45E89p7aRyUzsqbqstCkKqxaaeYXgagbq8ccHCZWMRN1E8KAqoEPACDasVjkMMbDJGwrwFHz5RDT67kUN3p5Rk81
        wallet_address: 7QqLDBU5iT4VWshsqRdWKHjKdqZqKqYbpjhCkqDnKXSp
      properties:
        blockchain:
          description: The blockchain
          type: string
        deposit_tx_hash:
          description: The deposit transaction hash
          type: string
        wallet_address:
          description: The wallet address
          type: string
      required:
        - wallet_address
        - blockchain
      title: ApiWalletDepositSource
      type: object
    ApiBankAccountSource:
      description: A bank account source of an autoramp transaction
      example:
        account_number: null
        bank_name: Iron Bank
        bic: COBADEFFXXX
        iban: DE89370400440532013000
        name: Alan Turing
        routing_number: null
        sort_code: null
      properties:
        account_number:
          description: The account number for US accounts
          type: string
        bank_name:
          description: The bank name
          type: string
        bic:
          description: The bic
          type: string
        iban:
          description: The iban
          type: string
        name:
          description: The name of the account holder
          type: string
        routing_number:
          description: The routing number of the bank, for US accounts
          type: string
        sort_code:
          description: The sort code of the bank, for UK accounts
          type: string
      required:
        - bank_name
        - iban
        - bic
        - name
      title: ApiBankAccountSource
      type: object
    Crypto:
      description: A cryptocurrency
      example:
        blockchain: Solana
        token: USDC
      properties:
        blockchain:
          $ref: '#/components/schemas/Blockchain'
        token:
          description: The ticker of the token e.g. 'USDC'
          type: string
      required:
        - token
        - blockchain
      title: Crypto
      type: object
    Fiat:
      description: A fiat currency
      example:
        code: USD
      properties:
        code:
          description: The code of the currency e.g. 'USD'
          type: string
      required:
        - code
      title: Fiat
      type: object
    Blockchain:
      description: |
        Blockchain

        A type of blockchain
      enum:
        - Solana
        - Ethereum
        - Polygon
        - Arbitrum
        - Base
        - Stellar
        - Citrea
        - Plasma
        - Avalanche
        - Moca
        - Tempo
        - Tron
        - Bsc
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: API Key
      in: header
      name: X-API-Key
      type: apiKey

````