Skip to main content
POST
/
sandbox
/
transaction
Mock a transaction
curl --request POST \
  --url https://api.sandbox.iron.xyz/api/sandbox/transaction \
  --header 'Content-Type: application/json; charset=utf-8' \
  --header 'IDEMPOTENCY-KEY: <idempotency-key>' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "amount": "<string>",
  "autoramp_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount_out": "<string>",
  "deposit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fee": "<string>",
  "fx_rate": "<string>",
  "initial_state": "Pending",
  "input_currency": {
    "blockchain": "Solana",
    "token": "USDC"
  },
  "source": {
    "blockchain": "Solana",
    "wallet_address": "7QqLDBU5iT4VWshsqRdWKHjKdqZqKqYbpjhCkqDnKXSp"
  },
  "transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "amount_in": "<string>",
  "amount_out": "<string>",
  "autoramp_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "currency_in": "<string>",
  "currency_out": "<string>",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "state": "<string>"
}

Authorizations

X-API-Key
string
header
required

API Key

Headers

IDEMPOTENCY-KEY
string
required

a UUID ensuring a Ramp Transaction operation is only processed once

Body

application/json; charset=utf-8

Parameters required to create a new sandbox ramp transaction

amount
string<decimal>
required

The amount to deposit (in the autoramp's input currency)

autoramp_id
string<uuid>
required

The autoramp ID to use for the transaction

amount_out
string<decimal>

Optional: Specify the output amount directly (if not provided, calculated from amount, fee, and fx_rate)

deposit_id
string<uuid>

Optional: Specify a deterministic deposit ID instead of generating one

fee
string<decimal>

Optional: Specify the fee amount (defaults to 0.25% of amount)

fx_rate
string<decimal>

Optional: Specify the exchange rate (defaults to 1.0)

initial_state
enum<string>
Available options:
Pending,
Completed,
Failed
input_currency
Crypto · object

Currency

Can be either crypto or fiat

Example:
{ "blockchain": "Solana", "token": "USDC" }
source
ApiWalletDepositSource · object

A wallet deposit source of an autoramp transaction

Example:
{
"blockchain": "Solana",
"wallet_address": "7QqLDBU5iT4VWshsqRdWKHjKdqZqKqYbpjhCkqDnKXSp"
}
transaction_id
string<uuid>

Optional: Specify a deterministic transaction ID instead of generating one

Response

amount_in
string<decimal>
required

The amount deposited

amount_out
string<decimal>
required

The amount to be paid out

autoramp_id
string<uuid>
required

The autoramp ID used

created_at
string<date-time>
required

When the transaction was created

currency_in
string
required

The input currency

currency_out
string
required

The output currency

customer_id
string<uuid>
required

The customer ID

id
string<uuid>
required

The ID of the created ramp transaction

state
string
required

The initial state