@tagadapay/headless-sdk 1.6.0 → 1.8.0-rc.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.
Files changed (125) hide show
  1. package/README.md +1 -186
  2. package/package.json +6 -11
  3. package/dist/core/client.d.ts +0 -54
  4. package/dist/core/client.d.ts.map +0 -1
  5. package/dist/core/client.js +0 -67
  6. package/dist/core/client.js.map +0 -1
  7. package/dist/core/errors.d.ts +0 -46
  8. package/dist/core/errors.d.ts.map +0 -1
  9. package/dist/core/errors.js +0 -57
  10. package/dist/core/errors.js.map +0 -1
  11. package/dist/core/helpers/autocomplete.d.ts +0 -89
  12. package/dist/core/helpers/autocomplete.d.ts.map +0 -1
  13. package/dist/core/helpers/autocomplete.js +0 -186
  14. package/dist/core/helpers/autocomplete.js.map +0 -1
  15. package/dist/core/helpers/countries.d.ts +0 -45
  16. package/dist/core/helpers/countries.d.ts.map +0 -1
  17. package/dist/core/helpers/countries.js +0 -65
  18. package/dist/core/helpers/countries.js.map +0 -1
  19. package/dist/core/helpers/currency.d.ts +0 -26
  20. package/dist/core/helpers/currency.d.ts.map +0 -1
  21. package/dist/core/helpers/currency.js +0 -72
  22. package/dist/core/helpers/currency.js.map +0 -1
  23. package/dist/core/helpers/index.d.ts +0 -5
  24. package/dist/core/helpers/index.d.ts.map +0 -1
  25. package/dist/core/helpers/index.js +0 -5
  26. package/dist/core/helpers/index.js.map +0 -1
  27. package/dist/core/helpers/iso3166.d.ts +0 -28
  28. package/dist/core/helpers/iso3166.d.ts.map +0 -1
  29. package/dist/core/helpers/iso3166.js +0 -84
  30. package/dist/core/helpers/iso3166.js.map +0 -1
  31. package/dist/core/http.d.ts +0 -27
  32. package/dist/core/http.d.ts.map +0 -1
  33. package/dist/core/http.js +0 -116
  34. package/dist/core/http.js.map +0 -1
  35. package/dist/core/index.d.ts +0 -12
  36. package/dist/core/index.d.ts.map +0 -1
  37. package/dist/core/index.js +0 -11
  38. package/dist/core/index.js.map +0 -1
  39. package/dist/core/modules/catalog.d.ts +0 -27
  40. package/dist/core/modules/catalog.d.ts.map +0 -1
  41. package/dist/core/modules/catalog.js +0 -38
  42. package/dist/core/modules/catalog.js.map +0 -1
  43. package/dist/core/modules/checkout.d.ts +0 -249
  44. package/dist/core/modules/checkout.d.ts.map +0 -1
  45. package/dist/core/modules/checkout.js +0 -448
  46. package/dist/core/modules/checkout.js.map +0 -1
  47. package/dist/core/modules/customer.d.ts +0 -33
  48. package/dist/core/modules/customer.d.ts.map +0 -1
  49. package/dist/core/modules/customer.js +0 -53
  50. package/dist/core/modules/customer.js.map +0 -1
  51. package/dist/core/modules/offers.d.ts +0 -137
  52. package/dist/core/modules/offers.d.ts.map +0 -1
  53. package/dist/core/modules/offers.js +0 -141
  54. package/dist/core/modules/offers.js.map +0 -1
  55. package/dist/core/modules/payment.d.ts +0 -298
  56. package/dist/core/modules/payment.d.ts.map +0 -1
  57. package/dist/core/modules/payment.js +0 -701
  58. package/dist/core/modules/payment.js.map +0 -1
  59. package/dist/core/types.d.ts +0 -460
  60. package/dist/core/types.d.ts.map +0 -1
  61. package/dist/core/types.js +0 -5
  62. package/dist/core/types.js.map +0 -1
  63. package/dist/index.d.ts.map +0 -1
  64. package/dist/index.js.map +0 -1
  65. package/dist/react/hooks/useCatalog.d.ts +0 -25
  66. package/dist/react/hooks/useCatalog.d.ts.map +0 -1
  67. package/dist/react/hooks/useCatalog.js +0 -58
  68. package/dist/react/hooks/useCatalog.js.map +0 -1
  69. package/dist/react/hooks/useCheckout.d.ts +0 -58
  70. package/dist/react/hooks/useCheckout.d.ts.map +0 -1
  71. package/dist/react/hooks/useCheckout.js +0 -168
  72. package/dist/react/hooks/useCheckout.js.map +0 -1
  73. package/dist/react/hooks/useCustomer.d.ts +0 -28
  74. package/dist/react/hooks/useCustomer.d.ts.map +0 -1
  75. package/dist/react/hooks/useCustomer.js +0 -77
  76. package/dist/react/hooks/useCustomer.js.map +0 -1
  77. package/dist/react/hooks/useGoogleAutocomplete.d.ts +0 -26
  78. package/dist/react/hooks/useGoogleAutocomplete.d.ts.map +0 -1
  79. package/dist/react/hooks/useGoogleAutocomplete.js +0 -70
  80. package/dist/react/hooks/useGoogleAutocomplete.js.map +0 -1
  81. package/dist/react/hooks/useISOData.d.ts +0 -23
  82. package/dist/react/hooks/useISOData.d.ts.map +0 -1
  83. package/dist/react/hooks/useISOData.js +0 -63
  84. package/dist/react/hooks/useISOData.js.map +0 -1
  85. package/dist/react/hooks/useOffers.d.ts +0 -134
  86. package/dist/react/hooks/useOffers.d.ts.map +0 -1
  87. package/dist/react/hooks/useOffers.js +0 -171
  88. package/dist/react/hooks/useOffers.js.map +0 -1
  89. package/dist/react/hooks/usePayment.d.ts +0 -108
  90. package/dist/react/hooks/usePayment.d.ts.map +0 -1
  91. package/dist/react/hooks/usePayment.js +0 -233
  92. package/dist/react/hooks/usePayment.js.map +0 -1
  93. package/dist/react/index.d.ts +0 -20
  94. package/dist/react/index.d.ts.map +0 -1
  95. package/dist/react/index.js +0 -11
  96. package/dist/react/index.js.map +0 -1
  97. package/dist/react/internal/redirectGuard.d.ts +0 -9
  98. package/dist/react/internal/redirectGuard.d.ts.map +0 -1
  99. package/dist/react/internal/redirectGuard.js +0 -25
  100. package/dist/react/internal/redirectGuard.js.map +0 -1
  101. package/dist/react/provider.d.ts +0 -31
  102. package/dist/react/provider.d.ts.map +0 -1
  103. package/dist/react/provider.js +0 -32
  104. package/dist/react/provider.js.map +0 -1
  105. package/dist/stripe/StripeExpressButton.d.ts +0 -30
  106. package/dist/stripe/StripeExpressButton.d.ts.map +0 -1
  107. package/dist/stripe/StripeExpressButton.js +0 -32
  108. package/dist/stripe/StripeExpressButton.js.map +0 -1
  109. package/dist/stripe/StripeExpressCheckout.d.ts +0 -98
  110. package/dist/stripe/StripeExpressCheckout.d.ts.map +0 -1
  111. package/dist/stripe/StripeExpressCheckout.js +0 -198
  112. package/dist/stripe/StripeExpressCheckout.js.map +0 -1
  113. package/dist/stripe/index.d.ts +0 -8
  114. package/dist/stripe/index.d.ts.map +0 -1
  115. package/dist/stripe/index.js +0 -15
  116. package/dist/stripe/index.js.map +0 -1
  117. package/dist/stripe/useStripeExpress.d.ts +0 -54
  118. package/dist/stripe/useStripeExpress.d.ts.map +0 -1
  119. package/dist/stripe/useStripeExpress.js +0 -126
  120. package/dist/stripe/useStripeExpress.js.map +0 -1
  121. package/dist/tagada-headless-react.min.js +0 -8
  122. package/dist/tagada-headless-react.min.js.map +0 -7
  123. package/dist/tagada-headless.js +0 -2070
  124. package/dist/tagada-headless.min.js +0 -8
  125. package/dist/tagada-headless.min.js.map +0 -7
@@ -1,137 +0,0 @@
1
- import type { HttpClient } from '../http.js';
2
- import type { Offer, OfferPreview, OfferPayResult, ProcessPaymentResult } from '../types.js';
3
- import type { PaymentModule } from './payment.js';
4
- /**
5
- * Offers — upsells, downsells, order bumps, and post-purchase offers.
6
- *
7
- * Endpoints align with the plugin-sdk patterns:
8
- * GET /api/v1/offers/:id — single offer
9
- * GET /api/v1/stores/:storeId/offers — list store offers
10
- * POST /api/v1/offers/:offerId/preview — preview pricing
11
- * POST /api/v1/offers/:offerId/pay-preview — pay a previewed offer (one-click)
12
- * POST /api/v1/checkout-sessions/:id/toggle-order-bump — toggle order bump
13
- * GET /api/v1/post-purchase/:orderId/offers — post-purchase offers for an order
14
- * POST /api/v1/orders/:orderId/post-purchase-offers/:offerId/accept — accept
15
- * POST /api/v1/orders/:orderId/post-purchase-offers/:offerId/decline — decline
16
- */
17
- export declare class OffersModule {
18
- private readonly http;
19
- private readonly storeId;
20
- private readonly payment?;
21
- constructor(http: HttpClient, storeId: string, payment?: PaymentModule | undefined);
22
- /** Get a single offer by ID. */
23
- getOffer(offerId: string): Promise<Offer>;
24
- /** List offers for the current store. Optionally filter by type or a set of IDs. */
25
- listOffers(opts?: {
26
- type?: 'upsell' | 'orderbump';
27
- ids?: string[];
28
- }): Promise<Offer[]>;
29
- /** Preview offer pricing. Returns line items with amounts and totals. */
30
- previewOffer(opts: {
31
- offerId: string;
32
- currency?: string;
33
- lineItems?: Array<{
34
- lineItemId?: string;
35
- productId?: string;
36
- variantId: string;
37
- quantity: number;
38
- }>;
39
- }): Promise<OfferPreview>;
40
- /**
41
- * Pay a previously previewed offer (one-click charge).
42
- * Used after a main order so the stored payment instrument is reused.
43
- *
44
- * **Low-level API.** Returns the raw `OfferPayResult` — `requireAction`,
45
- * polling, and 3DS redirects are NOT handled. For most cases, use
46
- * {@link processOfferPayment} which orchestrates the full lifecycle.
47
- */
48
- payPreviewedOffer(opts: {
49
- offerId: string;
50
- mainOrderId: string;
51
- currency?: string;
52
- lineItems?: Array<{
53
- lineItemId?: string;
54
- productId?: string;
55
- variantId: string;
56
- quantity: number;
57
- }>;
58
- returnUrl?: string;
59
- paymentInstrumentId?: string;
60
- }): Promise<OfferPayResult>;
61
- /**
62
- * One-click upsell with full lifecycle handling.
63
- *
64
- * Like `payment.processPayment()` but for previewed offers: charges the
65
- * stored instrument from `mainOrderId`, runs any 3DS challenge or bank
66
- * redirect, polls until terminal, and returns a typed
67
- * `ProcessPaymentResult` (`succeeded` / `requires_redirect` /
68
- * `failed` / `pending`).
69
- *
70
- * Use this instead of the lower-level `payPreviewedOffer()` whenever you
71
- * don't need to inspect the raw `OfferPayResult` shape — which is most
72
- * of the time.
73
- *
74
- * @example
75
- * ```ts
76
- * const result = await tagada.offers.processOfferPayment({
77
- * offerId: 'offer_xxx',
78
- * mainOrderId: order.id,
79
- * returnUrl: window.location.href,
80
- * });
81
- *
82
- * switch (result.status) {
83
- * case 'succeeded':
84
- * window.location.href = '/upsell-2';
85
- * break;
86
- * case 'requires_redirect':
87
- * window.location.href = result.redirectUrl;
88
- * break;
89
- * case 'failed':
90
- * showError(result.error);
91
- * break;
92
- * }
93
- * ```
94
- */
95
- processOfferPayment(opts: {
96
- offerId: string;
97
- mainOrderId: string;
98
- currency?: string;
99
- lineItems?: Array<{
100
- lineItemId?: string;
101
- productId?: string;
102
- variantId: string;
103
- quantity: number;
104
- }>;
105
- returnUrl?: string;
106
- paymentInstrumentId?: string;
107
- }): Promise<ProcessPaymentResult>;
108
- /** Toggle an order bump on/off within a checkout session. */
109
- toggleOrderBump(opts: {
110
- checkoutSessionId: string;
111
- orderBumpOfferId: string;
112
- selected: boolean;
113
- }): Promise<unknown>;
114
- /** List post-purchase offers for an order. */
115
- listPostPurchaseOffers(orderId: string): Promise<Offer[]>;
116
- /** Accept a post-purchase offer. */
117
- acceptPostPurchaseOffer(opts: {
118
- orderId: string;
119
- offerId: string;
120
- items?: Array<{
121
- variantId: string;
122
- quantity: number;
123
- }>;
124
- }): Promise<{
125
- success: boolean;
126
- error?: string;
127
- }>;
128
- /** Decline a post-purchase offer. */
129
- declinePostPurchaseOffer(opts: {
130
- orderId: string;
131
- offerId: string;
132
- }): Promise<{
133
- success: boolean;
134
- error?: string;
135
- }>;
136
- }
137
- //# sourceMappingURL=offers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["../../../src/core/modules/offers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,cAAc,EACd,oBAAoB,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAFR,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,aAAa,YAAA;IAO1C,gCAAgC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAI/C,oFAAoF;IAC9E,UAAU,C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AAC;YACnB,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC,CAAC;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAoBjC,6DAA6D;IACvD,eAAe,CAAC,IAAI,EAAE;QAC1B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,MAAM,CAAC;QACzB,QAAQ,EAAE,OAAO,CAAC;KACnB,GAAG,OAAO,CAAC,OAAO,CAAC;IAcpB,8CAA8C;IACxC,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAK/D,oCAAoC;IAC9B,uBAAuB,CAAC,IAAI,EAAE;QAClC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,KAAK,CAAC;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACxD,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAOjD,qCAAqC;IAC/B,wBAAwB,CAAC,IAAI,EAAE;QACnC,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAKlD"}
@@ -1,141 +0,0 @@
1
- /**
2
- * Offers — upsells, downsells, order bumps, and post-purchase offers.
3
- *
4
- * Endpoints align with the plugin-sdk patterns:
5
- * GET /api/v1/offers/:id — single offer
6
- * GET /api/v1/stores/:storeId/offers — list store offers
7
- * POST /api/v1/offers/:offerId/preview — preview pricing
8
- * POST /api/v1/offers/:offerId/pay-preview — pay a previewed offer (one-click)
9
- * POST /api/v1/checkout-sessions/:id/toggle-order-bump — toggle order bump
10
- * GET /api/v1/post-purchase/:orderId/offers — post-purchase offers for an order
11
- * POST /api/v1/orders/:orderId/post-purchase-offers/:offerId/accept — accept
12
- * POST /api/v1/orders/:orderId/post-purchase-offers/:offerId/decline — decline
13
- */
14
- export class OffersModule {
15
- constructor(http, storeId, payment) {
16
- this.http = http;
17
- this.storeId = storeId;
18
- this.payment = payment;
19
- }
20
- // ---------------------------------------------------------------------------
21
- // Offer loading
22
- // ---------------------------------------------------------------------------
23
- /** Get a single offer by ID. */
24
- async getOffer(offerId) {
25
- return this.http.get(`/api/v1/offers/${offerId}`);
26
- }
27
- /** List offers for the current store. Optionally filter by type or a set of IDs. */
28
- async listOffers(opts) {
29
- let url = `/api/v1/stores/${this.storeId}/offers`;
30
- const queryParts = [];
31
- if (opts?.type)
32
- queryParts.push(`type=${encodeURIComponent(opts.type)}`);
33
- if (opts?.ids?.length) {
34
- for (const id of opts.ids)
35
- queryParts.push(`ids=${encodeURIComponent(id)}`);
36
- }
37
- if (queryParts.length)
38
- url += `?${queryParts.join('&')}`;
39
- const res = await this.http.get(url);
40
- return res.offers ?? [];
41
- }
42
- // ---------------------------------------------------------------------------
43
- // Preview & pay (one-click upsell flow from plugin-sdk)
44
- // ---------------------------------------------------------------------------
45
- /** Preview offer pricing. Returns line items with amounts and totals. */
46
- async previewOffer(opts) {
47
- return this.http.post(`/api/v1/offers/${opts.offerId}/preview`, {
48
- offerId: opts.offerId,
49
- currency: opts.currency ?? '',
50
- lineItems: opts.lineItems,
51
- });
52
- }
53
- /**
54
- * Pay a previously previewed offer (one-click charge).
55
- * Used after a main order so the stored payment instrument is reused.
56
- *
57
- * **Low-level API.** Returns the raw `OfferPayResult` — `requireAction`,
58
- * polling, and 3DS redirects are NOT handled. For most cases, use
59
- * {@link processOfferPayment} which orchestrates the full lifecycle.
60
- */
61
- async payPreviewedOffer(opts) {
62
- return this.http.post(`/api/v1/offers/${opts.offerId}/pay-preview`, {
63
- offerId: opts.offerId,
64
- currency: opts.currency ?? '',
65
- lineItems: opts.lineItems,
66
- returnUrl: opts.returnUrl ?? (typeof window !== 'undefined' ? window.location.href : ''),
67
- mainOrderId: opts.mainOrderId,
68
- paymentInstrumentId: opts.paymentInstrumentId,
69
- });
70
- }
71
- /**
72
- * One-click upsell with full lifecycle handling.
73
- *
74
- * Like `payment.processPayment()` but for previewed offers: charges the
75
- * stored instrument from `mainOrderId`, runs any 3DS challenge or bank
76
- * redirect, polls until terminal, and returns a typed
77
- * `ProcessPaymentResult` (`succeeded` / `requires_redirect` /
78
- * `failed` / `pending`).
79
- *
80
- * Use this instead of the lower-level `payPreviewedOffer()` whenever you
81
- * don't need to inspect the raw `OfferPayResult` shape — which is most
82
- * of the time.
83
- *
84
- * @example
85
- * ```ts
86
- * const result = await tagada.offers.processOfferPayment({
87
- * offerId: 'offer_xxx',
88
- * mainOrderId: order.id,
89
- * returnUrl: window.location.href,
90
- * });
91
- *
92
- * switch (result.status) {
93
- * case 'succeeded':
94
- * window.location.href = '/upsell-2';
95
- * break;
96
- * case 'requires_redirect':
97
- * window.location.href = result.redirectUrl;
98
- * break;
99
- * case 'failed':
100
- * showError(result.error);
101
- * break;
102
- * }
103
- * ```
104
- */
105
- async processOfferPayment(opts) {
106
- if (!this.payment) {
107
- throw new Error('OffersModule: no PaymentModule injected. ' +
108
- 'Use createHeadlessClient() instead of constructing OffersModule directly.');
109
- }
110
- const returnUrl = opts.returnUrl ?? (typeof window !== 'undefined' ? window.location.href : undefined);
111
- const payResult = await this.payPreviewedOffer({ ...opts, returnUrl });
112
- return this.payment.finalize({ payment: payResult.payment, order: payResult.order }, { returnUrl });
113
- }
114
- // ---------------------------------------------------------------------------
115
- // Order bumps (checkout-session scoped)
116
- // ---------------------------------------------------------------------------
117
- /** Toggle an order bump on/off within a checkout session. */
118
- async toggleOrderBump(opts) {
119
- return this.http.post(`/api/v1/checkout-sessions/${opts.checkoutSessionId}/toggle-order-bump`, {
120
- orderBumpOfferId: opts.orderBumpOfferId,
121
- selected: opts.selected,
122
- });
123
- }
124
- // ---------------------------------------------------------------------------
125
- // Post-purchase offers (order-scoped)
126
- // ---------------------------------------------------------------------------
127
- /** List post-purchase offers for an order. */
128
- async listPostPurchaseOffers(orderId) {
129
- const res = await this.http.get(`/api/v1/post-purchase/${orderId}/offers`);
130
- return Array.isArray(res) ? res : [];
131
- }
132
- /** Accept a post-purchase offer. */
133
- async acceptPostPurchaseOffer(opts) {
134
- return this.http.post(`/api/v1/orders/${opts.orderId}/post-purchase-offers/${opts.offerId}/accept`, { items: opts.items ?? [] });
135
- }
136
- /** Decline a post-purchase offer. */
137
- async declinePostPurchaseOffer(opts) {
138
- return this.http.post(`/api/v1/orders/${opts.orderId}/post-purchase-offers/${opts.offerId}/decline`);
139
- }
140
- }
141
- //# sourceMappingURL=offers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offers.js","sourceRoot":"","sources":["../../../src/core/modules/offers.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,YAAY;IACvB,YACmB,IAAgB,EAChB,OAAe,EACf,OAAuB;QAFvB,SAAI,GAAJ,IAAI,CAAY;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAgB;IACvC,CAAC;IAEJ,8EAA8E;IAC9E,gBAAgB;IAChB,8EAA8E;IAE9E,gCAAgC;IAChC,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAQ,kBAAkB,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,UAAU,CAAC,IAGhB;QACC,IAAI,GAAG,GAAG,kBAAkB,IAAI,CAAC,OAAO,SAAS,CAAC;QAElD,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,IAAI,IAAI,EAAE,IAAI;YAAE,UAAU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AAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAU,yBAAyB,OAAO,SAAS,CAAC,CAAC;QACpF,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,CAAC;IAED,oCAAoC;IACpC,KAAK,CAAC,uBAAuB,CAAC,IAI7B;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,kBAAkB,IAAI,CAAC,OAAO,yBAAyB,IAAI,CAAC,OAAO,SAAS,EAC5E,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAC5B,CAAC;IACJ,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,wBAAwB,CAAC,IAG9B;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,kBAAkB,IAAI,CAAC,OAAO,yBAAyB,IAAI,CAAC,OAAO,UAAU,CAC9E,CAAC;IACJ,CAAC;CACF"}
@@ -1,298 +0,0 @@
1
- import type { HttpClient } from '../http.js';
2
- import type { Environment, PaymentSetupConfig, ExpressMethods, StoreConfig, PayResult, PayOptions, PayDirectOptions, CreateInstrumentOptions, PaymentInstrument, ThreedsSession, PaymentStatus, ProcessPaymentOptions, ProcessPaymentResult } from '../types.js';
3
- /**
4
- * Full payment lifecycle -- discover APMs, tokenize, create instruments,
5
- * process payments, handle 3DS, and poll for status.
6
- *
7
- * Wraps the same REST endpoints that plugin-sdk uses internally.
8
- *
9
- * @remarks PCI DSS compliance notice
10
- *
11
- * This SDK collects card data (PAN, expiry, CVC) in the merchant's page
12
- * context and sends it directly to Basis Theory for tokenization. Card data
13
- * never reaches TagadaPay servers.
14
- *
15
- * Because card data transits through the merchant's JavaScript environment,
16
- * merchants using this SDK are responsible for **PCI DSS SAQ-A-EP**
17
- * compliance. This includes quarterly ASV scans, secure page delivery
18
- * (TLS), and ensuring no unauthorized scripts can access cardholder data.
19
- *
20
- * TagadaPay is PCI DSS Level 1 certified. The merchant's PCI scope is
21
- * determined by their integration method, not by TagadaPay's certification.
22
- *
23
- * See: https://docs.tagada.io/developer-tools/headless-sdk/pci-compliance
24
- */
25
- export declare class PaymentModule {
26
- private readonly http;
27
- private readonly storeId;
28
- private readonly environment;
29
- constructor(http: HttpClient, storeId: string, environment: Environment);
30
- /**
31
- * Get the full payment setup config for a checkout session.
32
- * Returns a map of payment methods with their configuration
33
- * (card, apple_pay, google_pay, klarna, etc.).
34
- *
35
- * Priority chain:
36
- * 1. Explicit `paymentSetupConfig` parameter (developer override)
37
- * 2. `window.__TGD_STEP_CONFIG__` injection (Tagada routing infra)
38
- * 3. API fallback (`GET /api/v1/payment-methods`)
39
- */
40
- getPaymentSetup(checkoutSessionId: string, opts?: {
41
- paymentSetupConfig?: PaymentSetupConfig;
42
- }): Promise<PaymentSetupConfig>;
43
- /**
44
- * Get express payment methods (Apple Pay, Google Pay, PayPal, etc.)
45
- * filtered to only those available in the current browser.
46
- */
47
- getExpressMethods(checkoutSessionId: string, opts?: {
48
- paymentSetupConfig?: PaymentSetupConfig;
49
- }): Promise<ExpressMethods>;
50
- /**
51
- * Get store-level payment config (3DS flags, default flow ID, etc.).
52
- */
53
- getStoreConfig(): Promise<StoreConfig>;
54
- /**
55
- * Convenience: return only enabled payment method keys.
56
- */
57
- getEnabledMethods(checkoutSessionId: string, opts?: {
58
- paymentSetupConfig?: PaymentSetupConfig;
59
- }): Promise<string[]>;
60
- /**
61
- * Tokenize a card using @tagadapay/core-js.
62
- * Requires `@tagadapay/core-js` to be installed as a peer dependency.
63
- *
64
- * Card data is sent directly to Basis Theory for tokenization and never
65
- * reaches TagadaPay servers. The returned `tagadaToken` is safe to pass
66
- * to the TagadaPay API.
67
- *
68
- * **PCI note:** Using this method means card data passes through your
69
- * JavaScript environment. You are responsible for PCI DSS SAQ-A-EP
70
- * compliance. See https://docs.tagada.io/developer-tools/headless-sdk/pci-compliance
71
- *
72
- * @returns tagadaToken (base64 string) and rawToken with SCA metadata.
73
- */
74
- tokenizeCard(card: {
75
- cardNumber: string;
76
- expiryDate: string;
77
- cvc: string;
78
- cardholderName?: string;
79
- }): Promise<{
80
- tagadaToken: string;
81
- rawToken: Record<string, unknown>;
82
- }>;
83
- /**
84
- * Create a reusable payment instrument from a TagadaToken.
85
- * Session-authenticated (uses the checkout session JWT).
86
- */
87
- createInstrument(opts: CreateInstrumentOptions): Promise<{
88
- paymentInstrument: PaymentInstrument;
89
- }>;
90
- /**
91
- * Create a 3DS session on the TagadaPay backend.
92
- * This persists the session so the processor can use it during payment.
93
- */
94
- create3dsSession(opts: {
95
- paymentInstrumentId: string;
96
- sessionData: {
97
- sessionId: string;
98
- metadata?: Record<string, unknown>;
99
- };
100
- provider?: string;
101
- }): Promise<ThreedsSession>;
102
- /**
103
- * High-level pay: single API call that decodes tagadaToken server-side,
104
- * creates the payment instrument, and processes payment.
105
- *
106
- * Also accepts `paymentInstrumentId` directly for pre-created instruments.
107
- */
108
- pay(opts: PayOptions): Promise<PayResult>;
109
- /**
110
- * Low-level pay: process payment with an existing instrument or for APM/express flows
111
- * where no instrument is needed (redirect-based methods).
112
- */
113
- payDirect(opts: PayDirectOptions): Promise<PayResult>;
114
- /**
115
- * Process an Apple Pay payment.
116
- * Tokenizes the Apple Pay token and processes payment in one call.
117
- */
118
- processApplePay(opts: {
119
- checkoutSessionId: string;
120
- applePayToken: unknown;
121
- paymentFlowId?: string;
122
- processorId?: string;
123
- }): Promise<PayResult>;
124
- /**
125
- * Process a Google Pay payment.
126
- * Tokenizes the Google Pay token and processes payment in one call.
127
- */
128
- processGooglePay(opts: {
129
- checkoutSessionId: string;
130
- googlePayToken: string;
131
- paymentFlowId?: string;
132
- processorId?: string;
133
- }): Promise<PayResult>;
134
- /**
135
- * Process an APM payment (Klarna, iDEAL, etc.) via redirect.
136
- * These typically don't require a payment instrument -- the processor handles the redirect.
137
- */
138
- processApm(opts: {
139
- checkoutSessionId: string;
140
- paymentMethod: string;
141
- processorId: string;
142
- paymentFlowId?: string;
143
- }): Promise<PayResult>;
144
- /**
145
- * Initiate a Stripe Express Checkout payment (Apple Pay, Google Pay, Link, etc.).
146
- *
147
- * Calls `pay-v2` with `isExpress: true`, which returns a `clientSecret` in
148
- * `payment.requireActionData.metadata.stripeExpressCheckout.clientSecret`.
149
- * The caller must then call `stripe.confirmPayment()` with that secret.
150
- *
151
- * Used by the `StripeExpressCheckout` class and `useStripeExpress` hook.
152
- * Not typically called directly — use the Stripe integration classes instead.
153
- */
154
- processStripeExpress(opts: {
155
- checkoutSessionId: string;
156
- processorId: string;
157
- paymentMethod: string;
158
- }): Promise<PayResult>;
159
- /**
160
- * Process a payment end-to-end: pay, handle 3DS / redirects, poll until done.
161
- *
162
- * This is the **recommended** way to process payments. It wraps `pay()`, detects
163
- * `requireAction`, runs 3DS challenges (if `@tagadapay/core-js` is installed),
164
- * and polls until a terminal status.
165
- *
166
- * Returns a discriminated union so you can pattern-match on `result.status`:
167
- *
168
- * @example
169
- * ```ts
170
- * const result = await payment.processPayment({
171
- * checkoutSessionId: session.id,
172
- * tagadaToken,
173
- * });
174
- *
175
- * switch (result.status) {
176
- * case 'succeeded':
177
- * console.log('Paid!', result.payment.id);
178
- * break;
179
- * case 'requires_redirect':
180
- * // In browser: window.location.href = result.redirectUrl
181
- * // The React hook handles this automatically.
182
- * break;
183
- * case 'failed':
184
- * console.error(result.error);
185
- * break;
186
- * }
187
- * ```
188
- */
189
- processPayment(opts: ProcessPaymentOptions): Promise<ProcessPaymentResult>;
190
- /**
191
- * Resolve a raw `PayResult` (from any pay endpoint — `pay()`, `payDirect()`,
192
- * `processApplePay()`, `offers.payPreviewedOffer()`, …) into a typed
193
- * `ProcessPaymentResult` (`succeeded` / `requires_redirect` / `failed`
194
- * / `pending`).
195
- *
196
- * Handles 3DS routing (modal challenge via core-js, or bank redirect)
197
- * and async polling until the payment reaches a terminal status.
198
- *
199
- * This is the same logic `processPayment()` runs after `pay()` — exposed
200
- * so callers (and the offers module) that already have a raw `PayResult`
201
- * don't need to re-pay.
202
- */
203
- finalize(input: PayResult, opts?: {
204
- returnUrl?: string;
205
- }): Promise<ProcessPaymentResult>;
206
- /**
207
- * Resume a payment after the user returns from a redirect (3DS, processor auth, APM).
208
- *
209
- * Called automatically by `usePayment()` in React when it detects return-URL params.
210
- * You can also call it manually in non-React apps.
211
- */
212
- resumeAfterRedirect(paymentId: string): Promise<ProcessPaymentResult>;
213
- /**
214
- * Detect a return from a 3DS / processor redirect by inspecting the
215
- * current page URL, then poll the payment to completion.
216
- *
217
- * The post-3DS URL convention used by Tagada-routed processors is
218
- * `?paymentAction=requireAction&paymentActionStatus=completed&paymentId=pay_xxx`.
219
- * If those params are present, this method polls the payment, cleans the
220
- * URL (so a refresh doesn't re-trigger), and returns the resolved
221
- * `ProcessPaymentResult`. Otherwise it returns `null`.
222
- *
223
- * Use this in vanilla apps as the first thing on page load. The React
224
- * `usePayment` hook does the same automatically — don't call this when
225
- * also using `usePayment`, you'll double-poll.
226
- *
227
- * @example
228
- * ```ts
229
- * const tagada = createHeadlessClient({ storeId, environment });
230
- *
231
- * const resumed = await tagada.payment.maybeResumeFromUrl();
232
- * if (resumed?.status === 'succeeded') {
233
- * window.location.href = `/thank-you?orderId=${resumed.order?.id}`;
234
- * return;
235
- * }
236
- * if (resumed?.status === 'failed') {
237
- * showError(resumed.error);
238
- * return;
239
- * }
240
- * // No 3DS return — render the normal page.
241
- * ```
242
- */
243
- maybeResumeFromUrl(opts?: {
244
- /**
245
- * URL to inspect (defaults to `window.location.href`). Pass an explicit
246
- * URL when running outside the browser or when integrating with a
247
- * router that hasn't navigated yet.
248
- */
249
- url?: string;
250
- /**
251
- * Whether to clean the redirect query params from the address bar
252
- * once the payment has been resolved. Defaults to `true`.
253
- */
254
- cleanUrl?: boolean;
255
- }): Promise<ProcessPaymentResult | null>;
256
- /** Get current status of a payment. */
257
- getPaymentStatus(paymentId: string): Promise<PaymentStatus>;
258
- /**
259
- * Poll a payment until it reaches a terminal status.
260
- * Returns the final status or throws on timeout.
261
- */
262
- pollPaymentStatus(paymentId: string, opts?: {
263
- intervalMs?: number;
264
- timeoutMs?: number;
265
- }): Promise<PaymentStatus>;
266
- /** Finalize a payment after a 3DS challenge completes. */
267
- completeAfter3ds(paymentId: string): Promise<PaymentStatus>;
268
- /** Tell the server this action has been seen / is being processed. */
269
- markActionProcessed(paymentId: string): Promise<void>;
270
- /**
271
- * Route a payment action to the appropriate handler.
272
- * Returns `requires_redirect` for browser-level redirects,
273
- * or attempts 3DS inline and polls to completion.
274
- */
275
- private handlePaymentAction;
276
- /**
277
- * Extract redirect info from actionData.
278
- * Works for processor_auth (GET or POST), redirect, and any unknown type with a URL.
279
- */
280
- private extractRedirect;
281
- /**
282
- * Run a 3DS challenge using @tagadapay/core-js.
283
- * If core-js is not installed, falls back to redirect.
284
- */
285
- private handleThreedsAuth;
286
- /**
287
- * Poll until the payment reaches a terminal status, then return a ProcessPaymentResult.
288
- * Also handles new requireAction that may appear during polling.
289
- */
290
- private pollUntilDone;
291
- /**
292
- * Read paymentSetupConfig from the Tagada routing injection.
293
- * Only available when running on Tagada infra (not on external hosting like Vercel).
294
- */
295
- private readInjectedStepConfig;
296
- private loadCoreJs;
297
- }
298
- //# sourceMappingURL=payment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/core/modules/payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAElB,cAAc,EACd,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,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