nextapi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNextPay Partners API
NextPay Partners API
Overview
概述
Use this as the broad integration skill for NextPay Partners API v2. Start with for routing, then read the topic directory that matches the task, and use the live OpenAPI URL for exact current endpoints, schemas, enums, and parameter details.
references/README.md将此作为NextPay Partners API v2的通用集成指南。首先查看了解路由信息,然后阅读与任务匹配的主题目录,并使用实时OpenAPI URL获取当前准确的端点、模式、枚举和参数细节。
references/README.mdFreshness
时效性说明
Treat the markdown references as routing guides, not the source of truth for current wire shapes. Use when exact fields, enums, endpoint availability, or behavior matter.
https://api.partners.nextpay.world/v2/openapi将Markdown参考文档视为路由指引,而非当前接口数据结构的权威来源。当需要确切的字段、枚举、端点可用性或行为信息时,请使用。
https://api.partners.nextpay.world/v2/openapiQuick Decision Tree
快速决策树
text
Need merchant or account work?
└─ references/core/
Need to collect money?
└─ references/money-in/
Need to disburse money?
└─ references/money-out/
Need webhooks or event delivery?
└─ references/integration/
Need sandbox testing?
└─ references/sandbox/
Need exact wire shapes?
└─ `https://api.partners.nextpay.world/v2/openapi`text
需要处理商户或账户相关工作?
└─ references/core/
需要收款?
└─ references/money-in/
需要付款?
└─ references/money-out/
需要处理Webhook或事件推送?
└─ references/integration/
需要沙箱测试?
└─ references/sandbox/
需要确切的接口数据结构?
└─ `https://api.partners.nextpay.world/v2/openapi`Workflow
工作流程
- Use as the API base URL.
https://api.partners.nextpay.world - Use HTTP Basic Auth with the Client ID as the username and the Client Secret as the password.
- Read to choose the right resource family before writing code.
references/README.md - Read the matching topic directory under for the operational model and endpoint shortlist.
references/ - Read targeted sections of for exact request bodies, enums, headers, and response fields.
https://api.partners.nextpay.world/v2/openapi - Explain whenever it appears. Precision notation means the integer amount stores minor units, so
PHP/2means PHP 100.00.10000
- 使用作为API基础URL。
https://api.partners.nextpay.world - 使用HTTP Basic Auth认证,以Client ID作为用户名,Client Secret作为密码。
- 在编写代码前,先阅读以选择合适的资源类别。
references/README.md - 阅读下对应的主题目录,了解操作模型和端点列表。
references/ - 查阅的目标章节,获取确切的请求体、枚举、请求头和响应字段信息。
https://api.partners.nextpay.world/v2/openapi - 当出现时需注意:该精确表示法意味着整数金额存储的是最小货币单位,例如
PHP/2代表100.00菲律宾比索(PHP)。10000
Resource Selection
资源选择
- Use merchants for legal-entity level onboarding and updates.
- Use accounts for balances, postings, and account-to-account transfers.
- Use funding methods for reusable receiving instruments.
- Use payment intents for one-time collection flows tied to a payment instrument lifecycle.
- Use payout requests to initiate disbursements. A payout request can fan out into multiple payouts when rail limits require splitting.
- Use payouts to inspect the individual disbursement records created from a payout request.
- Use webhooks to register event delivery endpoints and manage or
activestatus.inactive - Use payment simulation only in test environments to exercise the real payment-processing and webhook paths without live provider traffic.
- 使用merchants资源进行法律实体层面的入驻和信息更新。
- 使用accounts资源处理余额、过账和账户间转账。
- 使用funding methods资源管理可重复使用的收款工具。
- 使用payment intents资源处理与支付工具生命周期绑定的一次性收款流程。
- 使用payout requests资源发起付款操作。当支付渠道存在限额需要拆分时,一个付款请求可以生成多个付款记录。
- 使用payouts资源查看由付款请求生成的单个付款记录。
- 使用webhooks资源注册事件推送端点,并管理其(激活)或
active(停用)状态。inactive - 仅在测试环境中使用payment simulation(支付模拟)功能,无需真实支付服务商流量即可测试完整的支付处理和Webhook流程。
Integration Notes
集成注意事项
- Prefer idempotency keys on create endpoints that expose . Idempotency means a retry can avoid creating duplicate side effects.
X-Idempotency-Key - Do not promise a payment-intent expiry webhook. The spec says expiry is represented by , so fetch the resource if confirmation is needed.
expires_at - When event timing matters, read .
references/integration/webhooks.mdis the earliest positive payment signal,v2.payment_instrument.payment_receivedis the stronger settlement signal, andv2.payment_instrument.payment_settledis the one-time business completion event.v2.payment_intent.succeeded - Expect mixed error payloads. Rate limits often use Problem Details fields such as ,
type,title,status, anddetail, while some validation or not-found responses use simplercodeanderrorfields.code - Read the live OpenAPI event enum before hard-coding handlers, because the allowed values include both older event names and v2-specific event names.
- Use sandbox payment simulation to test success, failure, and idempotent replay behavior. The simulation response can return ,
payment_processed, orpayment_failed.already_processed
- 对于支持的创建类端点,建议使用幂等键。幂等性意味着重试请求不会产生重复的副作用。
X-Idempotency-Key - 不要承诺会提供payment-intent过期的Webhook。根据规范,过期信息由字段表示,若需确认请主动获取该资源信息。
expires_at - 当关注事件时序时,请阅读。
references/integration/webhooks.md是最早的付款成功信号,v2.payment_instrument.payment_received是更可靠的清算完成信号,而v2.payment_instrument.payment_settled是一次性的业务完成事件。v2.payment_intent.succeeded - 需注意错误响应格式可能不一致。速率限制相关错误通常使用Problem Details字段,如、
type、title、status和detail,而部分验证或资源不存在的响应则使用更简洁的code和error字段。code - 在硬编码事件处理程序前,请查阅实时OpenAPI的事件枚举值,因为允许的事件名称既包含旧版名称也包含v2专属名称。
- 使用沙箱支付模拟测试成功、失败和幂等重试行为。模拟响应可能返回、
payment_processed或payment_failed。already_processed
Quick Start
快速开始
bash
curl -u "$NEXTPAY_CLIENT_ID:$NEXTPAY_CLIENT_SECRET" \
https://api.partners.nextpay.world/v2/merchantsbash
curl -u "$NEXTPAY_CLIENT_ID:$NEXTPAY_CLIENT_SECRET" \
https://api.partners.nextpay.world/v2/merchantsReferences
参考资料
- Read first for routing and domain differences.
references/README.md - Read ,
references/core/,references/money-in/,references/money-out/, orreferences/integration/for topic-specific guidance.references/sandbox/ - Read when webhook event meaning or timing matters.
references/integration/webhooks.md - Read for the live current contract.
https://api.partners.nextpay.world/v2/openapi
- 首先阅读了解路由和领域差异。
references/README.md - 阅读、
references/core/、references/money-in/、references/money-out/或references/integration/获取特定主题的指导。references/sandbox/ - 当需要了解Webhook事件含义或时序时,阅读。
references/integration/webhooks.md - 查阅获取当前的实时接口约定。
https://api.partners.nextpay.world/v2/openapi