Quote payment fees
Returns the platform fee, estimated network fee, and net amount for a payment of `amount` in `asset`, without creating anything. All monetary fields are integer strings in the asset's smallest unit.
POST
/v1/payments/quoteAPI keyRequest body
| Field | Type | Description |
|---|---|---|
assetrequired | AssetID | Asset identifier (see GET /v1/assets for the live list). |
| ||
amountrequired | string | Merchant base amount, integer string in the asset's smallest unit. Example: "5000000" = 5 USDT. The response returns the derived gross (what the customer pays) and netAmount (what the merchant receives). |
networkFeePayeroptional | FeePayer | Who bears the network (gas) fee. Default merchant. |
| ||
serviceFeePayeroptional | FeePayer | Who bears the platform (service) fee. Default merchant. |
| ||
Response
200 OK
| Field | Type | Description |
|---|---|---|
assetoptional | AssetID | Asset the quote is denominated in, echoed from the request. |
| ||
amountoptional | string | Gross amount, integer string in the asset's smallest unit. |
feeoptional | string | Platform fee: 0.4% of the amount, minimum $1 equivalent. Integer string in the asset's smallest unit. |
networkFeeoptional | string | Estimated on-chain (gas) cost, deducted from the received amount. Integer string in the asset's smallest unit. |
netAmountoptional | string | Amount the merchant receives after all fees. Integer string in the asset's smallest unit. |
grossoptional | string | Amount the customer pays: base plus any customer-paid fees. Integer string in the asset's smallest unit. |
quotedPriceoptional | string | USD price used for this quote, decimal string. Not locked — the binding price is captured when the payment is created. |
Errors
400 Bad Request401 Unauthorized500 Internal Server Error— each returns { errorCode, message, args? }. Codes, retries and limits: Errors & limits
Request
curl -X POST https://api.suward.com/v1/payments/quote \ -H "X-Api-Key: $SUWARD_API_KEY" \ -H "Content-Type: application/json" \ -d '{"asset":"USDT_ETHEREUM","amount":"100000000","networkFeePayer":"merchant","serviceFeePayer":"merchant"}'const response = await fetch('https://api.suward.com/v1/payments/quote', { method: 'POST', headers: { 'X-Api-Key': process.env.SUWARD_API_KEY, 'Content-Type': 'application/json', }, body: JSON.stringify({ "asset": "USDT_ETHEREUM", "amount": "100000000", "networkFeePayer": "merchant", "serviceFeePayer": "merchant" }),});const data = await response.json();package main import ( "bytes" "fmt" "io" "net/http" "os") func main() { payload := []byte(`{"asset":"USDT_ETHEREUM","amount":"100000000","networkFeePayer":"merchant","serviceFeePayer":"merchant"}`) req, _ := http.NewRequest("POST", "https://api.suward.com/v1/payments/quote", bytes.NewReader(payload)) req.Header.Set("X-Api-Key", os.Getenv("SUWARD_API_KEY")) req.Header.Set("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}import requests, os payload = { "asset": "USDT_ETHEREUM", "amount": "100000000", "networkFeePayer": "merchant", "serviceFeePayer": "merchant"} response = requests.post( 'https://api.suward.com/v1/payments/quote', headers={'X-Api-Key': os.environ['SUWARD_API_KEY']}, json=payload,)data = response.json()Response · 200 OK
{ "asset": "USDT_ETHEREUM", "amount": "100000000", "fee": "1000000", "networkFee": "150000", "netAmount": "100000000", "gross": "string", "quotedPrice": "string"}Illustrative values. Every field, type and status on this page is generated from the OpenAPI specification.
Something unclear? payments@suward.com — we treat every integration question as a documentation defect.