Skip to main content
POST
/
quotes
Create a payment quote
curl --request POST \
  --url https://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
customerId
string
required
destination
object
required
source
object
required
metadata
object
promoCode
string
sponsorGas
boolean

Response

201 - application/json

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

createdAt
string<date-time>
customerId
string
destination
object
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
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>
Available options:
open,
accepted,
expired
type
string