跳转到内容

Quote a payment without creating it

请求

安全
InfiniHmac
标头
Datestring

GMT server time (e.g. Tue, 21 Jan 2025 12:00:00 GMT). Required for every request.

Authorizationstring

HMAC-SHA256 Signature header. See the Authentication guide.

Digeststring

SHA-256 digest of the request body (when a body is present).

正文application/json必需
order_idstring, (string)必需

Order ID

示例:"ord-123"
payment_methodinteger, (int)

Payment method

默认值:1
示例:1
chainstring, (string)必需

Chain

示例:"ETHEREUM"
token_idstring, (string)必需

Token identifier

示例:"USDT"
curl -i -X POST \
  -u '<username>:<password>' \
  https://developer.infini.money/_mock/zh/apis/acquiring/payment/quote \
  -H 'Authorization: string' \
  -H 'Content-Type: application/json' \
  -H 'Date: string' \
  -H 'Digest: string' \
  -d '{
    "order_id": "ord-123",
    "payment_method": 1,
    "chain": "ETHEREUM",
    "token_id": "USDT"
  }'

响应

正文application/json
amountstring, (string)

USD-denominated amount the payer still owes (== due_amount)

示例:"100.00"
due_amount_fiatstring, (string)

Current payable amount in order currency

示例:"100.00"
amount_confirmedstring, (string)

USD-denominated amount already confirmed

示例:"0"
amount_confirmingstring, (string)

USD-denominated amount currently confirming

示例:"0"
quoted_token_amountstring, (string)

Amount shown to payer, in pay_currency units

示例:"100.00"
quoted_token_currencystring, (string)

Currency of quoted_token_amount (matches pay_currency)

示例:"USDT"
quoted_token_price_usdcstring, (string)

USDC-per-token snapshot at quote time; 0 for stablecoins

示例:"0"
响应
{ "amount": "100.00", "due_amount_fiat": "100.00", "amount_confirmed": "0", "amount_confirming": "0", "quoted_token_amount": "100.00", "quoted_token_currency": "USDT", "quoted_token_price_usdc": "0" }