Non-Shopify Ordering — Developer Guide
What is this?
Bik lets your customers shop directly inside WhatsApp. They browse products, add items to a cart, pick shipping, apply a coupon, and place an order — all without leaving the chat.
For Shopify stores, Bik talks to Shopify directly. If your store does not run on Shopify, Bik holds the draft order state on its own side and only calls two endpoints on your backend at the very end of the flow:
placeOrder— when the customer confirms the purchasegetOrder— when Bik later needs to look up the placed order
You don't have to manage the draft, the cart math, the shipping line, or the coupon stacking — Bik does all of that internally. You just receive a fully-priced order, persist it, and return what you'd return for any normal order lookup.
Where to start — the sample server
The fastest way to understand the contract is to look at our reference implementation:
➡ BikDotAiDev/non-shopify-examples
The non-shopify-order/ folder contains a minimal Node.js (no-deps) echo server implementing both endpoints. Use it as a smoke test target while wiring things up — point Bik at it, run a checkout, see the request body Bik sends, then port the logic to your real backend.
The checkout flow
Here is what happens end-to-end when a customer places an order through a Bik WhatsApp flow:
1. Customer picks items in WhatsApp
│
▼
Bik holds a draft order in its own database
(cart, shipping line, discount, totals — all computed in-house)
│
▼
2. Customer picks a shipping option
3. Customer enters a coupon code (optional)
→ Both update Bik's draft state. No call to your backend.
│
▼
4. Customer confirms the order
│
▼
Bik calls: POST <your placeOrder URL>
Body: { draftOrderId, paymentPending, order: BikOrder }
→ Your backend persists the order, returns { order: BikOrder }
→ Bik forwards the `invoiceUrl` to the customer on WhatsApp
│
▼
5. Bik needs to look up the order later (status checks, etc.)
│
▼
Bik calls: POST <your getOrder URL>
Body: { orderId }
→ Your backend returns { order: BikOrder }
Steps 1–3 don't touch your backend at all. Only steps 4 and 5 do.
What you need to build
You need to implement these two HTTP endpoints on your backend:
| Endpoint | When Bik calls it | Docs |
|---|---|---|
placeOrder | Customer confirms the purchase | → View |
getOrder | Bik fetches a placed order | → View |
Each endpoint receives a JSON body from Bik and must return a JSON response in a fixed shape. The exact request fields and response shape are on each endpoint's page.
Before you start
Step 1 — Sync your product catalog
Bik needs to know your products before any order can be created. Product names, images, prices, and variant IDs all come from the catalog you sync into Bik.
The variantId values you sync are the exact IDs Bik will send in order.items[].variantId when calling placeOrder. If the IDs don't match, your backend won't be able to resolve the line items.
Step 2 — Register your endpoints with Bik
Once your endpoints are live, open the Non‑Shopify Onboarding screen in BIK Labs and configure the endpoint URLs (root) along with the auth scheme for each endpoint.
You need to register both placeOrder and getOrder. Configuring just one will leave half the flow non-functional.
Authentication
Bik supports four ways to authenticate requests to your endpoints:
| Scheme | What Bik sends |
|---|---|
| None | No auth header |
| Bearer token | Authorization: Bearer <token> |
| API key | <your-chosen-header>: <token> |
| Basic auth | Authorization: Basic base64(username:password) |
Pick the scheme for each endpoint and enter the credentials in the Non‑Shopify Onboarding screen. Bik stores them securely.
Response format
Both endpoints return an order field wrapping a BikOrder object:
{ "order": { "...BikOrder": "..." } }
BikOrder
| Field | Type | Description |
|---|---|---|
id | string | Order ID in your system (your assigned id, not Bik's draft id) |
name | string | Display name, e.g. "#1001" |
status | string | e.g. "ORDERED", "IN PROGRESS", "DELIVERED", "CANCELLED" |
paymentStatus | string | e.g. "pending", "paid" |
items | BikOrderItem[] | Items in the order |
total | number | Final total |
subTotal | number | Total before shipping and discounts |
shippingCharge | number | Shipping cost |
discount | number | Total discount applied |
currency | string | ISO currency code, e.g. "INR" |
address | BikAddress \| null | Delivery address |
phoneNumber | string | Customer phone |
email | string | Customer email (lowercased) |
invoiceUrl | string \| null | Payment or order confirmation URL |
BikOrderItem
| Field | Type | Description |
|---|---|---|
name | string | Product name |
variantName | string | Variant label, e.g. "Red / L" |
variantId | number | Must match the ID synced via the Product API |
productId | number | Product ID in your catalog |
quantity | number | Quantity |
price | number | Unit price |
image | string \| null | Product image URL |
BikAddress
| Field | Type | Description |
|---|---|---|
firstName | string | |
lastName | string | |
address1 | string | Street line 1 |
address2 | string \| null | Street line 2 |
city | string | |
state | string \| null | State or region |
country | string | |
zip | string | Postal code |
phoneNumber | string \| null |