@quantaroute/checkout 1.5.0 → 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 +21 -0
- package/README.md +12 -7
- package/dist/lib/index.d.ts +44 -4
- package/dist/lib/quantaroute-checkout.es.js +101 -91
- package/dist/lib/quantaroute-checkout.umd.js +119 -109
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/AddressForm.tsx +31 -7
- package/src/components/CheckoutWidget.tsx +183 -52
- package/src/components/SavedAddressStep.tsx +8 -4
- package/src/core/checkout-api.ts +58 -3
- package/src/core/types.ts +16 -0
- package/src/index.ts +4 -0
- package/src/styles/checkout.css +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ 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
|
+
|
|
10
31
|
## [1.5.0](https://github.com/quantaroute/checkout/compare/v1.4.5...v1.5.0) — 2026-06-21
|
|
11
32
|
|
|
12
33
|
### Added
|
package/README.md
CHANGED
|
@@ -873,13 +873,18 @@ The offline DigiPin algorithm is the official India Post implementation:
|
|
|
873
873
|
## Documentation
|
|
874
874
|
|
|
875
875
|
|
|
876
|
-
| Doc
|
|
877
|
-
|
|
|
878
|
-
| [Changelog](./CHANGELOG.md)
|
|
879
|
-
| [Checkout roadmap](./docs/CHECKOUT_ROADMAP.md)
|
|
880
|
-
| [Merchant onboarding](./docs/merchant-onboarding.md)
|
|
881
|
-
| [
|
|
882
|
-
| [
|
|
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 |
|
|
883
888
|
|
|
884
889
|
|
|
885
890
|
---
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -26,6 +26,17 @@ export declare interface AddressComponents {
|
|
|
26
26
|
|
|
27
27
|
export declare const AddressForm: default_2.FC<AddressFormProps>;
|
|
28
28
|
|
|
29
|
+
/** Pre-fill manual fields when verifying an imported saved address. */
|
|
30
|
+
export declare interface AddressFormInitialValues {
|
|
31
|
+
flatNumber?: string;
|
|
32
|
+
floorNumber?: string;
|
|
33
|
+
buildingName?: string;
|
|
34
|
+
streetName?: string;
|
|
35
|
+
locality?: string;
|
|
36
|
+
label?: AddressLabel;
|
|
37
|
+
labelText?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
export declare interface AddressFormProps {
|
|
30
41
|
digipin: string;
|
|
31
42
|
lat: number;
|
|
@@ -36,6 +47,10 @@ export declare interface AddressFormProps {
|
|
|
36
47
|
onBack: () => void;
|
|
37
48
|
onError?: (error: Error) => void;
|
|
38
49
|
theme?: 'light' | 'dark';
|
|
50
|
+
/** Pre-populate manual fields from a saved address row (lazy DigiPin verify). */
|
|
51
|
+
initialValues?: AddressFormInitialValues;
|
|
52
|
+
/** Override primary submit button label (default: "Save Address"). */
|
|
53
|
+
submitLabel?: string;
|
|
39
54
|
/** Checkout API config for merchant serviceability checks. */
|
|
40
55
|
checkoutConfig?: CheckoutApiConfig;
|
|
41
56
|
/** Buyer session token used by checkout-addresses serviceability_check. */
|
|
@@ -155,7 +170,7 @@ export declare interface CheckoutEvent {
|
|
|
155
170
|
}
|
|
156
171
|
|
|
157
172
|
/** All step-transition event types emitted by the widget. */
|
|
158
|
-
export declare type CheckoutEventType = 'phone_step_viewed' | 'otp_sent' | 'phone_verified' | 'email_step_viewed' | 'email_otp_sent' | 'email_verified' | 'auth_skipped' | 'saved_addresses_viewed' | 'saved_address_selected' | 'map_step_viewed' | 'location_confirmed' | 'form_step_viewed' | 'address_completed' | 'widget_reset' | 'payment_step_viewed' | 'payment_method_selected' | 'session_abandoned';
|
|
173
|
+
export declare type CheckoutEventType = 'phone_step_viewed' | 'otp_sent' | 'phone_verified' | 'email_step_viewed' | 'email_otp_sent' | 'email_verified' | 'auth_skipped' | 'saved_addresses_viewed' | 'saved_address_selected' | 'verify_address_step_viewed' | 'map_step_viewed' | 'location_confirmed' | 'form_step_viewed' | 'address_completed' | 'widget_reset' | 'payment_step_viewed' | 'payment_method_selected' | 'session_abandoned';
|
|
159
174
|
|
|
160
175
|
declare type CheckoutPlatform = 'web' | 'ios' | 'android';
|
|
161
176
|
|
|
@@ -769,9 +784,10 @@ export declare interface ReverseGeocodeResponse {
|
|
|
769
784
|
|
|
770
785
|
export declare interface SavedAddress {
|
|
771
786
|
id: string;
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
787
|
+
/** Null for imported addresses pending lazy map verification. */
|
|
788
|
+
digipin: string | null;
|
|
789
|
+
lat: number | null;
|
|
790
|
+
lng: number | null;
|
|
775
791
|
state: string;
|
|
776
792
|
district: string;
|
|
777
793
|
locality: string;
|
|
@@ -820,6 +836,9 @@ export declare interface SavedAddressStepProps {
|
|
|
820
836
|
onAddNew: () => void;
|
|
821
837
|
}
|
|
822
838
|
|
|
839
|
+
/** Record the buyer's address choice for the current checkout session. */
|
|
840
|
+
export declare function selectAddress(config: CheckoutApiConfig, sessionToken: string, addressId: string): Promise<void>;
|
|
841
|
+
|
|
823
842
|
/** Send a 6-digit OTP to the given email via Resend (Edge: `checkout-email-otp`). */
|
|
824
843
|
export declare function sendEmailOtp(config: CheckoutApiConfig, email: string): Promise<SendEmailOtpResult>;
|
|
825
844
|
|
|
@@ -904,6 +923,27 @@ export declare interface UtmParams {
|
|
|
904
923
|
*/
|
|
905
924
|
export declare function validatePincode(pincode: string, apiKey: string, baseUrl?: string): Promise<PincodeValidateData>;
|
|
906
925
|
|
|
926
|
+
/**
|
|
927
|
+
* Confirm map pin + form for an imported address missing DigiPin.
|
|
928
|
+
* Updates buyer_addresses and marks the session address as verified.
|
|
929
|
+
*/
|
|
930
|
+
export declare function verifyDigipin(config: CheckoutApiConfig, sessionToken: string, addressId: string, payload: VerifyDigipinPayload): Promise<SavedAddress>;
|
|
931
|
+
|
|
932
|
+
export declare interface VerifyDigipinPayload {
|
|
933
|
+
digipin: string;
|
|
934
|
+
lat: number;
|
|
935
|
+
lng: number;
|
|
936
|
+
state?: string;
|
|
937
|
+
district?: string;
|
|
938
|
+
locality?: string;
|
|
939
|
+
pincode?: string;
|
|
940
|
+
delivery_status?: string;
|
|
941
|
+
flat_number?: string;
|
|
942
|
+
floor_number?: string;
|
|
943
|
+
building_name?: string;
|
|
944
|
+
street_name?: string;
|
|
945
|
+
}
|
|
946
|
+
|
|
907
947
|
/** Verify a 6-digit email OTP. Returns a session token on success. */
|
|
908
948
|
export declare function verifyEmailOtp(config: CheckoutApiConfig, email: string, code: string, context?: SessionContextPayload): Promise<VerifyEmailOtpResult>;
|
|
909
949
|
|