@quantaroute/checkout 1.4.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,46 @@ Release dates are from git history where available; earlier versions are estimat
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.0](https://github.com/quantaroute/checkout/compare/v1.5.0...v1.6.0) — 2026-06-23
11
+
12
+ ### Added
13
+
14
+ - **Lazy DigiPin verification** — imported saved addresses without a DigiPin trigger a `verify-address` step (map pin + prepopulated form) before payment or `onComplete`
15
+ - **`selectAddress()` and `verifyDigipin()`** client helpers; `SavedAddress.digipin` is nullable for pending imports
16
+ - **`AddressFormInitialValues`** — prepopulate manual fields when verifying an imported address
17
+ - **`verify_address_step_viewed`** checkout analytics event
18
+ - **`checkout-addresses`** — `select_address` and `verify_digipin` actions; session `selected_address_id` + `address_verified` order lock
19
+ - **`checkout-payment`** — blocks `create_order`, `verify`, and `record_cod` until the selected address has a confirmed DigiPin
20
+ - **`checkout-admin`** — `import_customers` bulk import API and `import_status`; `create_linked_account` returns 501 (Mode C stub)
21
+ - **Identity linking (H8)** — merge email/phone import profiles on OTP verify via `_shared/identity.ts`
22
+ - Migration `20260623120000_customer_import_and_digipin_verify.sql` — import batches, nullable digipin, `payment_mode` on merchants
23
+
24
+ ### Documentation
25
+
26
+ - `docs/byo-payment-gateway.md` — Mode A (PayU/Cashfree/Paytm) integration guide
27
+ - `docs/customer-migration-playbook.md` — merchant-facing import + lazy verify story
28
+ - `docs/hosted-payments-roadmap.md` — Mode C QuantaRoute Payments roadmap
29
+ - `docs/portal-payment-wizard-spec.md` and `docs/portal-migration-wizard-spec.md` — developer portal UI specs
30
+
31
+ ## [1.5.0](https://github.com/quantaroute/checkout/compare/v1.4.5...v1.5.0) — 2026-06-21
32
+
33
+ ### Added
34
+
35
+ - **Razorpay payment step** — `PaymentStep` after address completion when `enablePayment` and `paymentAmountPaise` are set
36
+ - `verifyPayment()` client helper; verify response includes `razorpay_order_id` and `razorpay_payment_id`
37
+ - `orderConfirmationUrl` prop — optional post-payment redirect with `{{sessionId}}` placeholder
38
+ - Extended `onPaymentComplete` callback — `sessionId`, `razorpayOrderId`, and `razorpayPaymentId` on prepaid success
39
+ - Payment auth guard — `enablePayment` requires phone/email OTP auth (or `codSessionToken`) before the payment step
40
+ - **`checkout-payment`** verify action returns Razorpay order and payment IDs; fires `session.completed` webhook
41
+ - **`checkout-admin`** — `get_payment_config` and `set_payment_config` actions for merchant Razorpay credentials (`x-api-key`)
42
+ - `payment_orders` Razorpay order ID index migration (`20260621120000_payment_orders_rzp_index.sql`)
43
+ - Demo app payment flow with Razorpay test-mode banner and order-complete result panel
44
+
45
+ ### Documentation
46
+
47
+ - `docs/merchant-onboarding.md` — merchant onboarding from test keys through production go-live
48
+ - `docs/razorpay-e2e-setup.md` — end-to-end Razorpay test setup (Admin API, Edge Functions, demo checklist)
49
+
10
50
  ## [1.4.5](https://github.com/quantaroute/checkout/compare/v1.4.4...v1.4.5) — 2026-06-13
11
51
 
12
52
  ### Added
package/README.md CHANGED
@@ -4,10 +4,10 @@
4
4
  > Two-step: Map pin → Auto-filled form.
5
5
  > One package. Three platforms: **React web · iOS · Android.**
6
6
 
7
- [![Made in India](https://img.shields.io/badge/Made%20in-India%20🇮🇳-orange)](https://quantaroute.com)
8
- [![DigiPin](https://img.shields.io/badge/DigiPin-India%20Post-blue)](https://www.indiapost.gov.in)
9
- [![Map](https://img.shields.io/badge/Map-Carto%20Positron%20(free)-green)](https://carto.com)
10
- [![License](https://img.shields.io/badge/License-MIT-lightgrey)](./LICENSE)
7
+ [Made in India](https://quantaroute.com)
8
+ [DigiPin](https://www.indiapost.gov.in)
9
+ [Map](https://carto.com)
10
+ [License](./LICENSE)
11
11
 
12
12
  ---
13
13
 
@@ -43,11 +43,13 @@ Step 1 – Map Pin Step 2 – Auto-fill + Details
43
43
 
44
44
  ## Platform support
45
45
 
46
- | Platform | Bundler | Map engine | Install |
47
- |---|---|---|---|
48
- | React / Next.js / Vite / Nuxt | Webpack / Vite | MapLibre GL JS | `maplibre-gl` |
49
- | iOS (Expo / React Native) | Metro | expo-osm-sdk (MapLibre GL Native) | `expo-osm-sdk expo-location` |
50
- | Android (Expo / React Native) | Metro | expo-osm-sdk (MapLibre GL Native) | `expo-osm-sdk expo-location` |
46
+
47
+ | Platform | Bundler | Map engine | Install |
48
+ | ----------------------------- | -------------- | --------------------------------- | ---------------------------- |
49
+ | React / Next.js / Vite / Nuxt | Webpack / Vite | MapLibre GL JS | `maplibre-gl` |
50
+ | iOS (Expo / React Native) | Metro | expo-osm-sdk (MapLibre GL Native) | `expo-osm-sdk expo-location` |
51
+ | Android (Expo / React Native) | Metro | expo-osm-sdk (MapLibre GL Native) | `expo-osm-sdk expo-location` |
52
+
51
53
 
52
54
  > **Same import on all platforms.**
53
55
  > Metro automatically resolves `.native.tsx` files on mobile; Vite/Webpack use the web `.tsx` files.
@@ -127,6 +129,7 @@ export default function CheckoutPage() {
127
129
  ```
128
130
 
129
131
  CSS in `app/layout.tsx`:
132
+
130
133
  ```tsx
131
134
  import 'maplibre-gl/dist/maplibre-gl.css';
132
135
  import '@quantaroute/checkout/style.css';
@@ -236,11 +239,13 @@ npm install @quantaroute/checkout expo-osm-sdk expo-location
236
239
 
237
240
  This single plugin automatically configures:
238
241
 
239
- | What | iOS | Android |
240
- |---|---|---|
241
- | MapLibre native SDK | `expo-osm-sdk/plugin` | `expo-osm-sdk/plugin` |
242
+
243
+ | What | iOS | Android |
244
+ | ------------------- | ------------------------------------- | ---------------------- |
245
+ | MapLibre native SDK | `expo-osm-sdk/plugin` | `expo-osm-sdk/plugin` |
242
246
  | Location permission | `NSLocationWhenInUseUsageDescription` | `ACCESS_FINE_LOCATION` |
243
- | Internet permission | – | `INTERNET` |
247
+ | Internet permission | – | `INTERNET` |
248
+
244
249
 
245
250
  ### 3 · Rebuild your dev client
246
251
 
@@ -288,26 +293,30 @@ npx expo run:android
288
293
 
289
294
  ### Core props
290
295
 
291
- | Prop | Type | Default | Platform |
292
- |---|---|---|---|
293
- | `apiKey` | `string` | **required** | all |
294
- | `onComplete` | `(addr: CompleteAddress) => void` | **required** | all |
295
- | `apiBaseUrl` | `string` | `https://api.quantaroute.com` | all |
296
- | `onError` | `(err: Error) => void` | – | all |
297
- | `defaultLat` | `number` | India center | all |
298
- | `defaultLng` | `number` | India center | all |
299
- | `theme` | `'light' \| 'dark'` | `'light'` | all |
300
- | `mapHeight` | `string \| number` | `'380px'` / `380` | all |
301
- | `title` | `string` | `'Add Delivery Address'` | all |
302
- | `className` | `string` | – | web only |
303
- | `style` | `CSSProperties \| StyleProp<ViewStyle>` | – | all |
304
- | `indiaBoundaryUrl` | `string` | – | web only |
296
+
297
+ | Prop | Type | Default | Platform |
298
+ | ------------------ | -------------------------------------- | ----------------------------- | -------- |
299
+ | `apiKey` | `string` | **required** | all |
300
+ | `onComplete` | `(addr: CompleteAddress) => void` | **required** | all |
301
+ | `apiBaseUrl` | `string` | `https://api.quantaroute.com` | all |
302
+ | `onError` | `(err: Error) => void` | – | all |
303
+ | `defaultLat` | `number` | India center | all |
304
+ | `defaultLng` | `number` | India center | all |
305
+ | `theme` | `'light' | 'dark'` | `'light'` | all |
306
+ | `mapHeight` | `string | number` | `'380px'` / `380` | all |
307
+ | `title` | `string` | `'Add Delivery Address'` | all |
308
+ | `className` | `string` | – | web only |
309
+ | `style` | `CSSProperties | StyleProp<ViewStyle>` | – | all |
310
+ | `indiaBoundaryUrl` | `string` | – | web only |
311
+
305
312
 
306
313
  ### Search bar
307
314
 
308
- | Prop | Type | Default | Platform |
309
- |---|---|---|---|
310
- | `enableSearch` | `boolean` | `true` | all |
315
+
316
+ | Prop | Type | Default | Platform |
317
+ | -------------- | --------- | ------- | -------- |
318
+ | `enableSearch` | `boolean` | `true` | all |
319
+
311
320
 
312
321
  When `enableSearch` is true, a unified search bar appears above the map. It handles two modes automatically:
313
322
 
@@ -318,11 +327,13 @@ As India Post promotes DigiPin nationally, buyers can paste their 10-character c
318
327
 
319
328
  ### Phone OTP + saved addresses (D2C checkout)
320
329
 
321
- | Prop | Type | Default | Platform |
322
- |---|---|---|---|
323
- | `enablePhoneAuth` | `boolean` | `false` | all |
324
- | `merchantId` | `string` | – | all |
325
- | `supabaseFunctionBaseUrl` | `string` | – | all |
330
+
331
+ | Prop | Type | Default | Platform |
332
+ | ------------------------- | --------- | ------- | -------- |
333
+ | `enablePhoneAuth` | `boolean` | `false` | all |
334
+ | `merchantId` | `string` | – | all |
335
+ | `supabaseFunctionBaseUrl` | `string` | – | all |
336
+
326
337
 
327
338
  When `enablePhoneAuth` is true the widget starts with a phone-entry step. Returning buyers can pick a previously saved address from any brand in the network instead of dropping the pin again.
328
339
 
@@ -346,11 +357,13 @@ On the address details step, buyers choose a **Home / Work / Other** label befor
346
357
 
347
358
  ### Email OTP auth (`enableEmailAuth`)
348
359
 
349
- | Prop | Type | Default | Platform |
350
- |---|---|---|---|
351
- | `enableEmailAuth` | `boolean` | `false` | all |
352
- | `merchantId` | `string` | – | all |
353
- | `supabaseFunctionBaseUrl` | `string` | – | all |
360
+
361
+ | Prop | Type | Default | Platform |
362
+ | ------------------------- | --------- | ------- | -------- |
363
+ | `enableEmailAuth` | `boolean` | `false` | all |
364
+ | `merchantId` | `string` | – | all |
365
+ | `supabaseFunctionBaseUrl` | `string` | – | all |
366
+
354
367
 
355
368
  When `enableEmailAuth` is true the widget starts with an email-entry step. The buyer receives a 6-digit OTP via **Resend**. On success a checkout session is created and saved addresses are shown if available.
356
369
 
@@ -372,11 +385,13 @@ When `enableEmailAuth` is true the widget starts with an email-entry step. The b
372
385
 
373
386
  **Client-side events emitted during email auth:**
374
387
 
375
- | Event type | When |
376
- |---|---|
377
- | `email_step_viewed` | Email input screen rendered |
378
- | `email_otp_sent` | OTP dispatched via Resend |
379
- | `email_verified` | OTP correct → session created |
388
+
389
+ | Event type | When |
390
+ | ------------------- | ----------------------------- |
391
+ | `email_step_viewed` | Email input screen rendered |
392
+ | `email_otp_sent` | OTP dispatched via Resend |
393
+ | `email_verified` | OTP correct → session created |
394
+
380
395
 
381
396
  ---
382
397
 
@@ -384,11 +399,13 @@ When `enableEmailAuth` is true the widget starts with an email-entry step. The b
384
399
 
385
400
  QuantaRoute still validates that a pincode exists in the India Post database, but India Post "Non Delivery" is treated as **reference data**, not the final merchant delivery decision. Most D2C stores ship through Shiprocket, Delhivery, ClickPost, or direct courier contracts, so the buyer-facing serviceability check should come from the merchant.
386
401
 
387
- | Prop | Type | Default | Platform |
388
- |---|---|---|---|
389
- | `enableServiceabilityCheck` | `boolean` | `false` | all |
390
- | `showIndiaPostDeliveryWarning` | `boolean` | `false` | all |
391
- | `serviceabilityBlockCheckout` | `boolean` | merchant setting | all |
402
+
403
+ | Prop | Type | Default | Platform |
404
+ | ------------------------------ | --------- | ---------------- | -------- |
405
+ | `enableServiceabilityCheck` | `boolean` | `false` | all |
406
+ | `showIndiaPostDeliveryWarning` | `boolean` | `false` | all |
407
+ | `serviceabilityBlockCheckout` | `boolean` | merchant setting | all |
408
+
392
409
 
393
410
  When `enableServiceabilityCheck` is true and the buyer has a checkout session, the widget calls `checkout-addresses` with `action: "serviceability_check"`. The Edge Function calls the merchant's configured courier endpoint server-side and fails open if that endpoint is unavailable.
394
411
 
@@ -405,13 +422,15 @@ When `enableServiceabilityCheck` is true and the buyer has a checkout session, t
405
422
 
406
423
  Merchant configuration lives on `checkout.merchants`:
407
424
 
408
- | Column | Meaning |
409
- |---|---|
410
- | `serviceability_enabled` | Enables the merchant courier check |
411
- | `serviceability_webhook_url` | Merchant endpoint called by QuantaRoute |
412
- | `serviceability_webhook_secret` | Shared HMAC secret for outbound calls |
413
- | `serviceability_block_checkout` | If true, `serviceable: false` blocks address save |
414
- | `show_india_post_delivery_warning` | Optional soft India Post info banner fallback |
425
+
426
+ | Column | Meaning |
427
+ | ---------------------------------- | ------------------------------------------------- |
428
+ | `serviceability_enabled` | Enables the merchant courier check |
429
+ | `serviceability_webhook_url` | Merchant endpoint called by QuantaRoute |
430
+ | `serviceability_webhook_secret` | Shared HMAC secret for outbound calls |
431
+ | `serviceability_block_checkout` | If true, `serviceable: false` blocks address save |
432
+ | `show_india_post_delivery_warning` | Optional soft India Post info banner fallback |
433
+
415
434
 
416
435
  Merchant endpoint contract:
417
436
 
@@ -453,28 +472,23 @@ If the merchant endpoint errors, times out, or returns an invalid response, chec
453
472
  > **Hosted merchants (recommended):** If you onboarded at [developers.quantaroute.com](https://developers.quantaroute.com), QuantaRoute already runs Resend on shared infrastructure. Skip steps 1–5 below — just set `enableEmailAuth={true}` and register your domain in the portal. The steps below apply only when **self-hosting** the `checkout-email-otp` Edge Function in your own Supabase project.
454
473
 
455
474
  1. **Create a Resend account** at [resend.com](https://resend.com) — free tier covers ~3 000 emails / month.
456
-
457
475
  2. **Verify your sending domain** (e.g. `checkout.yourbrand.com` or `yourbrand.com`):
458
- - Go to **Resend → Domains → Add domain**
459
- - Add the DNS records shown (SPF, DKIM, DMARC) to your DNS provider
460
- - Wait for "Verified" status (usually under 5 minutes with Cloudflare; up to 48 h with others)
461
-
476
+ - Go to **Resend → Domains → Add domain**
477
+ - Add the DNS records shown (SPF, DKIM, DMARC) to your DNS provider
478
+ - Wait for "Verified" status (usually under 5 minutes with Cloudflare; up to 48 h with others)
462
479
  3. **Get an API key** — Resend → API Keys → Create. Restrict it to **Send access** only.
463
-
464
480
  4. **Set secrets on the `checkout-email-otp` Edge Function:**
481
+ In [Supabase Dashboard](https://supabase.com/dashboard) → your project → Edge Functions → Secrets:
465
482
 
466
- In [Supabase Dashboard](https://supabase.com/dashboard) → your project → Edge Functions → Secrets:
467
-
468
- | Secret | Value |
469
- |---|---|
470
- | `RESEND_API_KEY` | `re_...` from Resend |
471
- | `RESEND_FROM_EMAIL` | A verified sender address, e.g. `checkout@yourbrand.com` |
483
+ | Secret | Value |
484
+ | ------------------- | -------------------------------------------------------- |
485
+ | `RESEND_API_KEY` | `re_...` from Resend |
486
+ | `RESEND_FROM_EMAIL` | A verified sender address, e.g. `checkout@yourbrand.com` |
472
487
 
473
488
  5. **Deploy the Edge Function** (if not already done):
474
-
475
- ```bash
489
+ ```bash
476
490
  supabase functions deploy checkout-email-otp --project-ref <your-project-ref> --no-verify-jwt
477
- ```
491
+ ```
478
492
 
479
493
  **Required env vars (frontend):**
480
494
 
@@ -490,11 +504,13 @@ NEXT_PUBLIC_SUPABASE_FUNCTION_URL=https://<project-ref>.supabase.co/functions/v1
490
504
 
491
505
  Set these columns directly on your `checkout.merchants` row (SQL or Supabase Table Editor). All are optional — omitting any falls back to the QuantaRoute default.
492
506
 
493
- | Column | Type | Default | Effect |
494
- |---|---|---|---|
495
- | `email_from_name` | `text` | `"{brand} Checkout"` | "From" display name in the inbox, e.g. `"Fabindia"` |
496
- | `email_logo_url` | `text` | *(text brand name)* | HTTPS URL of your logo (PNG/SVG, 180 × 48 px recommended) shown at the top of every OTP email |
497
- | `email_subject_template` | `text` | `"{code} is your {brand} checkout code"` | Subject line; supports `{code}` and `{brand}` placeholders |
507
+
508
+ | Column | Type | Default | Effect |
509
+ | ------------------------ | ------ | ---------------------------------------- | --------------------------------------------------------------------------------------------- |
510
+ | `email_from_name` | `text` | `"{brand} Checkout"` | "From" display name in the inbox, e.g. `"Fabindia"` |
511
+ | `email_logo_url` | `text` | *(text brand name)* | HTTPS URL of your logo (PNG/SVG, 180 × 48 px recommended) shown at the top of every OTP email |
512
+ | `email_subject_template` | `text` | `"{code} is your {brand} checkout code"` | Subject line; supports `{code}` and `{brand}` placeholders |
513
+
498
514
 
499
515
  **Example SQL:**
500
516
 
@@ -511,11 +527,13 @@ WHERE id = 'your-merchant-uuid';
511
527
 
512
528
  ### Branding
513
529
 
514
- | Prop | Type | Default | Platform |
515
- |---|---|---|---|
516
- | `brandColor` | `string` (hex) | `#0ea5e9` | all |
517
- | `logoUrl` | `string` (URL) | – | all |
518
- | `headerBanner` | `ReactNode` | – | web only |
530
+
531
+ | Prop | Type | Default | Platform |
532
+ | -------------- | -------------- | --------- | -------- |
533
+ | `brandColor` | `string` (hex) | `#0ea5e9` | all |
534
+ | `logoUrl` | `string` (URL) | – | all |
535
+ | `headerBanner` | `ReactNode` | – | web only |
536
+
519
537
 
520
538
  ```tsx
521
539
  <CheckoutWidget
@@ -529,9 +547,11 @@ WHERE id = 'your-merchant-uuid';
529
547
 
530
548
  ### Analytics (client-side)
531
549
 
532
- | Prop | Type | Default | Platform |
533
- |---|---|---|---|
534
- | `onCheckoutEvent` | `(event: CheckoutEvent) => void` | – | all |
550
+
551
+ | Prop | Type | Default | Platform |
552
+ | ----------------- | -------------------------------- | ------- | -------- |
553
+ | `onCheckoutEvent` | `(event: CheckoutEvent) => void` | – | all |
554
+
535
555
 
536
556
  Called on every step transition. Use it to forward events to MoEngage, Clevertap, GTM, or your own backend — no server-side integration required.
537
557
 
@@ -561,22 +581,24 @@ Called on every step transition. Use it to forward events to MoEngage, Clevertap
561
581
 
562
582
  **All event types:**
563
583
 
564
- | Event | When fired | Auth channel |
565
- |---|---|---|
566
- | `phone_step_viewed` | Phone entry screen rendered | Phone |
567
- | `otp_sent` | OTP dispatched via MSG91 | Phone |
568
- | `phone_verified` | SMS OTP correct; session created | Phone |
569
- | `email_step_viewed` | Email input screen rendered | Email |
570
- | `email_otp_sent` | OTP dispatched via Resend | Email |
571
- | `email_verified` | Email OTP correct; session created | Email |
572
- | `auth_skipped` | Buyer tapped "Skip" | Both |
573
- | `saved_addresses_viewed` | Saved address list rendered | – |
574
- | `saved_address_selected` | Buyer chose a saved address (skips map) | – |
575
- | `map_step_viewed` | Map pin step rendered | – |
576
- | `location_confirmed` | Buyer tapped "Confirm location" | – |
577
- | `form_step_viewed` | Address detail form rendered | – |
578
- | `address_completed` | Full address submitted | – |
579
- | `widget_reset` | Buyer tapped "Change address" | – |
584
+
585
+ | Event | When fired | Auth channel |
586
+ | ------------------------ | --------------------------------------- | ------------ |
587
+ | `phone_step_viewed` | Phone entry screen rendered | Phone |
588
+ | `otp_sent` | OTP dispatched via MSG91 | Phone |
589
+ | `phone_verified` | SMS OTP correct; session created | Phone |
590
+ | `email_step_viewed` | Email input screen rendered | Email |
591
+ | `email_otp_sent` | OTP dispatched via Resend | Email |
592
+ | `email_verified` | Email OTP correct; session created | Email |
593
+ | `auth_skipped` | Buyer tapped "Skip" | Both |
594
+ | `saved_addresses_viewed` | Saved address list rendered | – |
595
+ | `saved_address_selected` | Buyer chose a saved address (skips map) | – |
596
+ | `map_step_viewed` | Map pin step rendered | – |
597
+ | `location_confirmed` | Buyer tapped "Confirm location" | – |
598
+ | `form_step_viewed` | Address detail form rendered | – |
599
+ | `address_completed` | Full address submitted | – |
600
+ | `widget_reset` | Buyer tapped "Change address" | – |
601
+
580
602
 
581
603
  ---
582
604
 
@@ -675,7 +697,7 @@ function MyCheckout() {
675
697
 
676
698
  ## Supabase setup
677
699
 
678
- > Only needed when using **`enablePhoneAuth`**. Skip this section for the basic map-only widget.
700
+ > Only needed when using `**enablePhoneAuth**`. Skip this section for the basic map-only widget.
679
701
 
680
702
  ### 1 · Get your merchant credentials
681
703
 
@@ -707,19 +729,23 @@ supabase functions deploy checkout-session-expiry --project-ref <your-project-re
707
729
 
708
730
  In the [Supabase Dashboard](https://supabase.com/dashboard) → your project → Edge Functions → Secrets:
709
731
 
710
- **`checkout-email-otp` (required for email auth):**
732
+ `**checkout-email-otp` (required for email auth):**
711
733
 
712
- | Secret | Value |
713
- |---|---|
714
- | `RESEND_API_KEY` | `re_...` — from [resend.com](https://resend.com) |
734
+
735
+ | Secret | Value |
736
+ | ------------------- | ------------------------------------------------------ |
737
+ | `RESEND_API_KEY` | `re_...` — from [resend.com](https://resend.com) |
715
738
  | `RESEND_FROM_EMAIL` | Verified sender address, e.g. `checkout@yourbrand.com` |
716
739
 
717
- **`checkout-otp` (required for phone/SMS auth — set when TRAI DLT is approved):**
718
740
 
719
- | Secret | Value |
720
- |---|---|
721
- | `MSG91_AUTHKEY` | Your MSG91 AuthKey ([setup guide](./docs/MSG91_INDIA_OTP_SETUP.md)) — must match the Edge Function env var name exactly |
722
- | `MSG91_TEMPLATE_ID` | Your approved DLT OTP template ID |
741
+ `**checkout-otp` (required for phone/SMS auth — set when TRAI DLT is approved):**
742
+
743
+
744
+ | Secret | Value |
745
+ | ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
746
+ | `MSG91_AUTHKEY` | Your MSG91 AuthKey ([setup guide](./docs/MSG91_INDIA_OTP_SETUP.md)) — must match the Edge Function env var name exactly |
747
+ | `MSG91_TEMPLATE_ID` | Your approved DLT OTP template ID |
748
+
723
749
 
724
750
  ### 4 · Add your domain to the allowed list
725
751
 
@@ -846,12 +872,20 @@ The offline DigiPin algorithm is the official India Post implementation:
846
872
 
847
873
  ## Documentation
848
874
 
849
- | Doc | Description |
850
- |-----|-------------|
851
- | [Changelog](./CHANGELOG.md) | Version history and release notes |
852
- | [Checkout roadmap](./docs/CHECKOUT_ROADMAP.md) | Feature phases and implementation status |
853
- | [MSG91 OTP setup](./docs/MSG91_INDIA_OTP_SETUP.md) | India SMS / DLT configuration for phone OTP |
854
- | [Brand teardown](./docs/brand-teardown.md) | Competitive analysis (Shopflo) |
875
+
876
+ | Doc | Description |
877
+ | ---------------------------------------------------------- | ------------------------------------------------ |
878
+ | [Changelog](./CHANGELOG.md) | Version history and release notes |
879
+ | [Checkout roadmap](./docs/CHECKOUT_ROADMAP.md) | Feature phases and implementation status |
880
+ | [Merchant onboarding](./docs/merchant-onboarding.md) | Payment modes A/B/C, Razorpay setup (Mode B) |
881
+ | [BYO payment gateway](./docs/byo-payment-gateway.md) | Mode A — PayU/Cashfree/Paytm/Shopify integration |
882
+ | [Hosted payments roadmap](./docs/hosted-payments-roadmap.md) | Mode C — QuantaRoute Payments (coming soon) |
883
+ | [Razorpay E2E setup](./docs/razorpay-e2e-setup.md) | Test-mode verification checklist (Mode B) |
884
+ | [Customer migration playbook](./docs/customer-migration-playbook.md) | Merchant-facing import + lazy DigiPin story |
885
+ | [Portal payment wizard spec](./docs/portal-payment-wizard-spec.md) | Developer portal — `/checkout/payments` spec |
886
+ | [Portal migration wizard spec](./docs/portal-migration-wizard-spec.md) | Developer portal — `/checkout/migrate` spec |
887
+ | [MSG91 OTP setup](./docs/MSG91_INDIA_OTP_SETUP.md) | India SMS / DLT configuration for phone OTP |
888
+
855
889
 
856
890
  ---
857
891
 
@@ -861,12 +895,14 @@ The offline DigiPin algorithm is the official India Post implementation:
861
895
 
862
896
  The published tarball contains **no secrets** — only client-side widget code:
863
897
 
864
- | Included | Excluded |
865
- |---|---|
866
- | `dist/lib/*.js` (Terser-minified ES + UMD) | `supabase/`, Edge Functions, migrations |
867
- | `dist/lib/index.d.ts` | `demo/`, `docs/`, `openapi.yaml`, `.env*` |
868
- | `dist/style.css` | `vite.config.ts`, dev tooling |
869
- | `src/` (required for React Native / Metro) | `node_modules/` |
898
+
899
+ | Included | Excluded |
900
+ | ------------------------------------------ | ----------------------------------------- |
901
+ | `dist/lib/*.js` (Terser-minified ES + UMD) | `supabase/`, Edge Functions, migrations |
902
+ | `dist/lib/index.d.ts` | `demo/`, `docs/`, `openapi.yaml`, `.env*` |
903
+ | `dist/style.css` | `vite.config.ts`, dev tooling |
904
+ | `src/` (required for React Native / Metro) | `node_modules/` |
905
+
870
906
 
871
907
  - **Geocoding `apiKey`** (`dp_…`) is designed for the browser bundle — rate-limited, scoped to your merchant plan.
872
908
  - **Admin API key** (`qca_…`) must **never** ship in frontend code. Use it server-side only (`x-api-key` on `checkout-admin`).
@@ -893,17 +929,19 @@ Use this when embedding `@quantaroute/checkout` on a **hosted QuantaRoute** stor
893
929
  6. **Optional branding** — `brandColor`, `logoUrl`; per-merchant email template columns (`email_from_name`, `email_logo_url`, `email_subject_template`) in the portal.
894
930
  7. **Handle completion** — implement `onComplete` to pass the `CompleteAddress` to your cart / payment gateway. Built-in payment (`enablePayment`) and COD (`enableCod`) are separate opt-in props.
895
931
 
896
- > **Resend is platform-managed for hosted merchants.** QuantaRoute operates the shared `checkout-email-otp` Edge Function and Resend sender (`RESEND_API_KEY`, `RESEND_FROM_EMAIL`). Merchants do **not** need their own Resend account for the hosted MVP. See [Setting up Resend](#setting-up-resend-required-for-enableemailauth) only if you self-host the Edge Functions.
932
+ > **Resend is platform-managed for hosted merchants.** QuantaRouHMACte operates the shared `checkout-email-otp` Edge Function and Resend sender (`RESEND_API_KEY`, `RESEND_FROM_EMAIL`). Merchants do **not** need their own Resend account for the hosted MVP. See [Setting up Resend](#setting-up-resend-required-for-enableemailauth) only if you self-host the Edge Functions.
897
933
 
898
934
  ### Platform responsibilities (QuantaRoute)
899
935
 
900
- | Item | Owner |
901
- |---|---|
902
- | Deploy & operate `checkout-email-otp`, `checkout-addresses`, `checkout-session-expiry` | QuantaRoute |
903
- | `RESEND_API_KEY`, `RESEND_FROM_EMAIL`, Supabase service role | QuantaRoute (Edge Function secrets) |
904
- | `checkout.merchants` provisioning, `allowed_domains`, email template columns | QuantaRoute portal + DB |
905
- | Buyer OTP consistent reuse (10 logins per code), fresh-code limit (3 / 24h), verify lockout (5 fails → 15 min) | Edge Function |
906
- | Geocoding API key issuance & plan rate limits | QuantaRoute |
936
+
937
+ | Item | Owner |
938
+ | -------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
939
+ | Deploy & operate `checkout-email-otp`, `checkout-addresses`, `checkout-session-expiry` | QuantaRoute |
940
+ | `RESEND_API_KEY`, `RESEND_FROM_EMAIL`, Supabase service role | QuantaRoute (Edge Function secrets) |
941
+ | `checkout.merchants` provisioning, `allowed_domains`, email template columns | QuantaRoute portal + DB |
942
+ | Buyer OTP consistent reuse (10 logins per code), fresh-code limit (3 / 24h), verify lockout (5 fails → 15 min) | Edge Function |
943
+ | Geocoding API key issuance & plan rate limits | QuantaRoute |
944
+
907
945
 
908
946
  ### Maintainer publish checklist
909
947
 
@@ -953,4 +991,4 @@ See [CHANGELOG.md](./CHANGELOG.md) for version history. Current release: **v1.4.
953
991
 
954
992
  ---
955
993
 
956
- **Made with ❤️ in India · Powered by [QuantaRoute](https://quantaroute.com)**
994
+ **Made with ❤️ in India · Powered by [QuantaRoute](https://quantaroute.com)**