先存后付
本产品适用于收集用户卡号和扣款环节分离的业务场景。由商户提供是否存卡选项,当用户选中存卡选项并点击支付后,商户获取 customerId 并调用 confirmPaymentMethod API 将当前客户和卡信息进行绑定,方便在之后的场景或延后发起扣款。
Step 1. 收集用户的卡号信息,通过js sdk获取到 customerPaymentMethodId。

保存卡号
Step 2.在未来需要付款的业务环节,调用接口进行扣款。

在之后的场景付款
该 customerId 应该与商户网站用户唯一标识互相绑 定。
调用当前接口时如果传入 customerId,AsiaBill将对 customerId 和 customerPaymentMethodId 进行自动绑定。
在步骤2中对 customerId 和 customerPaymentMethodId 进行绑定后,立即扣款是非必要的,商户可自行保存 customerId 和 customerPaymentMethodId,以便在未来的场景中进行扣款。