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"
  },
  "price_currency": "USD",
  "onramps": [
    "moonpay",
    "coinbase"
  ],
  "onramp_methods": [
    "credit_card",
    "ach",
    "apple_pay"
  ],
  "customer_ip_address": "<string>",
  "customer_id": "<string>",
  "customer_geolocation": {
    "alpha3_country_code": "<string>",
    "state_code": "<string>"
  },
  "parent_payment_id": "<string>"
}'
{
  "quote_request": {
    "request": {
      "kind": "FIXED_INPUT",
      "fixed_input_amount": {
        "asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "amount": "1"
      },
      "output_asset": "ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    },
    "price_currency": "USD",
    "onramps": [
      "moonpay",
      "coinbase"
    ],
    "onramp_methods": [
      "credit_card",
      "ach",
      "apple_pay"
    ],
    "customer_ip_address": "<string>",
    "customer_id": "<string>",
    "customer_geolocation": {
      "alpha3_country_code": "<string>",
      "state_code": "<string>"
    },
    "parent_payment_id": "<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"
      },
      "onramp": "<string>",
      "onramp_method": "credit_card",
      "route": [
        {
          "type": "ONRAMP",
          "net_effect": {
            "consume": [
              {
                "account": "USER",
                "resource": {
                  "asset": "<any>",
                  "property": "<any>"
                },
                "amount": {
                  "amount": "<any>"
                }
              }
            ],
            "produce": [
              {
                "account": "USER",
                "resource": {
                  "asset": "<any>",
                  "property": "<any>"
                },
                "amount": {
                  "amount": "<any>"
                }
              }
            ]
          },
          "pieces_info": [
            {
              "type": "onramp"
            }
          ],
          "step_index": 123
        }
      ],
      "payment_id": "<string>"
    }
  ],
  "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",
          "given": {
            "amount": "<any>"
          },
          "limits": {
            "min": {
              "amount": "<any>"
            },
            "max": {
              "amount": "<any>"
            }
          },
          "source": "<string>",
          "message": "<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
string[]

Filter by onramp payment methods

Example:
["credit_card", "ach", "apple_pay"]
customer_ip_address
string

IP address of the customer

customer_id
string

Customer ID for tracking

customer_geolocation
object

Geolocation information

parent_payment_id
string

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

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.