Short answer: OpenAI does not accept Alipay on its own API billing page. If you are a developer in China and you want OpenAI-compatible API access with local top-up methods, the practical route is to use a gateway that supports those payment rails and exposes an OpenAI-compatible endpoint.
Router One is built for that workflow. You top up your Router One wallet with a card or Alipay through one hosted checkout, create an API key, and point your OpenAI SDK at https://api.router.one/v1. Your code still uses OpenAI-compatible requests, but billing and routing are handled by Router One.
This guide is intentionally narrow. It is not about ChatGPT Plus account resale or virtual cards. It is about calling LLM APIs from code, paying with payment methods Chinese developers already have, and keeping enough traceability to run the workload safely.
The setup in one screen
If your app already uses the OpenAI SDK, the configuration is just:
export OPENAI_BASE_URL=https://api.router.one/v1
export OPENAI_API_KEY=sk-your-router-one-key
Then keep your existing OpenAI-compatible code:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: process.env.OPENAI_BASE_URL,
});
const response = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Explain Router One in one sentence." }],
});
The same pattern works for many tools that let you override an OpenAI-compatible base URL: the OpenAI SDK, Vercel AI SDK, LangChain, OpenClaw, and internal tools that read OPENAI_BASE_URL. (Codex CLI points at the same endpoint through a provider block in its config file — see the CLI setup guide.)
Why this is different from direct OpenAI billing
Direct OpenAI billing is tied to OpenAI's supported countries, card checks, and risk controls. Mainland-issued Visa or Mastercard cards may fail before any API call happens. Alipay is not a normal checkout option on OpenAI's own API billing page.
Router One separates the developer interface from the billing rail:
| Layer | Direct OpenAI API | Router One path |
|---|---|---|
| API shape | OpenAI-compatible | OpenAI-compatible |
| Base URL | https://api.openai.com/v1 | https://api.router.one/v1 |
| Payment | OpenAI-supported card rails | Card or Alipay in one hosted checkout, stablecoins on six chains |
| Models | OpenAI models | GPT, Claude, Gemini, DeepSeek, Qwen, Doubao, more |
| Visibility | Provider dashboard | Per-request trace with model, tokens, cost, latency |
If your requirement is specifically "pay OpenAI directly with Alipay", that is not the product. If your requirement is "call OpenAI-compatible APIs from China and pay locally", this is the clean path.
Step 1: Create the key
Sign up at router.one, open the dashboard, and create a project API key. Use separate keys for separate workloads: production app, staging, local development, Codex CLI, and batch jobs. That makes cost attribution much easier later.
For CLI and agent tools, the CLI setup guide has copyable examples for OpenAI-compatible and Anthropic-compatible clients.
Step 2: Top up with a card or Alipay
Note (2026-07-25): WeChat Pay is no longer offered. RMB top-up runs through Alipay in the hosted checkout, alongside card payments and USDT/USDC on six chains.
Open the billing page, enter an amount, and continue to the hosted checkout. Card and Alipay are both offered there — confirm the amount before you pay. Wallet balance is denominated in USD after conversion. The checkout page is the source of truth for minimum top-up, FX, and channel fees.
For the payment-specific surface, see the Alipay LLM API page, the RMB top-up landing page, and the older practical guide on paying for OpenAI and Claude API from China.
The machine-readable payment boundary is also published at the machine-readable payment facts, and the broader pricing rules are documented in 定价方法说明.
Step 3: Verify the request trace
Do not stop at "the request returned". For production work, check the trace:
- Which model served the request
- How many input and output tokens were billed
- What the request cost
- Whether fallback happened
- Which API key made the call
- Whether the key is close to its budget cap
The value of a gateway is not only reachability. It is the audit trail when something costs more than expected or behaves differently from yesterday.
When to choose this path
Use this route if:
- You are in China and direct
api.openai.comis unreliable - You need Alipay rather than a foreign credit card
- You want one key that can reach GPT, Claude, Gemini, DeepSeek, Qwen, and Doubao
- You need per-key budgets and request-level cost traces
- You want Codex CLI, Claude Code, or other AI coding tools to share the same wallet
Do not use this route if your only requirement is the consumer ChatGPT web product. ChatGPT Plus and API access are separate products. For that distinction, read the ChatGPT Plus and GPT API China guide.
Production checklist
Before shipping traffic through any API provider or gateway, verify these five items:
- Base URL - your app is using
https://api.router.one/v1for OpenAI-compatible calls. - Key isolation - production, staging, local development, and agents use different keys.
- Spend caps - each key has an appropriate budget limit.
- Trace visibility - dashboard logs show model, tokens, cost, latency, and status.
- Data boundary - your team has read the relevant trust pages, including the integration facts sheet and 数据留存说明.
FAQ
Can I pay OpenAI directly with Alipay? Not in the normal OpenAI API billing flow. Router One is a gateway path: you pay Router One, receive a Router One API key, and call an OpenAI-compatible endpoint.
Can I keep my existing OpenAI SDK code? Yes. Change the base URL and API key. The request shape remains OpenAI-compatible.
Does this only work for OpenAI models? No. The point of the gateway is that the same OpenAI-compatible shape can route to GPT, Claude, Gemini, DeepSeek, Qwen, Doubao, and other supported models.
Where should I start? Use the Alipay LLM API page if payment is the blocker, or the OpenAI-compatible API page if integration is the blocker.