SuperAPI AI 工具集

paystack-charges

编程与开发

查看项目

更新于 10-16 07:59

技能介绍

用途:该技能让开发者绕过 Paystack 标准结账页,直接控制使用哪种支付渠道发起收款。依赖 paystack-setup 提供的 paystackRequest 助手与环境配置。

主要能力:Charge API 是分步流程。创建收款后,Paystack 可能要求进一步验证:send_pin、send_otp、send_phone、send_birthday、send_address、pending 或 success。对应端点包括 POST /charge 创建收款,POST /charge/submit_pin、/charge/submit_otp、/charge/submit_phone、/charge/submit_birthday、/charge/submit_address 提交验证信息,GET /charge/:reference 查询待处理状态。

使用方式:POST /charge 的必填参数为 email 与 amount(子单位)。通过传入渠道专属对象选择渠道:bank(尼日利亚银行账户,部分银行需 birthday;Kuda 需 phone 与 token)、ussd(目前仅支持尼日利亚 GTBank 的 737)、mobile_money(加纳 mtn/atl/vod,肯尼亚 mpesa 或 mptill,科特迪瓦 orange/wave)、qr(南非 scan-to-pay)、eft(南非 ozow)、capitec_pay(identifier_key 可为 CELLPHONE、IDNUMBER、ACCOUNTNUMBER)、bank_transfer(可设 account_expires_at)、authorization_code(可配 pin)。还支持 split_code、subaccount、transaction_charge、bearer 等分账参数。

状态处理:当 status 为 pending 时,应至少等待 10 秒再轮询查询,以避免触发限流。返回 success 或 failed 即结束流程。

限制:Charge API 比标准结账更复杂,仅在需要直接控制支付渠道时使用。各渠道与 provider 受国家限制。PIN 与 OTP 的提交必须在服务端完成,绝不能在客户端收集或传输。资料未提供收费、价格与具体使用效果信息。