模拟操作
模拟操作用于在 沙箱 / 测试环境 主动触发各类业务的 异步通知(Webhook),便于联调完整流程。与 Open API:Request Mock (opens new window) 页面中的在线工具能力一致。
如何使用
- 打开 Request Mock (opens new window) 在线工具(需已登录开发者文档环境)。
- 按业务选择左侧分类:User、GlobalAccount、Collection、Issuing、Payment。
- 在 API 下拉框中选择要模拟的通知类型,填写参数后点击 Send Request。
- 系统将向您在开发者后台配置的 Webhook 地址推送对应通知。
沙箱网关:https://sandbox-api.pyvio.com(生产环境不提供 Mock)。
注意事项
- 仅对通过 API 发起的业务生效;模拟结果以 异步通知 形式回调,请确保 Webhook 可访问且按 异步通知 要求返回
200与OK。 - 同一通知可能重复推送,商户侧需保证 幂等 处理。
- 字段名、枚举值须与 Open API 文档及线上下拉选项一致;状态为
Returned/Rejected等时,部分打回相关字段才会展示。
# User(子商户 / 店铺)
| 模拟操作 | 对应通知 | 后端路径 |
|---|---|---|
| 子商户审核通知 | User Notification | POST /kyc/api/v1/kyc/mock |
| 店铺审核通知 | Shop Notification | POST /user/api/v1/shop/mock |
# 子商户审核通知(User Notification)
当子商户审核结果为 打回(Returned) 且需补充材料时,可通过 更新子商户 (opens new window) 接口字段 extra_document 重新提交。
| 字段 | 说明 |
|---|---|
| Client Id | 创建子商户返回的 client_id。 |
| Status | 审核状态:Approved(通过 / Active)、Declined(拒绝 / Deact)、Suspend(冻结)、Returned(打回)。 |
| Return Field | 打回字段(Status 为 Returned 时填写)。 |
| Return Reason | 打回原因。 |
| Need Extra Document | 是否需补充材料:Y / N。 |
| Document Description | 补充材料说明(Need Extra Document 为 Y 时填写)。 |
# 店铺审核通知(Shop Notification)
店铺被打回时,通过 更新店铺 (opens new window) 重新提交。
| 字段 | 说明 |
|---|---|
| Shop Id | 创建店铺返回的 shop_id。 |
| Status | Approved(通过)、Rejected(打回)、PendingReview(待审核,以实际通知为准)。 |
| Return Reason | 打回原因(Status 为 Rejected 时填写)。 |
# GlobalAccount(全球收款账户)
| 模拟操作 | 对应通知 | 后端路径 |
|---|---|---|
| 收款账户状态通知 | Global Account Notification | POST /user/api/v1/va/mock |
| 编辑收款账户 | Edit Global Account | POST /user/api/v1/va/mock(flag 区分删除/恢复) |
# 收款账户状态通知(Global Account Notification)
| 字段 | 说明 |
|---|---|
| GA Id | 创建收款账户返回的 ga_id(参数名 biz_id)。 |
| Status | 账户状态,如 Active。 |
# 编辑收款账户(Edit Global Account)
对 Collection 类型账户执行删除或恢复时,会联动处理关联店铺。
| 字段 | 说明 |
|---|---|
| GA Id | 收款账户 ga_id(biz_id)。 |
| Action | Delete(删除,flag=0)/ ReStore(恢复,flag=1)。 |
# Collection(收款 / 入账)
| 模拟操作 | 对应通知 | 后端路径 |
|---|---|---|
| 收到入账通知 | Collection Notification (Pending) | POST /inbound/api/v1/collect/mock |
| 入账审核结果 | Collection Notification (Audit Result) | POST /inbound/api/v1/collect/review/mock |
| 入账需要材料通知 | Collection Attachment Notification | POST /inbound/api/v1/collect/attachment/mock |
| 入账材料审核结果 | Collection Attachment Audit Result Notification | POST /inbound/api/v1/collect/attachment/review/mock |
| 入账退回审核结果 | Refund Notification | POST /inbound/api/v1/collect/refund/mock |
# 模拟入账(推荐流程)
创建收款账户 完成后,在 Request Mock (opens new window) 中选择 Collection → Collection Notification (Pending) 模拟入账。
完整入账流程
- 收到入账通知 — Collection Notification (Pending)
- 入账需要材料通知 — Collection Attachment Notification
- 提交入账材料
- 入账材料审核结果 — Collection Attachment Audit Result Notification
- 入账审核结果 — Collection Notification (Audit Result)
若仅需充值账户余额,可忽略材料相关步骤。
第一步:收到入账通知
| 字段 | 说明 |
|---|---|
| Account Number | 接收入账的收款账号。 |
| Amount | 入账金额。 |
第二步:入账需要材料通知
| 字段 | 说明 |
|---|---|
| Order Id | 第一步返回的 order_id。 |
| Attachment Type | 材料类型:B2B、B2C、WEBSTORE、BankRequirement、ContractOrder 等。 |
第三步: 提交入账材料
第四步:入账材料审核结果
| 字段 | 说明 |
|---|---|
| Order Id | 入账 order_id。 |
| State | Approved / Declined。 |
| Reason | 审核失败原因。 |
第五步:入账审核结果
在 Mock 工具中选择 Collection Notification (Audit Result):
| 字段 | 说明 |
|---|---|
| Order Id | 入账 order_id。 |
| Status | Success / Failure。 |
# 入账退回审核
入账审核 失败 后可模拟退回,流程见 入账退回。
| 字段 | 说明 |
|---|---|
| Order Id | 失败入账的 order_id。 |
| Status | Success / Cancel。 |
# Issuing(湃付卡)
| 模拟操作 | 对应通知 / 场景 | 后端路径 |
|---|---|---|
| 开卡结果回调 | Card Apply Callback | POST /issuing/gw/mock/trade/cardApply |
| 充值回调 | Recharge Callback | POST /issuing/gw/mock/trade/recharge |
| 提现回调 | Withdraw Callback | POST /issuing/gw/mock/trade/withdraw |
| 销卡回调 | Close Card Callback | POST /issuing/gw/mock/trade/closeCard |
| 模拟授权交易 | Mock Authorization | POST /issuing/gw/mock/trade/authorization |
| 模拟清算 | Mock Clearing | POST /issuing/gw/mock/trade/clearing |
| 模拟冲正 | Mock Reversal | POST /issuing/gw/mock/trade/reversal |
| 模拟退款 | Mock Refund | POST /issuing/gw/mock/trade/refund |
常见字段:Card Id、Transaction Id、Status(Success / Failure)、授权类场景的金额/币种/商户信息等。详见 湃付卡异步通知 与 Open API Issuing (opens new window)。
# Payment(付款 / 转账 / 结汇)
| 模拟操作 | 对应通知 | 后端路径 |
|---|---|---|
| 收款人审核结果 | Payee Notification | POST /user/api/v1/payee/mock |
| 付款审核结果 | Payment Notification | POST /outbound/api/v1/payment/mock |
| 付款退票 | Payment Refund Notification | POST /outbound/api/v1/payment/refund/mock |
| 转账审核结果 | Transfer Notification | POST /outbound/api/v1/transfer/mock |
| 结汇订单审核结果 | Repatriation Notification | POST /order-center/api/v1/order/notify/mock |
| 物流审核结果 | Supplement Logistics Notification | POST /order-center/api/v1/contract/order/logistic/mock |
# 收款人审核
| 字段 | 说明 |
|---|---|
| Payee Id | 创建收款人 (opens new window) 返回的 payee_id。 |
| Status | Approved / Declined。 |
# 付款审核
| 字段 | 说明 |
|---|---|
| Order Id | 创建付款 (opens new window) 返回的 order_id。 |
| Status | Success / Failure。 |
# 付款退票
| 字段 | 说明 |
|---|---|
| Order Id | 付款 order_id。 |
# 转账审核
| 字段 | 说明 |
|---|---|
| Order Id | 创建转账 (opens new window) 返回的 order_id。 |
| Status | Success / Failure。 |
# 结汇订单审核
| 字段 | 说明 |
|---|---|
| Batch No | B2B 创建合同订单 (opens new window) 或 B2C 导入订单 (opens new window) 返回的 batch_no。 |
| Status | Approved / Rejected。 |
# 物流审核结果
须先通过 补充合同物流 (opens new window) 提交物流信息,再模拟审核通知。
| 字段 | 说明 |
|---|---|
| Batch No | B2B 结汇返回的 batch_no。 |
| Status | Approved / Rejected。 |