跳转到内容

报价

有时效性的付款定价与收款资料校验

创建付款报价

请求

校验一份银行收款资料,并返回有时效性的付款 Quote。需要 payout.write 权限。

第一期不提供独立的收款人资源,因此收款资料直接随 Quote 提交。Infini 会将标准化且不可变的收款资料快照绑定到 quote_id;创建付款时不能替换或修改这份资料。

第一期只支持以下金额模式与手续费承担方组合:

  • amount_mode=send 与 fee_paid_by=BENEFICIARY:手续费内扣。amount 固定 sending_amount;transfer_fee_amount = sending_amount × fee_rate_decimal;receiving_amount = sending_amount - transfer_fee_amount - bank_fee_amount。当 amount=1000.00、费率为 0.001、银行费为 50.00 时,收款人到账 949.00。
  • amount_mode=receive 与 fee_paid_by=PAYER:手续费外扣。amount 固定 receiving_amount;transfer_fee_amount = sending_amount × fee_rate_decimal;sending_amount = receiving_amount + transfer_fee_amount + bank_fee_amount。当 amount=1000.00、费率为 0.001、银行费为 50.00 时,付款账户扣款 1051.05。

在 receive 模式下,Infini 会反算并增加 sending_amount,确保扣除全部手续费后收款金额仍然准确。

修改 fee_paid_by 会改变计算结果,因此必须重新请求 Quote。已接受的 quote_id 会固定 Payout 使用的手续费承担方和两侧金额。

Quote 阶段会执行初步的收款资料、路由、金额、合规和限额校验,但不会冻结余额、批准或创建付款,也不保证一定能够执行。POST /v2/payouts 会根据当时状态重新执行所有关键校验。

安全
Ed25519
标头
X-API-Key-IDstring必需

32-character Base58 credential ID returned after public-key registration.

X-API-Timestampstring必需

Unix timestamp in seconds; tolerance is ±300 seconds.

X-API-Noncestring必需

16 cryptographically random bytes encoded as unpadded Base64URL; fresh on every attempt.

Digeststring必需

SHA-256= followed by standard padded Base64 of SHA-256 of exact request body bytes. Required even for an empty body; included in the signing string.

Authorizationstring必需

Use Ed25519 signature="BASE64_SIGNATURE", where BASE64_SIGNATURE is the standard padded Base64 signature. See /docs/en/4-authorization for the exact signing string.

正文application/json必需
amountstring^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$必需

按 amount_mode 含义填写的正数 USD 金额。

示例:"1000.00"
amount_modestring必需

amount 固定的金额侧。send 表示来源账户扣款;receive 表示收款金额。

Enum:"send""receive"
示例:"receive"
fee_paid_bystring必需

手续费承担方及金额计算输入。PAYER 表示手续费外扣;BENEFICIARY 表示手续费内扣。第一期只接受 receive 与 PAYER,或 send 与 BENEFICIARY。

Enum:"PAYER""BENEFICIARY"
示例:"PAYER"
source_currencystring必需

组织余额币种。第一期仅支持 USD。

Value:"USD"
示例:"USD"
destination_currencystring必需

收款人到账币种。付款 Quote 当前仅支持 USD。

Value:"USD"
示例:"USD"
destination_countrystring^[A-Z]{2}$必需

ISO 3166-1 alpha-2 格式的目标国家代码。

示例:"US"
payout_typestring必需

付款通道。当前仅支持 SWIFT。

Value:"swift"
示例:"swift"
destinationobject(BankDestinationInput)必需
curl -i -X POST \
  https://developer.infini.money/_mock/zh/apis/payout/v2/payouts/quotes \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'Digest: string' \
  -H 'X-API-Key-ID: string' \
  -H 'X-API-Nonce: string' \
  -H 'X-API-Timestamp: string' \
  -d '{
    "amount": "1000.00",
    "amount_mode": "receive",
    "fee_paid_by": "PAYER",
    "source_currency": "USD",
    "destination_currency": "USD",
    "destination_country": "US",
    "payout_type": "swift",
    "destination": {
      "type": "bank_account",
      "account_holder_type": "business",
      "account_holder_name": "Acme Supplies LLC",
      "bank_country": "US",
      "bank_name": "Example Bank",
      "account_number": "9876543210",
      "swift_code": "BOFAUS3NXXX",
      "address": {
        "line1": "123 Market Street",
        "line2": "Suite 500",
        "city": "New York",
        "state": "NY",
        "postal_code": "10001",
        "country": "US"
      }
    }
  }'

响应

有时效性的付款 Quote

正文application/json
codeinteger必需

业务码,0 表示成功。

Value:0
示例:0
messagestring必需

响应消息。

示例:""
dataobject(Quote)必需
响应
{ "code": 0, "message": "", "data": { "quote_id": "poq_01JQ90B8S5VJ6R3T7F1M2C4N9X", "provider": "sgb", "payout_type": "swift", "source_currency": "USD", "destination_currency": "USD", "destination_country": "US", "amount_mode": "receive", "fee_paid_by": "PAYER", "sending_amount": "1051.05", "receiving_amount": "1000.00", "transfer_fee_amount": "1.05", "bank_fee_amount": "50.00", "fee_rate_decimal": "0.001", "rate": "1", "billing": { … }, "destination": { … }, "expires_at": 1786586700 } }