Global Collections API: Receive Money as Easily as You Send It
Most payment APIs are optimized for sending money. Receiving it is often an afterthought: a bank transfer arrives with a cryptic reference, someone in finance matches it to an invoice, and the customer waits for manual confirmation. For marketplaces, B2B platforms, and subscription businesses with invoice payments, collections are the harder half of the problem.
RoaPay Global Collections is now available. It gives every customer a dedicated virtual account per currency, matches incoming transfers automatically, and emits the same normalized payment events you already use for card payments.
Virtual accounts per customer
Instead of asking customers to reference an invoice number in a free-text field, you assign them a virtual account. Each account is linked to your merchant profile, a currency, and a customer or order. When funds arrive, the account identifies the payer before any reference is parsed.
curl -X POST https://api.roapay.com/v3/collections/accounts \
-H "Authorization: Bearer $ROAPAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_71d0",
"currency": "EUR",
"reference": "INV-2026-1042",
"metadata": { "region": "eu-west" }
}'
The response includes local bank details that the customer can use for a standard transfer. No new banking relationship is required on their side.
Reference-based matching
Every incoming transfer goes through a matching pipeline:
- Account match. If the virtual account is unique, the payment is matched immediately.
- Reference match. Structured references and remittance data are parsed against open invoices.
- Amount and timing heuristics. Partial payments, combined payments, and FX differences are handled with explicit confidence levels.
- Exception queue. Anything unresolved is routed to a queue with a reason code, not silently dropped.
| Collection type | Matching method | Typical confidence |
|---|---|---|
| Virtual account transfer | Account identifier | Deterministic |
| Bank transfer with reference | Structured reference | Deterministic |
| Transfer without reference | Amount + payer history | Probabilistic, reviewable |
| Batch settlement file | End-to-end ID | Deterministic |
Webhooks that behave like card events
Incoming transfers emit collection.received, collection.matched, and collection.settled. The payload uses the same amount, currency, and status conventions as card payments, so your existing order workflow can consume it without a parallel integration.
“We stopped asking customers to email us proof of payment. The virtual account does the matching, and the order ships when the webhook arrives.”
— Operations lead, B2B marketplace
Availability
Global Collections supports EUR, USD, GBP, SGD, HKD, and AUD virtual accounts at launch, with local rails in 18 markets. Cross-currency collection is available through automatic conversion at settlement. The API is included in the standard RoaPay plan; volume pricing applies to high-volume collection accounts.
If you are already using RoaPay for payouts, collections share the same ledger and treasury balances, so incoming funds can be used for same-day payouts without a separate funding step.
多数支付 API 都为“付款”而优化,“收款”往往被放在次要位置:银行转账带着一串难以理解的附言到账,财务人员手工匹配发票,客户等待人工确认。对平台、B2B 业务与支持账单支付的订阅业务来说,收款才是更难的一半。
RoaPay 全球收款现已上线。它为每个客户分配按币种区分的专属虚拟账户,自动匹配入账转账,并发出与卡支付一致的统一支付事件。
为每个客户分配虚拟账户
不必要求客户在自由文本里填写发票号,而是给客户分配一个虚拟账户。账户绑定你的商户主体、币种以及客户或订单。资金到账时,账户本身就能识别付款人,无需先解析附言。
curl -X POST https://api.roapay.com/v3/collections/accounts \
-H "Authorization: Bearer $ROAPAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cus_71d0",
"currency": "EUR",
"reference": "INV-2026-1042",
"metadata": { "region": "eu-west" }
}'
响应会包含客户可直接用于普通转账的本地银行信息,客户无需建立新的银行关系。
基于引用的自动匹配
每笔入账转账都会经过匹配流水线:
- 账户匹配。 虚拟账户唯一时,支付立即匹配。
- 引用匹配。 结构化附言与汇款数据会与未结发票进行解析比对。
- 金额与时间启发式。 部分付款、合并付款与汇兑差额会以明确的置信度处理。
- 异常队列。 未解决项带原因码进入队列,不会被静默丢弃。
| 收款类型 | 匹配方式 | 典型置信度 |
|---|---|---|
| 虚拟账户转账 | 账户标识 | 确定性 |
| 带附言的银行转账 | 结构化引用 | 确定性 |
| 无附言转账 | 金额 + 付款人历史 | 概率性,可复核 |
| 批量清算文件 | 端到端 ID | 确定性 |
像卡事件一样工作的 Webhook
入账转账会触发 collection.received、collection.matched 与 collection.settled。载荷沿用与卡支付一致的金额、币种与状态约定,既有订单流程无需第二套集成即可消费。
“我们不再要求客户邮件发送付款凭证。虚拟账户自动完成匹配,Webhook 一到订单就发货。”
—— 某 B2B 交易平台运营负责人
可用性
全球收款首批支持 EUR、USD、GBP、SGD、HKD 与 AUD 虚拟账户,覆盖 18 个市场的本地通道。跨币种收款可在清算时自动兑换。该 API 包含在 RoaPay 标准方案中,高频收款账户按量计价。
如果你已经在使用 RoaPay 下发,收款与下发共用同一账本与资金余额,入账资金可直接用于当日下发,无需单独的注资步骤。