Skip to main content
POST
/
quotes
Create a payment quote
curl --request POST \
  --url https://sandbox-api.polygon.technology/v0.9/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customerId": "<string>",
  "destination": {
    "asset": "<string>",
    "network": "<string>",
    "amount": "<string>",
    "wallet": {
      "blockchainAddress": "<string>",
      "externalAccount": "<string>",
      "id": "<string>"
    }
  },
  "source": {
    "asset": "<string>",
    "network": "<string>",
    "walletId": "<string>",
    "amount": "<string>"
  },
  "metadata": {},
  "promoCode": "<string>",
  "sponsorGas": true
}
'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "customerId": "<string>",
  "destination": {
    "amountGross": "<string>",
    "amountNet": "<string>",
    "asset": "<string>",
    "cash": {
      "locationId": "<string>",
      "locationReference": "<string>"
    },
    "feesDeducted": {
      "developer": "<string>",
      "gas": "<string>",
      "oms": "<string>",
      "total": "<string>"
    },
    "network": "<string>",
    "wallet": {
      "blockchainAddress": "<string>",
      "id": "<string>"
    }
  },
  "developerFees": [
    {
      "amount": "<string>",
      "flatFee": "<string>",
      "id": "<string>",
      "percentage": "<string>",
      "wallet": "<string>"
    }
  ],
  "expiresAt": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "metadata": {},
  "rates": {
    "effectiveRate": "<string>",
    "exchangeRate": "<string>",
    "pair": "<string>"
  },
  "source": {
    "amountGross": "<string>",
    "amountNet": "<string>",
    "asset": "<string>",
    "feesDeducted": {
      "developer": "<string>",
      "gas": "<string>",
      "oms": "<string>",
      "total": "<string>"
    },
    "network": "<string>",
    "walletId": "<string>"
  },
  "sponsorGas": true,
  "sponsorGasCost": "<string>",
  "type": "<string>"
}

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Headers

Idempotency-Key
string
required

Required on POST and PUT requests. Use a unique value per logical mutation attempt, for example a UUID.

Body

application/json

Request body for creating a quote. Provide the source and destination instruments and set the amount on exactly one side; OMS calculates the other.

customerId
string
required
destination
object
required

The destination instrument for a quote: where the funds are delivered, such as a wallet or a cash pickup.

source
object
required

The source instrument for a quote: the wallet that funds the transaction.

metadata
object
promoCode
string
sponsorGas
boolean

Response

201 - application/json

The request has succeeded and a new resource has been created as a result.

A price quote for moving money between two instruments. It locks an exchange rate and the amounts for a short window; execute it by creating a transaction that references this quote's id.

createdAt
string<date-time>
customerId
string
destination
object

The resolved destination side of a quote, with the amounts and fees on that side.

developerFees
object[]

Developer fee entries echoed back from the request. Omitted in alpha - request side is stripped per spec § 2. The field stays on the schema so it can be reintroduced without a breaking change when developer fees ship.

expiresAt
string<date-time>
fixedAmountSide
enum<string>

Which side the caller fixed the amount on.

Available options:
source,
destination
id
string
metadata
object
object
enum<string>
Available options:
quote
rates
object

Exchange and effective rates.

source
object

The resolved source side of a quote, with the amounts and fees on that side.

sponsorGas
boolean
sponsorGasCost
string

USD cost of gas absorbed by the developer when sponsoring gas. Always "0" in alpha - gas is sponsored. Spec § 4.1.

status
enum<string>

Status of a quote. open: pricing locked, awaiting acceptance. accepted: a transaction has been created from it. expired: the pricing window elapsed.

Available options:
open,
accepted,
expired
type
string