BUYER API
GROK BLACK FRIDAY Buyer API
Use the JSON API to browse products, create Stripe orders and check payment and delivery status with an order token. Provide the order email when creating an order; it is used for notifications, tracking and support verification.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/products | Products on sale, prices, tiers and stock status |
| GET | /api/v1/products/{slug} | Product details |
| GET | /api/v1/payment-methods | Available payment method (stripe) |
| POST | /api/v1/orders | Create an order and return a Stripe Checkout link |
| GET | /api/v1/orders/{tradeNo} | Payment, restocking, refund and delivery status |
Product queries
curl https://grokblackfriday.homes/api/v1/products
curl https://grokblackfriday.homes/api/v1/products/grok-x-cursor-plus-monthlyCreate an order
| Field | Type | Required | Description |
|---|---|---|---|
| product_slug | string | Yes | One of the four combined subscription products |
| string | Yes | Email for order notifications and tracking | |
| variant_id | integer | No | Product variant ID; uses the default variant when omitted |
| quantity | integer | No | Quantity, default 1; current products are sold as single units |
The server validates the email format and attaches it to the order. You may send an Idempotency-Key header to prevent duplicate creation.
Request example
{
"product_slug": "grok-x-cursor-plus-monthly",
"email": "buyer@example.com",
"quantity": 1
}Success response
{
"code": 201,
"msg": "success",
"data": {
"order": {
"trade_no": "GG20261123123000A1B2C3D4",
"state": "pending",
"product_slug": "grok-x-cursor-plus-monthly",
"product_name": "Grok · X · Cursor Plus Monthly",
"amount": "102.00",
"currency": "CNY",
"payment_method": "stripe",
"payment_url": "https://checkout.stripe.com/...",
"message": "Order created. Complete payment to continue."
},
"order_token": "eyJraW5kIjoiYXBpX29yZGVyIi...signature",
"order_token_expires_at": "2026-12-23T12:30:00.000Z",
"duplicate": false
}
}order_token is valid for 30 days by default and is returned only when the order is created. Store it securely with the order number and never publish it or write it to logs.
Track an order
Send the order token in the Bearer authorization header. The delivery field is populated only after delivery; it is not returned for unpaid or restocking orders.
curl https://grokblackfriday.homes/api/v1/orders/GG20261123123000A1B2C3D4 \
-H 'authorization: Bearer eyJraW5kIjoiYXBpX29yZGVyIi...signature'| state | Meaning |
|---|---|
| pending | Awaiting payment |
| awaiting_stock | Paid, waiting for restocking |
| delivered | Delivered; the delivery field is available |
| refunding | Refund in progress |
| closed | Order closed or refund completed |
Error codes
| HTTP | error | Description |
|---|---|---|
| 400 | INVALID_REQUEST | A request field is malformed |
| 401 | UNAUTHORIZED | Order token is missing, invalid or expired |
| 404 | PRODUCT_NOT_FOUND | Product does not exist or has been removed |
| 409 | PRODUCT_UNAVAILABLE | Product is not currently on sale |
| 409 | IDEMPOTENCY_CONFLICT | Idempotency key was used with different order parameters |
| 429 | RATE_LIMITED | Too many requests |
| 502 | CHECKOUT_FAILED | Could not create Stripe Checkout session |