PolarMunch API

Build your own food ordering platform. Whataburger, Insomnia Cookies, DoorDash delivery, Domino's, Taco Bell account gen, and more — all via one API.

v2.3

⚡ Quick Start

1
Get your API keyAsk the operator for a key (format: rk_...)
2
Set the headerSend X-API-Key on every request
3
Set up a webhookReceive order results at your HTTPS endpoint
4
Start orderingParse links, queue orders, profit
Base URL: https://polarmunch.com
Rate limit: 60 requests/min per key. Returns 429 with retry_after if exceeded.

🔒 Authentication

Every request requires your API key in the X-API-Key header.

curl -H "X-API-Key: rk_your_key_here" https://polarmunch.com/api/key/info

Invalid or missing keys return 401. Revoked keys return 403.

🔄 How It Works

Step 1Parse
→
Step 2Collect Payment
→
Step 3Queue
→
Step 4Processing
→
Step 5Result

1. Select service — Choose from Whataburger, Insomnia Cookies, DoorDash, Taco Bell, or Gas Rewards.

2. Create order — Use the service-specific API to build an order (e.g. /api/wb/order for Whataburger).

3. Collect payment — Charge your customer however you want (Stripe, PayPal, crypto, etc). This is entirely on your end.

4. Confirm — Confirm the order via the API. Wholesale cost is deducted from your balance.

5. Result — Your webhook gets order.completed or order.failed. On failure, balance is refunded automatically.

📡 General Endpoints

GET /api/key/info

Your account details, pricing tiers, and current balance.

{
  "reseller": "Chef_Luka",
  "guild_id": "1423071325974560780",
  "server_name": "Max Eats",
  "balance": 342.00,
  "entree_price": 7.00,
  "bulk_price": 6.00,
  "bulk_threshold": 2,
  "premium_entree_price": 8.00,
  "premium_bulk_price": 7.00,
  "max_entrees_per_order": 4,
  "max_orders_per_day": 5,
  "orders_today": 2,
  "total_orders": 158,
  "total_entrees": 235,
  "webhook_url": "https://yoursite.com/webhook",
  "webhook_active": true,
  "active": true
}

GET /api/balance

Your balance breakdown. pending_holds = wholesale cost of parsed but not yet queued orders.

{
  "balance": 342.00,
  "pending_holds": 14.00,
  "available": 328.00
}

🍔 Whataburger Endpoints

Order Whataburger entrees (burgers & chicken sandwiches) using prepaid accounts. WB orders execute immediately on confirmation — no scheduled checkout windows.

Flow: Check stock → Find stores → (Optional) Get menu for toppings → Create order → Confirm → Done
Order IDs: WB-xxxxxxxx  •  Expires: 15 minutes after creation

GET /api/wb/stock

Check Whataburger account availability and pricing for your reseller tier.

{
  "burger": {"available": 42, "in_stock": true, "price": 3.00},
  "chickn": {"available": 18, "in_stock": true, "price": 3.00},
  "max_entrees_per_order": 6,
  "wb_enabled": true
}

POST /api/wb/stores

Search for Whataburger locations near a ZIP code. Use the id field when creating orders.

Request:

{
  "zipcode": "77001",
  "count": 5
}

Response:

{
  "stores": [
    {
      "id": "1234",
      "name": "Whataburger #1234",
      "address": "123 Main St",
      "city": "Houston",
      "state": "TX",
      "zip": "77001",
      "phone": "713-555-1234"
    }
  ]
}

POST /api/wb/menu

Get available toppings for a store + item type. Use this to discover what customizations are available before placing an order.

Request:

{
  "store_id": "1234",
  "zipcode": "77001",
  "type": "burger"
}

Response:

{
  "store_id": "1234",
  "type": "burger",
  "toppings": [
    {"name": "Large Bun",    "levels": [0, 2],       "default": 2},
    {"name": "Mustard",      "levels": [0, 1, 2, 3], "default": 2},
    {"name": "Tomato",       "levels": [0, 1, 2, 3], "default": 2},
    {"name": "Lettuce",      "levels": [0, 1, 2, 3], "default": 2},
    {"name": "Pickles",      "levels": [0, 1, 2, 3], "default": 2},
    {"name": "Diced Onions", "levels": [0, 1, 2, 3], "default": 2}
  ],
  "level_labels": {"0": "None", "1": "Lite", "2": "Regular", "3": "Extra"}
}
Topping levels: 0 = None (remove), 1 = Lite, 2 = Regular (default), 3 = Extra.
Not all toppings support all levels — single-toggle items (like buns) only support [0, 2]. The levels array tells you exactly which levels are available.

POST /api/wb/order

Create a pending WB order. Reserves accounts and holds for 15 minutes. Nothing charged yet.

Request:

{
  "first_name": "John",
  "last_name": "Smith",
  "email": "[email protected]",
  "zipcode": "77001",
  "store_id": "1234",
  "items": [
    {
      "type": "burger",
      "toppings": {"Tomato": 0, "Pickles": 3, "Mustard": 1}
    },
    {
      "type": "burger"
    },
    {
      "type": "chickn",
      "toppings": {"Pickles": 3}
    }
  ]
}

items is one entry per entree. Each has a type and optional toppings dict. Topping keys are names from /api/wb/menu, values are levels (0-3). Omitted toppings keep their default. Omit toppings entirely for a default build.

Response:

{
  "order_id": "WB-a1b2c3d4",
  "status": "pending_payment",
  "store": {"id": "1234", "name": "Whataburger #1234", "address": "123 Main St, Houston, TX"},
  "items": [
    {"type": "burger", "toppings": {"Tomato": 0, "Pickles": 3, "Mustard": 1}},
    {"type": "burger", "toppings": "default"},
    {"type": "chickn", "toppings": {"Pickles": 3}}
  ],
  "entree_count": 3,
  "pricing": [
    {"type": "burger", "qty": 2, "unit_price": 3.00, "subtotal": 6.00},
    {"type": "chickn", "qty": 1, "unit_price": 3.00, "subtotal": 3.00}
  ],
  "total_price": 9.00,
  "wholesale_cost": 2.25,
  "expires_at": "2026-08-22T18:30:00+00:00",
  "balance_after": 47.75
}
ErrorStatusReason
missing_field400Required field not provided
invalid_type400Item type must be "burger" or "chickn"
invalid_zipcode400Must be a valid 5-digit ZIP
limit_exceeded400Too many entrees for your tier
store_not_found400Store ID not found near given ZIP
insufficient_stock400Not enough accounts available
insufficient_balance402Not enough balance
wb_disabled403Whataburger not enabled for your key
stock_conflict409Stock changed during order — retry

POST /api/wb/order/{order_id}/confirm

Confirm and execute the order. Wholesale cost is deducted. Orders are placed immediately (no scheduled checkout).

Request:

{
  "discord_user_id": "123456789012345678"
}

discord_user_id is optional. All other fields come from the original order.

Response:

{
  "order_id": "WB-a1b2c3d4",
  "status": "processing",
  "cost_deducted": 2.25,
  "remaining_balance": 47.75,
  "message": "Order is being placed. Poll status or wait for webhook."
}
ErrorStatusReason
not_found404Order ID doesn't exist
forbidden403Order belongs to another reseller
already_processing409Already being placed
already_finished409Already completed or failed
order_expired41015-minute window passed
insufficient_balance402Balance dropped since order creation

GET /api/wb/order/{order_id}

Check WB order status. Extra fields depend on status:

StatusExtra Fields
pending_paymentstore, items, pricing, total_price, wholesale_cost, expires_at
processingmessage
completedstore, order_numbers[], entrees[], entrees_delivered, entrees_failed, cost_deducted, refunded_amount, partial, failures[]
failedreason, refunded_amount, failures[]
expiredmessage

The entrees array gives per-entree detail: type, order_number, and pickup_time. The store object is included so you don't need to remember it from the creation step. When partial is true, some entrees succeeded and some failed — failed entrees are refunded automatically.

The failures array (present on failed and partial completed) gives per-item detail:

{
  "failures": [
    {
      "item_index": 0,
      "type": "burger",
      "reason_code": "store_closed",
      "reason": "Store is closed for online orders"
    }
  ]
}
reason_codeMeaning
store_closedStore is closed or not accepting orders
out_of_stockItem unavailable at this location
no_pickup_timesNo pickup times / at capacity
no_stockNo accounts available (our side)
account_errorAccount login/auth failure
store_errorGeneral store/location issue
validation_failedOrder validation rejected
submit_failedOrder submission rejected
order_failedOther/unknown failure

🍪 Insomnia Cookies Endpoints

Order Insomnia Cookies for pickup using loyalty accounts. Like Whataburger, orders execute immediately on confirmation. One product (Classic Cookie), 11 flavors, up to 4 per order.

Flow: Check stock → Find stores → Create order → Confirm → Done
Order IDs: IC-xxxxxxxx  •  Expires: 15 minutes after creation

GET /api/insom/stock

Check Insomnia Cookies availability, pricing, and available flavors.

{
  "insom_enabled": true,
  "cookies": {
    "available": 42,
    "in_stock": true,
    "price": 2.00
  },
  "max_cookies_per_order": 4,
  "flavors": {
    "4": "Chocolate Chunk",
    "3323": "Cookies 'N Cream",
    "16": "Double Chocolate Chunk",
    "5": "Oatmeal Raisin",
    "13": "Snickerdoodle",
    "11": "White Chocolate Macadamia",
    "12": "Peanut Butter Chip",
    "6": "Sugar",
    "323": "VGF Chocolate Chip",
    "1001": "Vegan Birthday Cake",
    "1002": "Vegan Chocolate Chunk"
  }
}

GET /api/insom/menu

Get the cookie menu with pricing. Lighter than /stock — no account counts.

{
  "flavors": {
    "4": "Chocolate Chunk",
    "3323": "Cookies 'N Cream",
    "16": "Double Chocolate Chunk",
    "5": "Oatmeal Raisin",
    "13": "Snickerdoodle",
    "11": "White Chocolate Macadamia",
    "12": "Peanut Butter Chip",
    "6": "Sugar",
    "323": "VGF Chocolate Chip",
    "1001": "Vegan Birthday Cake",
    "1002": "Vegan Chocolate Chunk"
  },
  "price_per_cookie": 2.00,
  "max_per_order": 4,
  "product_name": "Classic Cookie"
}

POST /api/insom/stores

Search for Insomnia Cookies locations near a ZIP code. Use the external_id when creating orders.

Request:

{
  "zipcode": "10001"
}

Response:

{
  "stores": [
    {
      "external_id": "73",
      "name": "Insomnia Cookies - Greenwich Village",
      "address": "164 Bleecker St",
      "city": "New York",
      "state": "NY",
      "zip": "10012",
      "lat": 40.7289,
      "lng": -73.9997
    }
  ]
}
ErrorStatusReason
invalid_zipcode400Not a valid 5-digit US ZIP code
service_unavailable503Unable to search locations right now

POST /api/insom/order

Create a pending Insomnia Cookies order. Reserves cookie accounts and holds for 15 minutes. Nothing charged yet.

Request:

{
  "first_name": "Sarah",
  "last_name": "Johnson",
  "email": "[email protected]",
  "zipcode": "10001",
  "store_id": "73",
  "cookies": [
    {"flavor_id": "4"},
    {"flavor_id": "3323"},
    {"flavor_id": "4"}
  ]
}

store_id (or store_external_id) is the external_id from /api/insom/stores. Each cookie needs a flavor_id from the menu. You can order multiples of the same flavor.

Response:

{
  "order_id": "IC-a8f3c123",
  "status": "pending_payment",
  "store": {
    "external_id": "73",
    "name": "Insomnia Cookies - Greenwich Village",
    "address": "164 Bleecker St",
    "city": "New York",
    "state": "NY",
    "zip": "10012"
  },
  "cookies": [
    {"flavor_id": "4", "flavor_name": "Chocolate Chunk"},
    {"flavor_id": "3323", "flavor_name": "Cookies 'N Cream"},
    {"flavor_id": "4", "flavor_name": "Chocolate Chunk"}
  ],
  "cookie_count": 3,
  "pricing": {"qty": 3, "unit_price": 2.00, "subtotal": 6.00},
  "total_price": 6.00,
  "wholesale_cost": 1.50,
  "expires_at": "2026-08-24T18:30:00+00:00",
  "balance_after": 340.50
}
ErrorStatusReason
missing_field400Required field not provided
invalid_zipcode400Not a valid 5-digit ZIP
invalid_flavor400Unknown flavor_id
limit_exceeded400Too many cookies for your tier
store_not_found400Store not found for given external_id
insufficient_stock400Not enough cookie accounts
insufficient_balance402Not enough balance
stock_conflict409Stock changed — retry
service_unavailable503Unable to verify store

POST /api/insom/order/{order_id}/confirm

Confirm and execute the order. Wholesale cost is deducted. Cookies are placed immediately.

Request: Empty body {} is fine.

Response:

{
  "order_id": "IC-a8f3c123",
  "status": "processing",
  "cost_deducted": 1.50,
  "remaining_balance": 340.50,
  "message": "Order is being placed. Poll status or wait for webhook."
}
ErrorStatusReason
not_found404Order doesn't exist
forbidden403Order belongs to another reseller
invalid_order400Not an Insomnia Cookies order
already_processing409Already being placed
already_finished409Already completed or failed
order_expired41015-minute window passed
insufficient_balance402Balance dropped since order creation

GET /api/insom/order/{order_id}

Check Insomnia order status. Extra fields depend on status:

StatusExtra Fields
pending_paymentstore, cookies, cookie_count, pricing, total_price, wholesale_cost, expires_at
processingmessage
completedstore, cookies[], cookies_delivered, cookies_failed, cost_deducted, refunded_amount, partial, failures[]
failedreason, refunded_amount, failures[]
expiredmessage

The cookies array gives per-cookie detail: flavor_name, flavor_id, and pickup_time. When partial is true, some cookies succeeded and some failed — failed cookies are refunded automatically.

The failures array (present on failed and partial completed) gives per-cookie detail:

{
  "failures": [
    {
      "cookie_index": 0,
      "flavor": "Chocolate Chunk",
      "reason_code": "out_of_stock",
      "reason": "Cookie currently unavailable at this location"
    }
  ]
}
reason_codeMeaning
store_closedStore is closed or not accepting orders
out_of_stockCookie/item unavailable at this location
no_pickup_timesNo pickup times / at capacity
no_stockNo accounts available (our side)
account_errorAccount login/auth failure
payment_errorFreedomPay / payment processing error
reservation_failedAccount reservation conflict
order_failedOther/unknown failure

🚚 DoorDash Endpoints

Order DoorDash delivery via the API. Submit a DoorDash cart/share link, delivery address, and VCC card details. Orders execute immediately on confirmation. Setup takes 5–10 seconds per order (live session with DoorDash).

Flow: Create order (with cart link + card) → Review pricing → Update (optional) → Confirm → Done
Order IDs: DD-xxxxxxxx  •  Expires: 15 minutes after creation

GET /api/dd/stock

Check DoorDash account availability and pricing.

{
  "dd_enabled": true,
  "accounts": {"available": 120, "in_stock": true},
  "fee": 8.00,
  "cost_per_order": 0.00,
  "max_subtotal": 25.00,
  "max_tip": 20.00,
  "blocked_stores": ["Chick-fil-A", "Raising Cane's"]
}

POST /api/dd/order

Create a pending DoorDash order. Takes 5–10 seconds (sets up a live session with DoorDash). Requires a cart/share link and VCC card details.

Request:

{
  "group_link": "https://drd.sh/cart/ABC123/",
  "address": "123 Main St, 90210",
  "card_number": "4111111111111111",
  "card_exp": "08/28",
  "card_cvv": "123",
  "card_zip": "90210",
  "name": "John Doe",
  "tip": 2.00,
  "dasher_instructions": "Leave at door"
}

group_link, address, card_number, card_exp, card_cvv, card_zip are required. name, tip (default 0), and dasher_instructions are optional.

Response:

{
  "order_id": "DD-a1b2c3d4",
  "status": "pending_payment",
  "store_name": "McDonald's",
  "items": [
    {"name": "Big Mac", "quantity": 1, "price": 5.99},
    {"name": "Large Fries", "quantity": 1, "price": 3.49}
  ],
  "items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
  "pricing": {
    "subtotal": 9.48,
    "discount": 3.79,
    "subtotal_after_discount": 5.69,
    "tip": 2.00,
    "service_fee": 8.00,
    "total": 15.69
  },
  "promo_applied": true,
  "dashpass_applied": true,
  "name": "John Doe",
  "address": "123 Main St, Los Angeles, CA 90210, USA",
  "dasher_instructions": "Leave at door",
  "expires_at": "2026-08-31T16:15:00+00:00",
  "cost_to_confirm": 0.00,
  "reseller_balance": 150.00
}
ErrorStatusReason
dd_disabled403DoorDash not enabled for this reseller
concurrent_limit429Already 3 pending DD orders
missing_field400Required field missing
invalid_card400Card fails Luhn, expired, bad CVV/zip
invalid_tip400Tip exceeds max
invalid_link400Not a valid DoorDash URL
no_accounts503No DD accounts available
insufficient_balance402Balance too low
blocked_store400Store not supported (CFA, Canes)
invalid_address400Address couldn't be resolved
empty_cart400Cart has no items
cart_link_failed400Couldn't resolve the share link
subtotal_exceeded400Exceeds max subtotal
setup_failed500Generic setup failure

POST /api/dd/order/{id}/update

Update name, tip, or dasher instructions before confirming. At least one field required.

Request:

{
  "name": "Jane Doe",
  "tip": 5.00,
  "dasher_instructions": "Ring doorbell"
}

Response:

{
  "order_id": "DD-a1b2c3d4",
  "status": "pending_payment",
  "name": "Jane Doe",
  "tip": 5.00,
  "dasher_instructions": "Ring doorbell",
  "pricing": {
    "subtotal": 9.48,
    "discount": 3.79,
    "subtotal_after_discount": 5.69,
    "tip": 5.00,
    "service_fee": 8.00,
    "total": 18.69
  }
}

POST /api/dd/order/{id}/confirm

Confirm the order. Deducts balance, submits to DoorDash. No request body needed.

Response:

{
  "order_id": "DD-a1b2c3d4",
  "status": "processing",
  "cost_deducted": 0.00,
  "remaining_balance": 150.00,
  "message": "Order is being placed. Poll status or wait for webhook."
}

POST /api/dd/order/{id}/cancel

Cancel a pending DoorDash order before confirmation.

Response:

{
  "order_id": "DD-a1b2c3d4",
  "status": "cancelled"
}

GET /api/dd/order/{id}

Get DoorDash order status. Extra fields depend on status:

StatusExtra Fields
pending_paymentstore_name, items, items_summary, pricing, name, address, dasher_instructions, expires_at, cost_to_confirm
processingmessage
completedstore_name, items_summary, tracking_url, pricing, elapsed_seconds, completed_at
failedstore_name, reason, reason_message, refunded, refunded_amount
cancelled—

Completed example:

{
  "order_id": "DD-a1b2c3d4",
  "status": "completed",
  "store_name": "McDonald's",
  "items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
  "tracking_url": "https://doordash.com/orders/...",
  "pricing": {"subtotal": 9.48, "discount": 3.79, "subtotal_after_discount": 5.69, "tip": 2.00, "service_fee": 8.00, "total": 15.69},
  "elapsed_seconds": 28.4,
  "completed_at": "2026-08-31T16:01:30+00:00"
}

Failed example:

{
  "order_id": "DD-a1b2c3d4",
  "status": "failed",
  "store_name": "McDonald's",
  "reason": "card_declined",
  "reason_message": "The payment card was declined.",
  "refunded": true,
  "refunded_amount": 0.00
}
reasonMeaning
card_declinedPayment card was declined
card_tokenization_failedCard couldn't be tokenized
address_out_of_rangeDelivery address outside store range
store_closedStore is closed
order_rejectedOrder rejected by store
payment_timeoutPayment processing timed out
session_errorDoorDash session error
unknownUnknown failure

🍕 Domino's Endpoints

Order custom Domino's pizzas for carryout via a hosted pizza builder. Unlike other endpoints, Domino's uses a web-based flow — you create a session, the customer builds their pizza on our page, then you confirm to place.

Flow: Find stores → Create order (get pizza builder link) → Customer builds pizza on page → Poll status until submitted → Confirm → Done
Order IDs: DOM-xxxxxxxx  •  Session expires: 30 minutes  •  Order expires: 45 minutes
Step 1Find Stores
→
Step 2Create Order
→
Step 3Customer Builds
→
Step 4Confirm
→
Step 5Poll Status

GET /api/dom/stores?zip=10001

Search for Domino's locations near a ZIP code. Use the id field when creating orders (optional — the pizza builder also has a store picker).

Response:

{
  "stores": [
    {
      "id": "4225",
      "storeName": "Domino's Pizza",
      "street": "123 Broadway",
      "city": "New York",
      "region": "NY",
      "postalCode": "10001",
      "etaMinutes": 25,
      "isOpen": true,
      "phone": "212-555-0100"
    }
  ]
}
ParamTypeRequiredDescription
zipstringRequired5-digit ZIP code

POST /api/dom/order

Create a Domino's order session. Returns a pizza builder link that you give to your customer. The customer picks their store, builds their pizzas, and submits. Nothing is charged yet.

Request:

{
  "first_name": "John",
  "last_name": "Doe",
  "email": "[email protected]",
  "phone": "5551234567",
  "store_id": "4225",
  "callback_url": "https://your-site.com/dom-done"
}
FieldTypeRequiredDescription
first_namestringRequiredCustomer first name
last_namestringRequiredCustomer last name
emailstringRequiredCustomer email
phonestringRequired10-digit phone number (digits only, no dashes)
store_idstringOptionalPre-select a Domino's store on the builder page
callback_urlstringOptionalURL to redirect customer after they submit their pizza. We append ?order_submitted=true&order_id=...&pizzas=N&total=X

Response:

{
  "order_id": "DOM-a1b2c3d4",
  "order_link": "https://wecookedforyou.com/dom/abc123...",
  "status": "awaiting_submission",
  "expires_at": "2026-09-05T14:15:00+00:00",
  "max_pizzas": 3,
  "price_per_pizza": 5.00,
  "bulk_price": 4.50,
  "bulk_threshold": 3
}
Give order_link to your customer. They'll see a full pizza builder with store picker, sauce/cheese/topping customization, and a submit button. Their name, email, and phone are pre-filled and locked. After they submit, poll GET /api/dom/order/{id} until status is submitted, then call /confirm.
ErrorStatusReason
missing_field400Required field missing or invalid
insufficient_balance402Not enough balance for even 1 pizza
no_stock503No promo codes available
dom_disabled403Domino's not enabled for your key

GET /api/dom/order/{order_id}

Check Domino's order status. The response grows richer as the order progresses.

StatusMeaning
awaiting_submissionLink created, customer hasn't built their pizza yet
submittedCustomer picked store & built pizzas — ready to confirm
processingConfirmed, pizzas being placed at Domino's
completedAll pizzas placed successfully
partialSome pizzas placed, some failed (failed ones auto-refunded)
failedAll pizzas failed (full wholesale refund)
expiredSession expired before customer submitted

Response when submitted:

{
  "order_id": "DOM-a1b2c3d4",
  "status": "submitted",
  "dom_order_id": "uuid-of-dom-order",
  "pizza_count": 2,
  "store": {"id": "4225", "name": "Domino's Pizza"},
  "total_customer": 10.00,
  "total_wholesale": 7.00,
  "pizzas": [
    "Tomato sauce, Regular cheese, Pepperoni, Mushrooms",
    "Honey BBQ sauce, Extra cheese, Chicken, Bacon"
  ]
}

Response when completed:

{
  "order_id": "DOM-a1b2c3d4",
  "status": "completed",
  "pizza_count": 2,
  "store": {"id": "4225", "name": "Domino's Pizza"},
  "results": [
    {
      "pizza": 1,
      "status": "success",
      "dominos_order_id": "abc123",
      "order_name": "John D",
      "ready_lower": "3:45 PM",
      "ready_upper": "3:55 PM"
    },
    {
      "pizza": 2,
      "status": "success",
      "dominos_order_id": "def456",
      "order_name": "John D",
      "ready_lower": "3:45 PM",
      "ready_upper": "3:55 PM"
    }
  ],
  "cost_deducted": 7.00,
  "wholesale_refund": 0
}

When partial, the results array contains both success and failed entries. Failed entries include an error field. The wholesale cost for failed pizzas is automatically refunded to your balance (wholesale_refund shows the amount).

POST /api/dom/order/{order_id}/confirm

Confirm and place the Domino's order. Wholesale cost is deducted, promo codes reserved, and pizzas are placed in the background. Only call this after status is submitted.

Response:

{
  "order_id": "DOM-a1b2c3d4",
  "status": "processing",
  "cost_deducted": 7.00,
  "remaining_balance": 43.00,
  "message": "Order is being placed. Poll GET /api/dom/order/{id} for status."
}
ErrorStatusReason
not_found404Order ID doesn't exist
forbidden403Order belongs to another reseller
not_submitted409Customer hasn't submitted their pizza yet
already_processing409Already being placed
already_finished409Already completed/failed
already_confirmed409Payment already confirmed
order_expired41045-minute window passed
insufficient_balance402Not enough balance for wholesale cost
no_stock503Not enough promo codes for pizza count

🌮 Taco Bell Endpoints

Generate Taco Bell loyalty accounts and retrieve login OTP codes. Requires your own hotmail007 API key for email provisioning. Accounts come with any available sign-up rewards.

Flow: Generate accounts → Use accounts → (Later) Request OTP to log back in
Concurrency: Up to 3 accounts generated in parallel per request  •  Max qty: 5 per call

POST /api/tb/gen

Generate new Taco Bell loyalty accounts. Each account gets a fresh email via hotmail007, registers with Taco Bell, and returns profile + rewards.

Request:

{
  "first_name": "John",
  "last_name": "Smith",
  "birthday": "03/15",
  "hotmail007_key": "25abf49c-62ab-4112-ba1e-...",
  "qty": 2
}
ParamTypeDescription
first_namerequiredFirst name for the account
last_namerequiredLast name for the account
hotmail007_keyrequiredYour hotmail007.com API key
birthdayoptionalMM/DD format (e.g. "03/15"). Randomized if omitted.
qtyoptionalNumber of accounts to generate (1–5, default 1)

Response:

{
  "ok": true,
  "accounts": [
    {
      "email": "[email protected]",
      "name": "John Smith",
      "birthday": "03/15",
      "customer_id": "abc123-def456",
      "rewards": [
        {"title": "Free Doritos Locos Tacos", "id": "reward_789"}
      ]
    }
  ],
  "failed": [
    {"index": 1, "error": "hotmail007 out of stock (all mail types)"}
  ],
  "summary": {"total": 2, "success": 1, "failed": 1}
}
ErrorStatusReason
invalid_params400Missing name, bad birthday format, or missing hotmail007 key

Each account in the failed array includes the index (0-based) and a specific error string describing what went wrong (e.g. email stock, OTP timeout, auth failure). The top-level ok is true if at least one account succeeded.

POST /api/tb/otp

Request a fresh login OTP for a previously generated Taco Bell account. Triggers an OTP send from Taco Bell and polls the email inbox for the 6-digit code (up to 60 seconds).

Request:

{
  "email": "[email protected]",
  "hotmail007_key": "25abf49c-62ab-4112-ba1e-..."
}
ParamTypeDescription
emailrequiredEmail from a previously generated account
hotmail007_keyrequiredYour hotmail007.com API key

Response:

{
  "ok": true,
  "email": "[email protected]",
  "otp": "482916"
}
ErrorStatusReason
invalid_params400Missing email or hotmail007 key
not_found404Email not found in generated accounts
otp_request_failed502Failed to trigger OTP from Taco Bell
otp_timeout408OTP code not received within 60 seconds

⛽ Gas Gen Endpoints

Generate Chevron / Texaco Rewards accounts with $1/gal savings on the next 5 fill-ups. Each account gets a fresh phone number via SMS verification, registers with Chevron, and returns the account details plus reward status.

Flow: Phone number provisioned → Chevron OTP verified → Profile completed → Rewards checked
Concurrency: Up to 3 accounts generated in parallel per request  •  Max qty: 5 per call  •  Cost: $4.00 per account (deducted from balance on success)

POST /api/gas/gen

Generate new Chevron/Texaco Rewards accounts. Each account gets a real US phone number, completes SMS verification, and registers a rewards profile. The phone number is what you enter at the pump to redeem rewards.

Request:

{
  "qty": 2
}
ParamTypeDescription
qtyoptionalNumber of accounts to generate (1–5, default 1)

Response:

{
  "ok": true,
  "accounts": [
    {
      "phone": "+12125551234",
      "name": "James Wilson",
      "email": "[email protected]",
      "has_dollar_off": true
    }
  ],
  "failed": [
    {"index": 1, "error": "No OTP received (timeout)"}
  ],
  "summary": {"total": 2, "success": 1, "failed": 1}
}
ErrorStatusReason
invalid_params400qty is not a valid integer
insufficient_balance402Not enough balance — $4.00 deducted per successful account

Usage: The phone number is what you enter at the Chevron/Texaco pump to redeem the $1/gal savings. has_dollar_off indicates whether the welcome offer was confirmed. Each account in failed includes the index (0-based) and a specific error string. The top-level ok is true if at least one account succeeded.

🛒 Account Shop Endpoints

Buy pre-stocked Taco Bell, Pizza Hut, and Pizza Hut CA loyalty accounts loaded with rewards. Accounts come with login credentials and an OTP inbox link for retrieving login codes.

Products: tacobell, pizzahut, ca_pizzahut
Price: $9.00 per account (deducted from balance on purchase)  •  Max qty: 5 per call

GET /api/acct/stock

Check available stock and pricing for each account type. Disabled products are excluded from the response.

Response:

{
  "products": {
    "tacobell": {"available": 42, "in_stock": true, "price": 9.00},
    "pizzahut": {"available": 15, "in_stock": true, "price": 9.00},
    "ca_pizzahut": {"available": 8, "in_stock": true, "price": 9.00}
  }
}

Products that are temporarily disabled by the operator will not appear in the response.

POST /api/acct/buy

Purchase accounts from stock. Each account includes login email and an OTP inbox link for retrieving the login code. Balance is deducted only for accounts actually delivered.

Request:

{
  "product": "pizzahut",
  "qty": 2
}
ParamTypeDescription
productrequiredAccount type: tacobell, pizzahut, or ca_pizzahut
qtyoptionalNumber of accounts to buy (1–5, default 1)

Response:

{
  "ok": true,
  "product": "pizzahut",
  "accounts": [
    {
      "email": "[email protected]",
      "password": "Xy8kP2mN",
      "otp_link": "https://catchmail.io/mailbox/catchmail.io/ph4nibqhxl5q"
    },
    {
      "email": "[email protected]",
      "password": "Qz3vR7nW",
      "otp_link": "https://catchmail.io/mailbox/catchmail.io/phw9fjrc3t7"
    }
  ],
  "summary": {
    "requested": 2,
    "delivered": 2,
    "cost_per": 9.00,
    "total_charged": 18.00
  }
}
ErrorStatusReason
invalid_params400Invalid product name or qty
product_disabled403Product is temporarily disabled
insufficient_balance402Not enough balance — $9.00 per account
out_of_stock409Not enough accounts in stock

Usage: Open the otp_link in a browser to view the email inbox and retrieve the latest login OTP code. Use the email to sign in to the app (Pizza Hut, Taco Bell, etc.) and the OTP from the inbox link to complete login. Then redeem the rewards in the app.

👤 Customer Endpoints

Let your customers look up, cancel, or modify their orders. Your backend calls these — not the customer directly.

POST /api/customer/lookup

Look up an order by payment code and email. Response includes can_cancel and can_change_pickup flags.

{
  "payment_code": "RS-X7K9M2",
  "customer_email": "[email protected]"
}

POST /api/customer/cancel

Cancel a queued or pending order. Refunds wholesale cost to your balance. You handle refunding your customer.

// Request
{"payment_code": "RS-X7K9M2", "customer_email": "[email protected]"}

// Response
{"order_id": "WEB-a8f3c123", "status": "cancelled", "refunded": true, "refunded_amount": 6.00}

POST /api/customer/update-pickup

Change the pickup time for a queued order.

{"payment_code": "RS-X7K9M2", "customer_email": "[email protected]", "pickup_pref": "+120"}

🔔 Webhooks

POST /api/webhook/configure

Set your webhook endpoint. Must be HTTPS. A test ping is sent to verify. The webhook_secret is optional but recommended — if set, it's included as X-Webhook-Secret header on every delivery for verification.

{
  "webhook_url": "https://yoursite.com/api/webhook",
  "webhook_secret": "my_secret_key_123"
}

GET /api/webhook/log

Recent webhook deliveries for debugging. Accepts optional limit param (default 20).

Webhook Events

POST requests sent to your URL when orders finish. Verify with the X-Webhook-Secret header.

order.completed

{
  "event": "order.completed",
  "order_id": "WEB-a8f3c123",
  "customer_email": "[email protected]",
  "store": "Whataburger #1234",
  "confirmation_code": "ABC123",
  "pickup_time": "6:30 PM",
  "cost_deducted": 6.00,
  "completed_at": "2026-05-23T18:25:00+00:00",
  "discord_user_id": 123456789012345678
}

order.failed

{
  "event": "order.failed",
  "order_id": "WEB-a8f3c123",
  "reason": "Store closed or group link expired",
  "refunded_amount": 6.00,
  "remaining_balance": 342.00,
  "failed_at": "2026-05-23T18:25:00+00:00",
  "discord_user_id": 123456789012345678
}

Whataburger Events

wb_order.completed

{
  "event": "wb_order.completed",
  "order_id": "WB-a1b2c3d4",
  "customer_email": "[email protected]",
  "store": {"id": "1234", "name": "Whataburger #1234", "address": "123 Main St", "city": "Houston", "state": "TX"},
  "order_numbers": ["98765432", "98765433"],
  "entrees": [
    {"type": "burger", "order_number": "98765432", "pickup_time": "6:30 PM"},
    {"type": "chickn", "order_number": "98765433", "pickup_time": "6:32 PM"}
  ],
  "entrees_delivered": 2,
  "entrees_failed": 1,
  "cost_deducted": 1.50,
  "refunded_amount": 0.75,
  "partial": true,
  "completed_at": "2026-08-22T18:25:00+00:00",
  "failures": [
    {"item_index": 2, "type": "burger", "reason_code": "store_closed", "reason": "Store is closed for online orders"}
  ]
}

failures is only present when partial: true. See WB Order Status for all reason_code values.

wb_order.failed

{
  "event": "wb_order.failed",
  "order_id": "WB-a1b2c3d4",
  "customer_email": "[email protected]",
  "reason": "All entrees failed to place",
  "refunded_amount": 2.25,
  "failed_at": "2026-08-22T18:25:00+00:00",
  "failures": [
    {"item_index": 0, "type": "burger", "reason_code": "store_closed", "reason": "Store is closed for online orders"},
    {"item_index": 1, "type": "chickn", "reason_code": "no_stock", "reason": "No replacement accounts available"},
    {"item_index": 2, "type": "burger", "reason_code": "account_error", "reason": "Login failed"}
  ]
}

Insomnia Cookies Events

insom_order.completed

{
  "event": "insom_order.completed",
  "order_id": "IC-a8f3c123",
  "customer_email": "[email protected]",
  "store": {"name": "Insomnia Cookies - Greenwich Village", "address": "164 Bleecker St", "city": "New York", "state": "NY"},
  "cookies": [
    {"flavor": "Chocolate Chunk", "pickup_time": "10:30 PM"},
    {"flavor": "Cookies 'N Cream", "pickup_time": "10:30 PM"}
  ],
  "cookies_delivered": 2,
  "cookies_failed": 1,
  "cost_deducted": 1.00,
  "refunded_amount": 0.50,
  "partial": true,
  "completed_at": "2026-08-24T02:30:00+00:00",
  "failures": [
    {"cookie_index": 2, "flavor": "Snickerdoodle", "reason_code": "out_of_stock", "reason": "Cookie currently unavailable at this location"}
  ]
}

failures is only present when partial: true. See Insomnia Order Status for all reason_code values.

insom_order.failed

{
  "event": "insom_order.failed",
  "order_id": "IC-a8f3c123",
  "customer_email": "[email protected]",
  "reason": "All cookies failed to place",
  "refunded_amount": 1.50,
  "failed_at": "2026-08-24T02:30:00+00:00",
  "failures": [
    {"cookie_index": 0, "flavor": "Chocolate Chunk", "reason_code": "store_closed", "reason": "Store is closed for online orders"},
    {"cookie_index": 1, "flavor": "Cookies 'N Cream", "reason_code": "payment_error", "reason": "FreedomPay tokenization failed"},
    {"cookie_index": 2, "flavor": "Snickerdoodle", "reason_code": "no_stock", "reason": "No replacement accounts available"}
  ]
}

DoorDash Events

dd_order.completed

{
  "event": "dd_order.completed",
  "order_id": "DD-a1b2c3d4",
  "store_name": "McDonald's",
  "items_summary": "Big Mac x1 — $5.99\nLarge Fries x1 — $3.49",
  "tracking_url": "https://doordash.com/orders/...",
  "pricing": {"subtotal": 9.48, "discount": 3.79, "subtotal_after_discount": 5.69, "tip": 2.00, "service_fee": 8.00, "total": 15.69},
  "elapsed_seconds": 28.4,
  "completed_at": "2026-08-31T16:01:30+00:00"
}

dd_order.failed

{
  "event": "dd_order.failed",
  "order_id": "DD-a1b2c3d4",
  "store_name": "McDonald's",
  "reason": "card_declined",
  "reason_message": "The payment card was declined.",
  "refunded": true,
  "refunded_amount": 0.00,
  "failed_at": "2026-08-31T16:01:30+00:00"
}

Retries: Up to 3 attempts (0s, 30s, 2min). Only retries on 5xx or connection failures — 4xx errors are not retried.

⚠ Error Codes

All errors return {"error": "code", "message": "description"}

StatusMeaning
400Bad request (invalid input)
401Invalid or missing API key
402Insufficient balance
403Suspended or wrong reseller
404Not found
409Conflict (already queued / completed / not cancellable)
410Order expired
408Timeout (e.g. OTP not received in time)
429Rate limited (includes retry_after seconds)
500Server error
502Upstream service failed (e.g. Taco Bell OTP request rejected)

💻 Code Examples

Whataburger Order Flow (Python)

import requests

BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}

# 1. Check stock
resp = requests.get(f"{BASE}/api/wb/stock", headers=HEADERS)
stock = resp.json()
print(f"Available: {stock['available']}/{stock['total']}")

# 2. Create order
resp = requests.post(f"{BASE}/api/wb/order", json={
    "items": [{"item_id": "whataburger", "qty": 1}],
    "customer_email": "[email protected]"
}, headers=HEADERS)

order = resp.json()
print(f"Order {order['order_id']}: ${order['total_price']}")

# 3. Confirm order
resp = requests.post(f"{BASE}/api/wb/confirm/{order['order_id']}", json={
    "first_name": "John",
    "last_name": "Smith"
}, headers=HEADERS)

print(f"Confirmed! {resp.json()['status']}")

Webhook Receiver (Flask)

from flask import Flask, request, jsonify

app = Flask(__name__)

@app.route("/webhook", methods=["POST"])
def webhook():
    secret = request.headers.get("X-Webhook-Secret")
    if secret != "my_secret_key_123":
        return jsonify({"error": "unauthorized"}), 401

    data = request.json
    if data["event"] == "order.completed":
        print(f"Order placed! Code: {data['confirmation_code']}")
        # notify your customer
    elif data["event"] == "order.failed":
        print(f"Order failed: {data['reason']}")
        # refund your customer

    return jsonify({"ok": True}), 200

Whataburger Order Flow (Python)

import requests

BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}

# 1. Check stock
stock = requests.get(f"{BASE}/api/wb/stock", headers=HEADERS).json()
print(f"Burgers: {stock['burger']['available']}, Chickn: {stock['chickn']['available']}")

# 2. Find stores
stores = requests.post(f"{BASE}/api/wb/stores", json={
    "zipcode": "77001"
}, headers=HEADERS).json()["stores"]
store = stores[0]

# 3. Get menu to see available toppings (optional)
menu = requests.post(f"{BASE}/api/wb/menu", json={
    "store_id": store["id"], "zipcode": "77001", "type": "burger"
}, headers=HEADERS).json()
# menu["toppings"] = [{"name": "Tomato", "levels": [0,1,2,3], "default": 2}, ...]

# 4. Create order with custom toppings
order = requests.post(f"{BASE}/api/wb/order", json={
    "first_name": "John", "last_name": "Smith",
    "email": "[email protected]", "zipcode": "77001",
    "store_id": store["id"],
    "items": [
        {"type": "burger", "toppings": {"Tomato": 0, "Pickles": 3}},
        {"type": "chickn"}  # default build
    ]
}, headers=HEADERS).json()
print(f"Order {order['order_id']}: ${order['total_price']}")

# 5. Collect payment (your logic), then confirm
result = requests.post(
    f"{BASE}/api/wb/order/{order['order_id']}/confirm",
    json={}, headers=HEADERS
).json()
print(f"Status: {result['status']}, Cost: ${result['cost_deducted']}")

# 6. Poll status (or wait for webhook)
import time
while True:
    status = requests.get(
        f"{BASE}/api/wb/order/{order['order_id']}", headers=HEADERS
    ).json()
    if status["status"] in ("completed", "failed"):
        break
    time.sleep(3)
print(f"Final: {status['status']}")

Insomnia Cookies Order Flow (Python)

import requests, time

BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}

# 1. Check stock
stock = requests.get(f"{BASE}/api/insom/stock", headers=HEADERS).json()
print(f"Cookies: {stock['cookies']['available']}, Price: ${stock['cookies']['price']}")

# 2. Find stores
stores = requests.post(f"{BASE}/api/insom/stores", json={
    "zipcode": "10001"
}, headers=HEADERS).json()["stores"]
store = stores[0]
print(f"Store: {store['name']}")

# 3. Create order (pick flavors by flavor_id from /api/insom/menu)
order = requests.post(f"{BASE}/api/insom/order", json={
    "first_name": "Sarah", "last_name": "Johnson",
    "email": "[email protected]", "zipcode": "10001",
    "store_id": store["external_id"],
    "cookies": [
        {"flavor_id": "4"},     # Chocolate Chunk
        {"flavor_id": "3323"},  # Cookies 'N Cream
        {"flavor_id": "13"}     # Snickerdoodle
    ]
}, headers=HEADERS).json()
print(f"Order {order['order_id']}: {order['cookie_count']} cookies, ${order['total_price']}")

# 4. Collect payment (your logic), then confirm
result = requests.post(
    f"{BASE}/api/insom/order/{order['order_id']}/confirm",
    json={}, headers=HEADERS
).json()
print(f"Status: {result['status']}, Cost: ${result['cost_deducted']}")

# 5. Poll status (or wait for webhook)
while True:
    status = requests.get(
        f"{BASE}/api/insom/order/{order['order_id']}", headers=HEADERS
    ).json()
    if status["status"] in ("completed", "failed"):
        break
    time.sleep(3)

if status["status"] == "completed":
    for c in status["cookies"]:
        print(f"  {c['flavor_name']} - pickup: {c['pickup_time']}")
else:
    print(f"Failed: {status['reason']}")

DoorDash Order Flow (Python)

import requests, time

BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "pm_live_xxxxx"}

# 1. Check stock
stock = requests.get(f"{BASE}/api/dd/stock", headers=HEADERS).json()
print(f"DD accounts available: {stock['accounts']['available']}")

# 2. Create order
order = requests.post(f"{BASE}/api/dd/order", headers=HEADERS, json={
    "group_link": "https://drd.sh/cart/ABC123/",
    "address": "123 Main St, 90210",
    "card_number": "4111111111111111",
    "card_exp": "08/28",
    "card_cvv": "123",
    "card_zip": "90210",
    "tip": 2.00
}).json()
print(f"Store: {order['store_name']}, Total: ${order['pricing']['total']}")

# 3. Confirm
requests.post(f"{BASE}/api/dd/order/{order['order_id']}/confirm", headers=HEADERS)

# 4. Poll until done
while True:
    status = requests.get(f"{BASE}/api/dd/order/{order['order_id']}", headers=HEADERS).json()
    if status["status"] in ("completed", "failed"):
        break
    time.sleep(3)
print(f"Result: {status['status']}")

Taco Bell Account Gen (Python)

import requests, time

BASE = "https://polarmunch.com"
HEADERS = {"X-API-Key": "rk_your_key_here"}
H007_KEY = "25abf49c-62ab-4112-ba1e-..."

# 1. Generate accounts
gen = requests.post(f"{BASE}/api/tb/gen", headers=HEADERS, json={
    "first_name": "John",
    "last_name": "Smith",
    "birthday": "03/15",   # optional
    "hotmail007_key": H007_KEY,
    "qty": 2
}).json()

for acc in gen["accounts"]:
    print(f"Account: {acc['email']}")
    for r in acc["rewards"]:
        print(f"  Reward: {r['title']}")

for fail in gen["failed"]:
    print(f"Failed #{fail['index']}: {fail['error']}")

# 2. Later — get a login OTP for an account
email = gen["accounts"][0]["email"]
otp = requests.post(f"{BASE}/api/tb/otp", headers=HEADERS, json={
    "email": email,
    "hotmail007_key": H007_KEY
}).json()

if otp.get("ok"):
    print(f"OTP for {email}: {otp['otp']}")
else:
    print(f"OTP failed: {otp['message']}")

Customer Order Lookup (JavaScript)

const BASE = "https://polarmunch.com";
const API_KEY = "rk_your_key_here";

async function lookupOrder(paymentCode, email) {
  const resp = await fetch(`${BASE}/api/customer/lookup`, {
    method: "POST",
    headers: {
      "X-API-Key": API_KEY,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      payment_code: paymentCode,
      customer_email: email
    })
  });
  const order = await resp.json();

  if (order.status === "completed") {
    console.log(`Pick up code: ${order.confirmation_code}`);
    console.log(`Pickup time: ${order.pickup_time}`);
  } else if (order.can_cancel) {
    console.log("Order can still be cancelled");
  }
  return order;
}