CHATGPT RECHARGE API

API integration.

Automate ChatGPT subscriptions with one API. Let customers scan to pay, or use your prepaid balance.

Go · Plus · ProHTTPS / JSONSettlement price = official USD price × latest exchange rate

Authentication

Activate your account and create a dedicated recharge key. Use Bearer authentication from your server.

BASE URLhttps://llmapi.pro/api/recharge/v1
Authorization: Bearer ra_your_private_key
Content-Type: application/json

Keys are shown in full only once. Store them securely on your server, never in webpages, apps or logs.

Products & pricing

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.

Go chatgpt_goPlus chatgpt_plusPro chatgpt_pro

Create a recharge order

One order endpoint supports two payment methods. Your application chooses the method; this console manages your account, keys and finances.

Customer QR payment

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"
Prepaid balance

Start on submission

Fund your recharge wallet first. Each order debits the platform quote, suitable for systems that already collect customer payments.

payment_mode: "wallet"
Node.js · Customer QR payment
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.

Use prepaid balance instead
{
  "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.

Response
{ "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"
  }
}

Query order status

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}
Awaiting payment→Queued→In progress→Completed

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.

Recovery

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.

Endpoints

MethodPathPurpose
GET/balanceAvailable balance
GET/productsProducts & pricing
POST/ordersCreate a recharge order
GET/orders/{id}Query order status
GET/orders?before={cursor}List orders with pagination
POST/orders/{id}/credentialsRecovery
POST/orders/{id}/refundRefund
Errors & retries

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.

BUILD WITH YOUR AGENT

Connect with your AI agent

Copy a complete integration prompt for your development agent to connect fulfillment to your existing project.