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

MethodPathPurpose
GET/api/v1/productsProducts on sale, prices, tiers and stock status
GET/api/v1/products/{slug}Product details
GET/api/v1/payment-methodsAvailable payment method (stripe)
POST/api/v1/ordersCreate 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-monthly

Create an order

FieldTypeRequiredDescription
product_slugstringYesOne of the four combined subscription products
emailstringYesEmail for order notifications and tracking
variant_idintegerNoProduct variant ID; uses the default variant when omitted
quantityintegerNoQuantity, 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'
stateMeaning
pendingAwaiting payment
awaiting_stockPaid, waiting for restocking
deliveredDelivered; the delivery field is available
refundingRefund in progress
closedOrder closed or refund completed

Error codes

HTTPerrorDescription
400INVALID_REQUESTA request field is malformed
401UNAUTHORIZEDOrder token is missing, invalid or expired
404PRODUCT_NOT_FOUNDProduct does not exist or has been removed
409PRODUCT_UNAVAILABLEProduct is not currently on sale
409IDEMPOTENCY_CONFLICTIdempotency key was used with different order parameters
429RATE_LIMITEDToo many requests
502CHECKOUT_FAILEDCould not create Stripe Checkout session