One Checkout SDK for Every Market You Sell In
Every market adds payment methods, currency rules, and a new set of failure modes. Teams usually respond by building a local checkout for each region, then spending the next year keeping those checkouts in sync. RoaPay Unified Checkout takes the opposite approach: one integration, one component, and a configuration layer that lets you turn on local methods without shipping new code.
One integration, every market
The SDK renders a hosted payment sheet inside your page or redirects to a RoaPay-hosted page when you prefer a lighter integration. Both paths share the same session API, the same webhook events, and the same reconciliation records. You can start with the hosted page and move to embedded components later without changing your backend contract.
import { RoaPayCheckout } from '@roapay/checkout';
const checkout = await RoaPayCheckout.create({
sessionId: session.id,
locale: 'auto',
appearance: {
theme: 'light',
variables: { colorPrimary: '#131716', borderRadius: '16px' }
}
});
checkout.mount('#checkout-root');
checkout.on('payment.succeeded', (event) => {
analytics.track('purchase', { orderId: event.order_id });
});
Local methods, without local code
The SDK dynamically loads the payment methods enabled for the buyer's country and currency. Methods are grouped by how the buyer expects to pay, not by the provider that processes them, so the checkout stays short even as coverage grows.
| Region | Methods | Typical confirmation |
|---|---|---|
| Europe | Cards, SEPA Direct Debit, iDEAL, Bancontact | Instant to T+2 |
| Southeast Asia | Cards, e-wallets, bank transfer, QR | Instant to T+1 |
| Latin America | Cards, PIX, SPEI, local installments | Instant to T+1 |
| Greater China | Cards, Alipay, WeChat Pay, UnionPay | Instant to T+1 |
Each method is backed by a normalized status model. Your order state machine sees pending, requires_action, succeeded, or failed, regardless of whether the underlying rail is a card network, a wallet, or a bank transfer.
Network tokens and smart retries
Unified Checkout automatically requests network tokens for card payments when the issuer supports them. Tokens survive card reissuance and improve authorization rates for repeat purchases. When a payment fails for a soft reason, the SDK exposes a retry recommendation instead of retrying blindly.
- Soft declines such as insufficient funds are retried on a schedule tuned to the issuer and region.
- Strong customer authentication is handled inline with a fallback to a redirect when the issuer requires it.
- Duplicate protection uses an idempotency key derived from the order, so retries never double-charge.
Merchant control
Everything that appears in the checkout can be configured from the dashboard or the API: method ordering, saved payment methods, installments, statement descriptors, and localized copy. Changes are versioned and can be rolled out to a percentage of traffic before going live.
“We launched three markets in a quarter with the same frontend team. The only new work was copy review and a test matrix for local methods.”
— Head of Engineering, cross-border SaaS platform
What's next
In the coming weeks we are adding B2B invoice payments, adaptive 3DS routing, and a checkout preview environment that mirrors production method coverage. Existing SDK versions continue to receive security updates for 18 months. If you are migrating from a legacy checkout, our team can run a shadow-mode comparison so you can see authorization-rate impact before switching traffic.
每进入一个市场,就会多出一批支付方式、币种规则和新的失败场景。团队通常为每个地区单独做一套收银台,再用一年时间让它们保持一致。RoaPay 统一收银台采用相反的做法:一次接入、一个组件,再通过配置层开启本地支付方式,无需为新市场发版。
一次接入,覆盖所有市场
SDK 可以在你的页面内渲染托管支付表单,也可以跳转到 RoaPay 托管页面,适合更轻量的接入。两条路径共用同一套会话 API、同一组 Webhook 事件和同一份对账记录。你可以先用托管页面起步,之后再切换到嵌入式组件,后端契约无需改变。
import { RoaPayCheckout } from '@roapay/checkout';
const checkout = await RoaPayCheckout.create({
sessionId: session.id,
locale: 'auto',
appearance: {
theme: 'light',
variables: { colorPrimary: '#131716', borderRadius: '16px' }
}
});
checkout.mount('#checkout-root');
checkout.on('payment.succeeded', (event) => {
analytics.track('purchase', { orderId: event.order_id });
});
本地支付方式,无需本地代码
SDK 会根据买家所在国家与币种动态加载已启用的支付方式,并按买家的支付习惯分组,而不是按底层服务商分组。因此即使覆盖范围持续扩大,收银台依然保持简洁。
| 地区 | 支付方式 | 典型确认时间 |
|---|---|---|
| 欧洲 | 银行卡、SEPA 直接借记、iDEAL、Bancontact | 即时至 T+2 |
| 东南亚 | 银行卡、电子钱包、银行转账、二维码 | 即时至 T+1 |
| 拉美 | 银行卡、PIX、SPEI、本地分期 | 即时至 T+1 |
| 大中华区 | 银行卡、支付宝、微信支付、银联 | 即时至 T+1 |
每种方式都映射到统一的状态模型。无论底层是卡组织、钱包还是银行转账,你的订单状态机只会看到 pending、requires_action、succeeded 或 failed。
网络令牌与智能重试
对于银行卡支付,只要发卡行支持,统一收银台会自动申请网络令牌。令牌在换卡后仍然有效,可提升复购授权率。当支付因软性原因失败时,SDK 会给出重试建议,而不是盲目重试。
- 软拒绝(如余额不足)会按照发卡行与地区特征安排重试节奏。
- 强客户认证可就地完成;发卡行要求跳转时自动回退到重定向流程。
- 重复支付保护使用由订单派生的幂等键,重试不会造成重复扣款。
商户可控
收银台中展示的一切都可以通过控制台或 API 配置:支付方式排序、已保存支付方式、分期、账单描述与本地化文案。所有变更都有版本记录,并可先向一定比例流量灰度发布。
“我们用同一个前端团队在一个季度内上线了三个市场。真正新增的工作只有文案审校和本地支付方式的测试矩阵。”
—— 某跨境 SaaS 平台工程负责人
下一步
未来几周我们将加入 B2B 账单支付、自适应 3DS 路由,以及一个与生产环境支付方式覆盖保持一致的回放预览环境。既有 SDK 版本将继续获得 18 个月的安全更新。如果你正在从旧收银台迁移,我们可以在影子模式下并行对比,让你在切换流量前看到授权率影响。