Docs · Quickstart
START

Quickstart

From an empty folder to a product on screen and a test order, in five minutes.

Dakio runs the business: catalog, sale prices, coupons, cash-on-delivery checkout with fake-order protection, stock, couriers, abandoned carts, Meta Pixel and Nova. You build the store. This page gets a product on your screen and a test order placed in about five minutes.

1. Get a test key

In Dakio, open Settings → Developers → Website keys → Create key and choose Test. You get a key like dk_pub_test_…. A test key works on any website, localhost included, and its orders are test orders: no stock moves, no SMS, nothing lands in the store's Orders.

No store yet? Open one free: every plan includes API keys.

2. Install

bash
npm install @dakio/sdk

It has no dependencies, ships ESM and CommonJS with types, and runs in every browser, Node 18+, Next.js, Vercel, Cloudflare and Bun.

3. Show your products

js
import { createDakio } from '@dakio/sdk'

const dakio = createDakio({ key: 'dk_pub_test_…' })

const store = await dakio.store.get()
const { data: products } = await dakio.products.list({ limit: 12 })

for (const p of products) {
  console.log(p.name, p.price, p.onSale ? `was ${p.compareAtPrice}` : '')
}

price already includes any running sale. You never compute a price yourself.

4. Price a bag

A bag holds only { productId, variantId, qty }. Ask Dakio what it costs:

js
const quote = await dakio.cart.quote({
  items: [{ productId: products[0].id, variantId: null, qty: 2 }],
  district: 'Dhaka',
  couponCode: 'EID10', // optional
})

quote.subtotal   // 1000
quote.discount   // 100
quote.shipping   // { zone: 'inside_dhaka', charge: 60 }
quote.total      // 960 — exactly what checkout will charge
quote.problems   // [] or [{ code: 'OUT_OF_STOCK', available: 1, … }]

5. Place an order (in the browser)

js
const result = await dakio.checkout.create({
  customer: { name: 'Rahim', phone: '01712345678', address: 'House 4, Road 2', district: 'Dhaka', city: 'Mirpur' },
  items: [{ productId: products[0].id, variantId: null, qty: 2 }],
})

if (result.status === 'PLACED') console.log('Order', result.orderNumber)          // #TEST-K3P9QX
if (result.status === 'OTP_REQUIRED') console.log('Code sent to', result.maskedPhone)
if (result.status === 'ERROR') console.log(result.code, result.message)

Checkout runs in the browser so Dakio's fake-order protection sees each shopper's own IP. From a server the SDK refuses it with a client key (CHECKOUT_MUST_RUN_IN_BROWSER); use a secret key there.

With a test key, phone 01700000001 always asks for a code, and the code is 000000. Everything else is in Test mode.

Next

Something unclear or wrong? Tell us — or open an issue on GitHub.

CHECKOUT PAYMENTS · VERIFIED BY SSLCOMMERZ
Pay with Visa, Mastercard, bKash, Nagad, Rocket and 40+ methods — verified by SSLCommerzPay with Visa, Mastercard, bKash, Nagad, Rocket and 40+ methods — verified by SSLCommerz
© 2026 Dakio by Digidhaka Communication Limited. All rights reserved.
Trade License No. TRAD/DSCC/041467/2021 · Made for Bangladesh's entrepreneurs