Skip to main content
POST
/
payments
/
quotes
Get payment quotes
curl --request POST \
  --url https://v2.prod.halliday.xyz/payments/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "request": {
    "kind": "FIXED_INPUT",
    "fixed_input_amount": {
      "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "amount": "1"
    },
    "output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "dest_address": "<string>",
    "custom_actions": {
      "actions": [
        {
          "type": "CallImmediateAction",
          "target": "<string>",
          "value": "<string>",
          "calldata": "<string>"
        }
      ],
      "user_estimated_gas": "<string>"
    }
  },
  "price_currency": "USD",
  "onramps": [
    "moonpay",
    "coinbase"
  ],
  "onramp_methods": [
    "CREDIT_CARD",
    "ACH",
    "APPLE_PAY"
  ],
  "customer_ip_address": "<string>",
  "customer_id": "<string>",
  "parent_payment_id": "<string>",
  "label": "<string>",
  "features": [
    "BETA_EDGES"
  ],
  "rev_share_name": "<string>",
  "allow_unsafe_transfer_out": true,
  "show_all_issues": true,
  "allow_unsafe_slippage": true,
  "allow_exceed_max_input_limit": true,
  "use_intent_refund": true,
  "hops": [
    "<string>"
  ]
}
'
{
  "quote_request": {
    "request": {
      "kind": "FIXED_INPUT",
      "fixed_input_amount": {
        "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "amount": "1"
      },
      "output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "dest_address": "<string>",
      "custom_actions": {
        "actions": [
          {
            "type": "CallImmediateAction",
            "target": "<string>",
            "value": "<string>",
            "calldata": "<string>"
          }
        ],
        "user_estimated_gas": "<string>"
      }
    },
    "price_currency": "USD",
    "onramps": [
      "moonpay",
      "coinbase"
    ],
    "onramp_methods": [
      "CREDIT_CARD",
      "ACH",
      "APPLE_PAY"
    ],
    "customer_ip_address": "<string>",
    "customer_id": "<string>",
    "parent_payment_id": "<string>",
    "label": "<string>",
    "features": [
      "BETA_EDGES"
    ],
    "rev_share_name": "<string>",
    "allow_unsafe_transfer_out": true,
    "show_all_issues": true,
    "allow_unsafe_slippage": true,
    "allow_exceed_max_input_limit": true,
    "use_intent_refund": true,
    "hops": [
      "<string>"
    ]
  },
  "quotes": [
    {
      "output_amount": {
        "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "amount": "1"
      },
      "fees": {
        "total_fees": "<string>",
        "conversion_fees": "<string>",
        "network_fees": "<string>",
        "business_fees": "<string>",
        "currency_symbol": "USD"
      },
      "route": [
        {
          "type": "ONRAMP",
          "net_effect": {
            "consume": [
              {
                "account": "USER",
                "resource": {
                  "asset": "<string>",
                  "property": "APPROVAL"
                },
                "amount": "<string>",
                "tx_id": "<string>"
              }
            ],
            "produce": [
              {
                "account": "USER",
                "resource": {
                  "asset": "<string>",
                  "property": "APPROVAL"
                },
                "amount": "<string>",
                "tx_id": "<string>"
              }
            ]
          },
          "pieces_info": [
            {
              "type": "user_fund"
            }
          ],
          "step_index": 123
        }
      ],
      "payment_id": "<string>",
      "onramp": "<string>",
      "onramp_method": "CREDIT_CARD"
    }
  ],
  "current_prices": {
    "USD": "1.00",
    "ethereum:0x": "4200",
    "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
  },
  "price_currency": "USD",
  "state_token": "<string>",
  "quoted_at": "2023-11-07T05:31:56Z",
  "accept_by": "2023-11-07T05:31:56Z",
  "failures": [
    {
      "service_ids": [
        "<string>"
      ],
      "latency_seconds": 123,
      "issues": [
        {
          "kind": "amount",
          "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
          "given": "<string>",
          "limits": {
            "min": "<string>",
            "max": "<string>"
          },
          "source": "<string>",
          "message": "<string>",
          "reason": "TOO_LOW",
          "downstream_limits": {
            "min": "<string>",
            "max": "<string>"
          }
        }
      ]
    }
  ],
  "limits": [
    {
      "min": "<string>",
      "max": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
request
object
required
price_currency
string
required

Currency that all prices are denominated in

Example:

"USD"

onramps
string[]

Filter by specific onramp providers

Example:
["moonpay", "coinbase"]
onramp_methods
enum<string>[]

Filter by onramp payment methods

Available options:
CREDIT_CARD,
DEBIT_CARD,
ACH,
FIAT_BALANCE,
TOKEN_BALANCE,
APPLE_PAY,
PAYPAL,
VENMO,
REVOLUT,
GOOGLE_PAY,
SEPA,
FASTER_PAYMENTS,
PIX,
UPI,
WIRE
Example:
["CREDIT_CARD", "ACH", "APPLE_PAY"]
customer_ip_address
string

IP address of the customer

customer_id
string

Customer ID for tracking

parent_payment_id
string

Optional parent payment identifier used when creating a quote from an existing payment.

label
string

Optional label for the payment.

Maximum string length: 255
features
enum<string>[]

Feature flags to enable for this quote.

Available options:
BETA_EDGES,
ORG_BETA_EDGES,
ORG_EDGES
rev_share_name
string

Revenue share configuration name.

allow_unsafe_transfer_out
boolean

Allow unsafe transfer out operations.

show_all_issues
boolean

Return all validation issues instead of failing on the first.

allow_unsafe_slippage
boolean

Allow quotes with higher than normal slippage.

allow_exceed_max_input_limit
boolean

Allow quotes that exceed the maximum input limit.

use_intent_refund
boolean

Use intent-based refund flow.

hops
string[]

Intermediate chain hops for routing.

Response

Successful quote response

quote_request
object
required
quotes
object[]
required
current_prices
object
required

Mapping of asset symbols to their unit prices

Example:
{
"USD": "1.00",
"ethereum:0x": "4200",
"ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.00"
}
price_currency
string
required

Currency that all prices are denominated in

Example:

"USD"

state_token
string
required

Signed state token containing routing and payment flow information. This value must be passed unmodified in subsequent API calls. Do not attempt to parse or modify this data as it is cryptographically signed.

quoted_at
string<date-time>
required

Timestamp of when the quote was created, in UTC ISO 8601 format

accept_by
string<date-time>
required

Timestamp of when the quote will expire, in UTC ISO 8601 format

failures
object[]
required

Providers that failed to return a quote.

limits
object[]
required

Input amount limits for the quote.