Payments
Accept a payment, confirm it on your server, and deliver the purchase to your customer. These guides walk you through that flow with NextAppMarket, then show you how to recover interrupted payments and issue refunds.
If you are integrating a native app, start with Alipay App or WeChat App. If you are starting your backend as well, follow Build your first checkout first.
Choose how your customer pays
| Your checkout | Guide | What your client receives |
|---|---|---|
| Android or iOS app, Alipay | Alipay App | A signed string for the Alipay SDK. |
| Android or iOS app, WeChat | WeChat App | Signed fields for a WeChat SDK payment request. |
| Mobile website, WeChat | WeChat H5 | A URL that opens the WeChat payment flow. |
| Screen or desktop checkout, WeChat | WeChat QR code | A provider payment URI to encode as a QR code. |
| Mobile website, Alipay | Alipay mobile web | Hosted checkout instructions. |
| Desktop website, Alipay | Alipay desktop web | A hosted checkout URL. |
| Screen or desktop checkout, Alipay | Alipay QR code | A hosted checkout URL to encode as a QR code. |
| Android app, Huawei product | Huawei in-app purchases | A product mapping; purchase starts in Huawei's SDK. |
Each guide includes order creation, client handoff, payment launch, result handling, and a path to refunds. Use only entries activated for your application. See release notes for the target contract and rollout status.
Follow a payment from start to finish
- Create the order on your backend. Authenticate your customer, calculate the price, and save a business order. Create its payment session using the Payment API.
- Start payment in your app. Pass the returned invocation to the selected SDK, browser, or QR renderer. Keep the API key on your server.
- Confirm the result. On SDK return or app resume, ask your backend to retrieve the original platform order. Receive webhooks so this also works when the app is closed.
- Deliver once. When the authoritative order is
paidand matches your purchase, record fulfillment in a durable transaction. - Handle the rest of the lifecycle. Retrieve orders, close unpaid attempts, and request and track refunds through the same stored order mapping.
Huawei uses purchase evidence instead of creating a WeChat or Alipay payment session. Its dedicated guide covers that sequence.
What you build
Your app owns the checkout screen, customer account, order history, and product delivery. Your backend owns pricing, authentication, payment requests, and fulfillment. NextAppMarket creates provider payment instructions, confirms financial results, and processes refund requests.
The app calls your backend. Your backend calls https://pay.appconnect.cn/payment/v1. You do not need the Business API to complete the standard app checkout below; it provides additional reporting, eligibility, and financial operations.
Consumer amounts use integer CNY fen: 10000 means CNY 100.00. These guides cover one-time payments, including Huawei consumables and non-consumables. They do not create recurring subscriptions.
Continue building
- Build your first checkout: the shared app-to-backend flow.
- Build your payment backend: persistence, request handling, and a downloadable HTTP client.
- Confirm payment and fulfill an order: authoritative status, polling, and delivery.
- Refund a payment: full and partial refunds with status tracking.
- Test your integration: the cases to pass before launch.
- Payments API reference: exact endpoints, fields, and schemas.
Connect the app UI with Connect your app to checkout: Android and iOS HTTP helpers, browser Pay buttons, persistent order references, and the shared return/status page. Then follow the SDK or browser instructions in your selected payment-method guide.