Skip to main content
POST
/
quotes
Create quote
curl --request POST \
  --url https://api.fernhq.com/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "03b7030f-6da1-4d76-9352-cdebd82112c8",
  "source": {
    "sourcePaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
    "sourceCurrency": "USD",
    "sourcePaymentMethod": "<any>",
    "sourceAmount": "100"
  },
  "destination": {
    "destinationPaymentAccountId": "072a8b7b-38c7-429a-a6cf-35dae7f2fb77",
    "destinationPaymentMethod": "<any>",
    "destinationCurrency": "USD"
  },
  "developerFee": {
    "developerFeeType": "USD",
    "developerFeeAmount": "5.45"
  },
  "guaranteeQuote": true
}'
{
"quoteId": "quote_abc123",
"expiresAt": "2025-03-20T12:24:49.717Z",
"estimatedExchangeRate": "1.2",
"destinationAmount": "100",
"fees": {
"feeCurrency": {
"label": "USDC",
"chain": "ETHEREUM",
"contractAddress": "0x123456789abcd123456789abcd123456789abcd",
"currencyDecimals": 18
},
"fernFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
},
"developerFee": {
"feeAmount": "5.45",
"feeUSDAmount": "5.45"
}
}
}

Authorizations

Authorization
string
header
required

To authenticate server-side requests

Body

application/json

Get a proposed price for your specified currency route (price guaranteed for 5 mins)

customerId
string<uuid>
required

A unique identifier for the customer initiating the transaction.

Example:

"03b7030f-6da1-4d76-9352-cdebd82112c8"

source
object
required
destination
object
required
developerFee
object

The fee amount you would like Fern to deduct from the transaction. For Builder tier, developer fee must be greater than or equal to the fernFee.

guaranteeQuote
boolean

When enabled guarantees that the exact destination amount from the quote will be received

Response

Response containing quote details including exchange rate, fees, and expiration

quoteId
string<uuid>
required

Unique identifier for this quote

Example:

"quote_abc123"

expiresAt
string<date-time>
required

ISO timestamp when this quote expires (5 minutes from creation)

Example:

"2025-03-20T12:24:49.717Z"

estimatedExchangeRate
string
required

The rate at which the source currency is multiplied to determine the equivalent amount in the destination currency

Example:

"1.2"

destinationAmount
string
required

The amount that will be received after conversion and fees

Example:

"100"

fees
object
required

Fee structure for a transaction