首页产品文档APISaaS平台
首页
产品文档
支付产品能力自动货币转换
API
接入准备支付服务退款服务Webhook 通知
SaaS平台
ShopifyWooCommerceShoplazzaSHOPYY
  • 快速开始
  • 身份认证

核心概念

  • 支付会话
  • 商户
  • 交易
  • 退款
首页/快速开始/支付会话
StablePay 开发者文档
Home
Product
API
SaaS
Login
Register
GitHub
Home
Product
API
SaaS
Login
Register
GitHub
  • 入门指南 / Getting Started

    • 快速开始 / Quick Start
    • 身份认证 / Authentication
  • 核心概念 / Core Concepts

    • 支付会话 / Payment Sessions
    • 商户 / Merchants
    • 交易 / Transactions
    • 退款 / Refunds

支付会话

支付会话(Payment Session)是 StablePay 支付流程的核心概念,代表一次完整的支付请求。

什么是支付会话

支付会话是一个临时的支付容器,包含:

  • 支付金额和币种
  • 商户订单信息
  • 收款地址
  • 有效期

支付会话状态

状态说明
PENDING等待付款
PROCESSING处理中(已检测到链上交易)
COMPLETED支付完成
EXPIRED已过期
CANCELLED已取消

创建支付会话

curl -X POST https://api.stablepay.co/v1/payment/sessions/create \
  -H "Authorization: Bearer sk_test_..." \
  -d '{
    "merchant_id": "merchant_123",
    "order_id": "order_001",
    "amount": "100.50",
    "currency": "USD"
  }'

支付流程

  1. 商户创建支付会话
  2. 用户跳转到支付页面或扫码支付
  3. StablePay 监听链上交易
  4. 确认后通知商户(Webhook)
  5. 商户完成订单处理

Payment Session is the core concept in StablePay's payment flow, representing a complete payment request.

What is a Payment Session

A payment session is a temporary payment container containing:

  • Payment amount and currency
  • Merchant order information
  • Receiving address
  • Expiration time

Payment Session Status

StatusDescription
PENDINGAwaiting payment
PROCESSINGProcessing (on-chain transaction detected)
COMPLETEDPayment completed
EXPIREDExpired
CANCELLEDCancelled

Creating a Payment Session

curl -X POST https://api.stablepay.co/v1/payment/sessions/create \
  -H "Authorization: Bearer sk_test_..." \
  -d '{
    "merchant_id": "merchant_123",
    "order_id": "order_001",
    "amount": "100.50",
    "currency": "USD"
  }'

Payment Flow

  1. Merchant creates payment session
  2. User redirects to payment page or scans QR code
  3. StablePay monitors on-chain transactions
  4. Notifies merchant upon confirmation (Webhook)
  5. Merchant completes order processing
最后更新 / Last Updated: 2026/1/28 21:06
Prev
身份认证 / Authentication
Next
商户 / Merchants