# Infini 商户静态地址收款 API

全部操作使用 /v2/merchant-customer 前缀和 Ed25519 v2；参见[接入指南](/docs/en/customer-deposits-api)与[鉴权指南](/docs/en/4-authorization)。禁用在线 Try it，在商户服务端签名。费用由商户承担，链上确认时冻结价格、费率和结算币种，小额费叠加。

Version: 0.1.0

## Servers

Production
```
https://openapi.infini.money/v2/merchant-customer
```

Sandbox
```
https://openapi-sandbox.infini.money/v2/merchant-customer
```

## Security

### Ed25519

Ed25519 signature="BASE64_SIGNATURE" plus X-API-Key-ID, X-API-Timestamp, X-API-Nonce and Digest. Never enter private keys into this reference.

Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

 - [Infini 商户静态地址收款 API](https://developer.infini.money/_bundle/@l10n/zh/apis/customer-deposits.yaml)

## Currencies

 - [GET /currencies](https://developer.infini.money/zh/apis/customer-deposits/currencies/listmerchantcustomerdepositcurrencies.md): 需要 merchant_customer.read。返回可用币种网络和展示门槛，无匹配返回 data=[]。
## Customers

 - [POST /customers](https://developer.infini.money/zh/apis/customer-deposits/customers/upsertmerchantcustomer.md): 需要 merchant_customer.write。按 external_user_id 唯一。新建 201，已有 200；仅更新传入资料，未传保留，null/空字符串清空。ID 不变，无变化不更新时间。更新不占新额度，创建不申请钱包。
 - [GET /customers](https://developer.infini.money/zh/apis/customer-deposits/customers/getmerchantcustomer.md): 需要 merchant_customer.read。customer_id 与 external_user_id 必须且只能传一个。只读，不创建、不更新。
 - [GET /customers/quota](https://developer.infini.money/zh/apis/customer-deposits/customers/getmerchantcustomerquota.md): 需要 merchant_customer.read。仅返回 limit 和 used，商户自行计算剩余数量。按 Customer 计数，不按地址计数；查询不预占额度，商户额度可不同。
## Addresses

 - [POST /addresses](https://developer.infini.money/zh/apis/customer-deposits/addresses/createmerchantcustomerdepositaddress.md): 需要 merchant_customer.write。按商户、环境、Customer、币种和网络唯一。准备完成的新绑定返回 201，复用返回 200。同 Customer 的 EVM 网络共址，绑定 ID 分别保存；TRON 的 TRX/USDT 也共址。已归属地址的其他受支持链币入款自动识别结算。并发或结果未明返回 address_processing，以相同业务字段查询或重试，超时不等于失败。
 - [GET /addresses](https://developer.infini.money/zh/apis/customer-deposits/addresses/getmerchantcustomerdepositaddress.md): 需要 merchant_customer.read。customer_id、asset、network 均必填；只读查询，不申请钱包或创建绑定。不存在返回 404，准备中返回 address_processing。
## Deposit webhooks

 - [POST merchant_customer_deposit.confirming](https://developer.infini.money/zh/apis/customer-deposits/deposit-webhooks/notifymerchantcustomerdepositconfirming.md): 已识别充值，等待链上确认。 以 timestamp.event_id.raw_payload 和 Webhook Secret 计算 HMAC-SHA256，按事件 ID 去重；仅 completed 可作为业务入账依据。
 - [POST merchant_customer_deposit.confirmed](https://developer.infini.money/zh/apis/customer-deposits/deposit-webhooks/notifymerchantcustomerdepositconfirmed.md): 链上确认完成，商户入账处理尚未完成。 以 timestamp.event_id.raw_payload 和 Webhook Secret 计算 HMAC-SHA256，按事件 ID 去重；仅 completed 可作为业务入账依据。
 - [POST merchant_customer_deposit.completed](https://developer.infini.money/zh/apis/customer-deposits/deposit-webhooks/notifymerchantcustomerdepositcompleted.md): 资金明细处理完成，credited_amount 可为 0。 以 timestamp.event_id.raw_payload 和 Webhook Secret 计算 HMAC-SHA256，按事件 ID 去重；仅 completed 可作为业务入账依据。
 - [POST merchant_customer_deposit.failed](https://developer.infini.money/zh/apis/customer-deposits/deposit-webhooks/notifymerchantcustomerdepositfailed.md): 已识别的充值明确链上失败或无效。 以 timestamp.event_id.raw_payload 和 Webhook Secret 计算 HMAC-SHA256，按事件 ID 去重；仅 completed 可作为业务入账依据。
