No prepayment needed
Set your retail price and receive an Alipay QR code. A verified payment starts fulfillment; the margin is credited after completion.
payment_mode: "alipay"Automate ChatGPT subscriptions with one API. Let customers scan to pay, or use your prepaid balance.
Sign in to create an API key. Customer QR payments require no prepaid balance.
Activate your account and create a dedicated recharge key. Use Bearer authentication from your server.
https://llmapi.pro/api/recharge/v1Authorization: Bearer ra_your_private_key
Content-Type: application/jsonKeys are shown in full only once. Store them securely on your server, never in webpages, apps or logs.
Fetch available products and current CNY settlement prices first. All amounts are integer cents. Go, Plus and Pro use official USD monthly prices.
GET /products
{ "success": true, "products": [{
"product_key": "chatgpt_go", "currency": "CNY",
"amount_cents": 5320, "available": true,
"official_usd": 8, "usd_cny": 6.65,
"fx_updated_at": "2026-10-14T00:00:00Z",
"invoice_fee_percent": 1
}] }Prices above illustrate the response format; use live prices from /products.
chatgpt_goPlus chatgpt_plusPro chatgpt_proOne order endpoint supports two payment methods. Your application chooses the method; this console manages your account, keys and finances.
Set your retail price and receive an Alipay QR code. A verified payment starts fulfillment; the margin is credited after completion.
payment_mode: "alipay"Fund your recharge wallet first. Each order debits the platform quote, suitable for systems that already collect customer payments.
payment_mode: "wallet"const base = 'https://llmapi.pro/api/recharge/v1';
const headers = { Authorization: 'Bearer ' + process.env.RECHARGE_API_KEY };
const { products } = await fetch(base + '/products', { headers }).then(r => r.json());
const product = products.find(p => p.product_key === 'chatgpt_go' && p.available);
if (!product) throw new Error('Product unavailable');
const response = await fetch(base + '/orders', {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json',
'Idempotency-Key': businessOrderId },
body: JSON.stringify({
product_key: product.product_key,
session: customerSessionJson,
payment_mode: 'alipay',
sale_amount_cents: yourPriceCents,
max_amount_cents: product.amount_cents
})
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.code || 'Request failed');
// Display this QR code; payment may be null for an already paid order.
showPaymentQR(result.payment?.qr_code);
// Poll every 5–10 seconds; only status=completed means fulfillment is complete.
const status = await fetch(base + '/orders/' + result.order.recharge_no,
{ headers }).then(r => r.json());customerSessionJson is the complete, customer-authorized Session JSON as a string, not an object or accessToken alone. Never put keys or sessions in logs or frontend source.
For QR payments, sale_amount_cents cannot be below the platform quote; max_amount_cents caps the base settlement price. Optional invoice_requested: true adds a 1% invoice fee to the retail price, excluded from earnings. Prices are locked at order creation.
{
"product_key": "chatgpt_go",
"session": "{...}",
"payment_mode": "wallet",
"max_amount_cents": 5320
}Omit sale_amount_cents and use payment_mode: wallet (also the default). Here max_amount_cents includes the optional 1% invoice fee. Insufficient funds return 402 without creating an order.
{ "success": true, "replayed": false,
"order": {
"recharge_no": "RC...", "client_order_id": "your-order-001",
"status": "awaiting_payment", "payment_mode": "alipay",
"payment_status": "pending", "amount_cents": 6000,
"settlement_cents": 5320, "profit_cents": 680
},
"payment": {
"status": "pending", "qr_url": "https://qr.alipay.com/...",
"qr_code": "data:image/png;base64,...", "amount_cents": 6000,
"expires_at": "2026-10-14T00:30:00Z"
}
}HTTP 201 means accepted. Poll every 5–10 seconds for fulfillment status; paid does not mean completed. QR codes expire in about 30 minutes and must not be reused after expiry.
GET /orders/{recharge_no_or_client_order_id}
GET /orders?before={cursor}Earnings equal customer payment minus platform settlement and are credited only after fulfillment. Failed orders earn nothing; subsequent refunds reverse the earnings.
Use a stable 8–64 character Idempotency-Key per business order. After a timeout or 5xx, retry the same payload and key; do not create another order. Retries return replayed: true; changed payloads return 409. Limit: 120 calls/minute per account.
Inspect required_action, customer_message and submitted_at. Update the Session or request a refund as indicated; never reorder an existing paid purchase.
POST /orders/{recharge_no}/credentials
{ "session": "{...}", "expected_submitted_at": "...",
"confirm_account_change": true }
POST /orders/{recharge_no}/refund
{ "confirm_refund": true, "expected_submitted_at": "..." }Use the exact returned submitted_at as expected_submitted_at. Set confirm_account_change: true only when a different account is required. Self-service refunds require an eligible failed order; otherwise 409 requires support review. Confirmed QR refunds return to the original payment method; wallet refunds restore prepaid funds.
| Method | Path | Purpose |
|---|---|---|
| GET | /balance | Available balance |
| GET | /products | Products & pricing |
| POST | /orders | Create a recharge order |
| GET | /orders/{id} | Query order status |
| GET | /orders?before={cursor} | List orders with pagination |
| POST | /orders/{id}/credentials | Recovery |
| POST | /orders/{id}/refund | Refund |
400 invalid input; 401 invalid key; 402 insufficient funds; 403 inactive account; 409 idempotency, price or state conflict; 429 rate limit; 502/503 unavailable — retry the same key.
Copy a complete integration prompt for your development agent to connect fulfillment to your existing project.
Integrate LLM API ChatGPT recharge at https://llmapi.pro/api/recharge/v1 using server-side Authorization: Bearer <dedicated ra_ key>. GET /products for product_key, amount_cents and available. Amounts are integer CNY cents. POST /orders with a stable 8–64 character Idempotency-Key, product_key, session (complete authorized Session JSON string), and payment_mode. For alipay require sale_amount_cents >= platform price and max_amount_cents (base settlement cap); show payment.qr_code/qr_url/expires_at. For wallet omit sale_amount_cents; max_amount_cents includes the optional invoice fee. invoice_requested:true adds 1% invoicing fee, excluded from earnings. Poll GET /orders/{recharge_no or client_order_id} every 5–10 seconds; only completed means fulfilled. Payment alone does not mean completion. After timeout/5xx retry the identical payload and key; never reorder. Handle 409 and all awaiting_payment, awaiting_details, queued, processing, completed, failed, refunded states and required_action. POST /orders/{id}/credentials with session and expected_submitted_at; confirm_account_change:true only for account replacement. POST /orders/{id}/refund with confirm_refund:true and expected_submitted_at is restricted to refundable failed orders. GET /orders?before={cursor} paginates; GET /balance reads prepaid funds. Limit 120 calls per minute per account. Never expose keys or Session data in frontend source, logs or plaintext storage. Use mocks to test idempotency, price changes, failures and refunds without real payments.