Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spherepay.co/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to lock an exchange rate before creating a transfer. Quotes give the customer a deterministic source-to-destination conversion rate that’s valid for a fixed window (30, 60, or 300 seconds). The quote captures the source amount, destination amount, exchange rate, and full fee breakdown (integrator + platform) at the moment of issuance. A quote can be redeemed exactly once by passing its ID when calling Create Transfer.
Quotes are most useful for trading and cross-border payouts where the customer needs to see the exact rate they’ll receive before committing the transfer. For floating-rate transfers (e.g. payroll, treasury rebalancing), skip the quote and call /v2/transfer directly.

Endpoint

POST https://api.spherepay.co/v2/quote

Authentication

All requests require a Bearer token in the Authorization header.
Authorization: Bearer <token>

Request body

amount
string
required
Quote amount in the source currency. Must have exactly 2 decimal places (e.g. "100.00"). Matches ^\d+(\.\d{2})?$.
customerId
string
required
The customer’s ID. Must match ^customer_[a-z0-9]+$. The customer must have an approved verification profile for the source and destination currencies.
source
object
required
The source currency and network.
destination
object
required
The destination currency and network.
quoteDurationSeconds
number
default:"60"
How long the quoted exchange rate stays valid. Must be one of 30, 60, or 300. Defaults to 60.
integratorBpsFeeRate
string
Optional. Your integrator fee in basis points (1 bps = 0.01%) as a string integer (e.g. "20" for 20 bps). The fee is calculated as sourceAmount × bpsRate / 10000 and is denominated in the source currency. Charged on top of Sphere’s platform fee.

Response fields

id
string
Unique quote identifier. Matches ^quote_[a-z0-9]+$. Pass this ID to POST /v2/transfer to redeem the quote.
type
string
Transfer direction this quote is for. One of on_ramp or off_ramp — inferred from the source/destination pair.
customerId
string
The customer ID the quote belongs to.
fees
object
Detailed breakdown of fees applied to the quote.
source
object
Source side of the quote: currency, network, and amount (the original source amount).
destination
object
Destination side of the quote: currency, network, amount (the destination amount after conversion and fees), and exchangeRate (the locked rate applied).
expiresAt
string
ISO 8601 timestamp when this quote expires and can no longer be redeemed.
created
string
ISO 8601 timestamp when the quote was created.
curl -X POST "https://api.spherepay.co/v2/quote" \
  -H "Authorization: Bearer $SPHEREPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "100.00",
    "customerId": "customer_3faa484998f44cfead9668608b9ee1f5",
    "source": {
      "currency": "usdc",
      "network": "polygon"
    },
    "destination": {
      "currency": "brl",
      "network": "pix"
    },
    "quoteDurationSeconds": 60,
    "integratorBpsFeeRate": "20"
  }'
{
  "id": "quote_d243ab2b1de4447d8a046d87fefe58cf",
  "type": "off_ramp",
  "customerId": "customer_3faa484998f44cfead9668608b9ee1f5",
  "fees": {
    "integratorFee": {
      "fixedAmount": "0.00",
      "bpsRate": "20",
      "bpsAmount": "0.20",
      "totalAmount": "0.20",
      "currency": "usdc"
    },
    "platformFee": {
      "fixedAmount": "0.00",
      "bpsRate": "20",
      "bpsAmount": "0.20",
      "totalAmount": "0.20",
      "currency": "usdc"
    }
  },
  "source": {
    "currency": "usdc",
    "network": "polygon",
    "amount": "100.00"
  },
  "destination": {
    "currency": "brl",
    "network": "pix",
    "amount": "545.50",
    "exchangeRate": "5.455"
  },
  "expiresAt": "2025-01-01T00:01:00.000Z",
  "created": "2025-01-01T00:00:00.000Z"
}

Error codes

StatusCodeDescription
400address/invalidThe request body contains invalid or missing fields.
404resource/not-foundThe referenced customer does not exist.
422validation/failedOne or more fields failed validation. The errors array identifies each failing field.
Last modified on May 20, 2026