This page documents a legacy SDK. Starting a new integration? Use the Yuno SDK. Already on a legacy SDK? Follow the migration guide.The new Yuno SDK (Web v2.x, iOS v3.x, Android v3.x, React Native v2.x) replaces the Full, Lite, Seamless, Render, Headless, and Secure Fields SDKs with one API across every platform. Legacy SDKs remain supported side by side during the transition and are scheduled for deprecation in 2027. Contact your Account Manager for migration planning.
概念
Checkout 组件
支付流程对比
- Stripe Elements
- Yuno(Lite SDK / Secure Fields)
- Yuno(Seamless SDK)
- 服务器创建 PaymentIntent 并返回
client_secret。 - 浏览器使用该 secret 挂载 Payment Element。
- 浏览器调用
stripe.confirmPayment。 - Stripe 进行重定向或直接完成;您的服务器监听
payment_intent.succeeded。
Webhooks
Yuno 为每个对象发送一种事件类型,并在 payload 中携带状态,因此多个 Stripe 事件会合并为一个 Yuno 事件。请参阅 Webhooks 和 配置 Webhooks。
每个 Yuno webhook 都携带
data.idempotency_key 和 x-hmac-signature 标头;请按照 验证 Webhook 签名 中的说明进行验证。
已保存的卡片
保存在 Stripe 中的卡片可以迁移到 Yuno,这样回头客无需重新输入。Yuno 支持通过 令牌迁移流程 在服务提供商之间进行经过 PGP 加密的令牌迁移。由于 Yuno 会为每个存储令牌保存网络交易 id,定期系列扣款无需重新认证即可继续;请参阅 存储凭证。迁移顺序
1
在 Yuno 上连接 Stripe
将您的 Stripe 账户添加为连接,并将其放到一条路由上。此时购物者不会察觉任何变化。请参阅 设置支付连接。
2
替换 checkout
按照 React 和 Next.js 将 Payment Element 替换为 Seamless SDK,或将 Card Element 替换为 Lite SDK 或 Secure Fields。先在同一个 Stripe 连接上运行,以便在相同条件下比较批准率。
3
迁移 webhook
将您现有的处理程序订阅到上表中的 Yuno 事件,并将状态逻辑切换为 Yuno 的
status 和 sub_status 值。4
迁移已保存的卡片
执行令牌迁移,并将已存储卡片的扣款切换为使用
vaulted_token。