@arnaudjnn/billing-tools 0.30.0 → 0.31.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/dist/ui/index.d.ts +24 -4
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +20 -10
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddressElement, PaymentElement, useElements, useStripe } from "@stripe/react-stripe-js";
|
|
1
|
+
import { AddressElement, PaymentElement, TaxIdElement, useElements, useStripe } from "@stripe/react-stripe-js";
|
|
2
2
|
import { type Appearance, type StripeElementLocale } from "@stripe/stripe-js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export type BillingCheckoutProviderProps = {
|
|
@@ -10,10 +10,16 @@ export type BillingCheckoutProviderProps = {
|
|
|
10
10
|
appearance?: Appearance;
|
|
11
11
|
/** e.g. "it" — defaults to the browser's locale. */
|
|
12
12
|
locale?: StripeElementLocale;
|
|
13
|
+
/**
|
|
14
|
+
* Load the beta that the Tax ID Element needs. Set this on the provider AND
|
|
15
|
+
* pass `collectTaxId` to BillingPaymentForm — the element cannot render unless
|
|
16
|
+
* Stripe.js was instantiated with the beta, so the two go together.
|
|
17
|
+
*/
|
|
18
|
+
taxIdBeta?: boolean;
|
|
13
19
|
children: React.ReactNode;
|
|
14
20
|
};
|
|
15
21
|
/** Wraps Stripe's <Elements> with the bits every consumer would otherwise repeat. */
|
|
16
|
-
export declare function BillingCheckoutProvider({ publishableKey, clientSecret, appearance, locale, children, }: BillingCheckoutProviderProps): React.JSX.Element;
|
|
22
|
+
export declare function BillingCheckoutProvider({ publishableKey, clientSecret, appearance, locale, taxIdBeta, children, }: BillingCheckoutProviderProps): React.JSX.Element;
|
|
17
23
|
export type BillingPaymentFormProps = {
|
|
18
24
|
/**
|
|
19
25
|
* Collect a billing address. Required when the subscription was created with
|
|
@@ -21,6 +27,20 @@ export type BillingPaymentFormProps = {
|
|
|
21
27
|
* tax line stays 0 and the total silently disagrees with the summary above.
|
|
22
28
|
*/
|
|
23
29
|
collectAddress?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Render Stripe's Tax ID Element — the "Business tax ID (Optional)" field with
|
|
32
|
+
* its type selector.
|
|
33
|
+
*
|
|
34
|
+
* Requires `taxIdBeta` on the provider (it is a public-preview feature). Paired
|
|
35
|
+
* with `collectAddress`, Stripe infers the tax ID type and whether to show the
|
|
36
|
+
* field at all from the country, so an Italian customer is offered IT VAT
|
|
37
|
+
* rather than a global list.
|
|
38
|
+
*
|
|
39
|
+
* NOTE: collecting a tax ID does not by itself change what is charged. Reverse
|
|
40
|
+
* charge is applied only when the IDs reach a Stripe Tax calculation — with a
|
|
41
|
+
* fixed tax rate the ID is recorded on the invoice and nothing more.
|
|
42
|
+
*/
|
|
43
|
+
collectTaxId?: boolean;
|
|
24
44
|
/** Where Stripe returns the browser after an off-site step (3DS, bank redirect). */
|
|
25
45
|
returnUrl: string;
|
|
26
46
|
/** Rendered as the submit button. Receives the live submitting state. */
|
|
@@ -43,8 +63,8 @@ export type BillingPaymentFormProps = {
|
|
|
43
63
|
* `redirect: "if_required"` keeps the common card case on-page and only leaves
|
|
44
64
|
* for methods that genuinely need it (3DS challenge, bank redirects).
|
|
45
65
|
*/
|
|
46
|
-
export declare function BillingPaymentForm({ collectAddress, returnUrl, children, onSuccess, onError, className, }: BillingPaymentFormProps): React.JSX.Element;
|
|
47
|
-
export { AddressElement, PaymentElement, useElements, useStripe };
|
|
66
|
+
export declare function BillingPaymentForm({ collectAddress, collectTaxId, returnUrl, children, onSuccess, onError, className, }: BillingPaymentFormProps): React.JSX.Element;
|
|
67
|
+
export { AddressElement, PaymentElement, TaxIdElement, useElements, useStripe };
|
|
48
68
|
export type CheckoutSync = {
|
|
49
69
|
ok: true;
|
|
50
70
|
clientSecret: string;
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAEd,cAAc,EACd,WAAW,EACX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAc,KAAK,UAAU,EAAe,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAEd,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAc,KAAK,UAAU,EAAe,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6C/B,MAAM,MAAM,4BAA4B,GAAG;IACzC,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oDAAoD;IACpD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,uBAAuB,CAAC,EACtC,cAAc,EACd,YAAY,EACZ,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,GACT,EAAE,4BAA4B,qBAU9B;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oFAAoF;IACpF,SAAS,EAAE,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,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG;IACF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAwDA"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { AddressElement, Elements, PaymentElement, useElements, useStripe, } from "@stripe/react-stripe-js";
|
|
3
|
+
import { AddressElement, Elements, PaymentElement, TaxIdElement, useElements, useStripe, } from "@stripe/react-stripe-js";
|
|
4
4
|
import { loadStripe } from "@stripe/stripe-js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
// The checkout UI, so every consumer app mounts the SAME payment form instead of
|
|
@@ -25,17 +25,27 @@ import * as React from "react";
|
|
|
25
25
|
// publishable key so a consumer switching keys (test → live) still gets one
|
|
26
26
|
// instance per key rather than one forever.
|
|
27
27
|
const stripeCache = new Map();
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// The Tax ID Element is in PUBLIC PREVIEW and only loads when Stripe.js is
|
|
29
|
+
// instantiated with this beta. It is opted into per-provider rather than always,
|
|
30
|
+
// because a beta can change without notice.
|
|
31
|
+
const TAX_ID_BETA = "elements_tax_id_1";
|
|
32
|
+
function stripeFor(publishableKey, betas) {
|
|
33
|
+
// The betas are part of the cache key: loadStripe is memoised per page, so
|
|
34
|
+
// keying on the publishable key alone would let whichever provider mounted
|
|
35
|
+
// FIRST decide whether the beta is active for every later one.
|
|
36
|
+
const key = `${publishableKey}|${(betas ?? []).join(",")}`;
|
|
37
|
+
const hit = stripeCache.get(key);
|
|
30
38
|
if (hit)
|
|
31
39
|
return hit;
|
|
32
|
-
const p =
|
|
33
|
-
|
|
40
|
+
const p = betas?.length
|
|
41
|
+
? loadStripe(publishableKey, { betas })
|
|
42
|
+
: loadStripe(publishableKey);
|
|
43
|
+
stripeCache.set(key, p);
|
|
34
44
|
return p;
|
|
35
45
|
}
|
|
36
46
|
/** Wraps Stripe's <Elements> with the bits every consumer would otherwise repeat. */
|
|
37
|
-
export function BillingCheckoutProvider({ publishableKey, clientSecret, appearance, locale, children, }) {
|
|
38
|
-
const stripe = React.useMemo(() => stripeFor(publishableKey), [publishableKey]);
|
|
47
|
+
export function BillingCheckoutProvider({ publishableKey, clientSecret, appearance, locale, taxIdBeta, children, }) {
|
|
48
|
+
const stripe = React.useMemo(() => stripeFor(publishableKey, taxIdBeta ? [TAX_ID_BETA] : undefined), [publishableKey, taxIdBeta]);
|
|
39
49
|
return (_jsx(Elements, { stripe: stripe, options: { clientSecret, appearance, locale }, children: children }));
|
|
40
50
|
}
|
|
41
51
|
/**
|
|
@@ -48,7 +58,7 @@ export function BillingCheckoutProvider({ publishableKey, clientSecret, appearan
|
|
|
48
58
|
* `redirect: "if_required"` keeps the common card case on-page and only leaves
|
|
49
59
|
* for methods that genuinely need it (3DS challenge, bank redirects).
|
|
50
60
|
*/
|
|
51
|
-
export function BillingPaymentForm({ collectAddress = false, returnUrl, children, onSuccess, onError, className, }) {
|
|
61
|
+
export function BillingPaymentForm({ collectAddress = false, collectTaxId = false, returnUrl, children, onSuccess, onError, className, }) {
|
|
52
62
|
const stripe = useStripe();
|
|
53
63
|
const elements = useElements();
|
|
54
64
|
const [submitting, setSubmitting] = React.useState(false);
|
|
@@ -79,9 +89,9 @@ export function BillingPaymentForm({ collectAddress = false, returnUrl, children
|
|
|
79
89
|
setSubmitting(false);
|
|
80
90
|
}
|
|
81
91
|
}
|
|
82
|
-
return (_jsxs("form", { onSubmit: onSubmit, className: className, children: [collectAddress && _jsx(AddressElement, { options: { mode: "billing" } }), _jsx(PaymentElement, {}), children({ submitting })] }));
|
|
92
|
+
return (_jsxs("form", { onSubmit: onSubmit, className: className, children: [collectAddress && _jsx(AddressElement, { options: { mode: "billing" } }), _jsx(PaymentElement, {}), collectTaxId && _jsx(TaxIdElement, { options: {} }), children({ submitting })] }));
|
|
83
93
|
}
|
|
84
|
-
export { AddressElement, PaymentElement, useElements, useStripe };
|
|
94
|
+
export { AddressElement, PaymentElement, TaxIdElement, useElements, useStripe };
|
|
85
95
|
export function useCheckout(opts) {
|
|
86
96
|
const { basket, create, update, cancel, debounceMs = 500, paused = false } = opts;
|
|
87
97
|
const [state, setState] = React.useState(null);
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,WAAW,EACX,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAA0D,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iFAAiF;AACjF,wCAAwC;AACxC,EAAE;AACF,iFAAiF;AACjF,iFAAiF;AACjF,iEAAiE;AACjE,gFAAgF;AAChF,mFAAmF;AACnF,iFAAiF;AACjF,4EAA4E;AAC5E,+EAA+E;AAC/E,4DAA4D;AAC5D,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,kFAAkF;AAClF,8EAA8E;AAC9E,gDAAgD;AAEhD,iFAAiF;AACjF,4EAA4E;AAC5E,4CAA4C;AAC5C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkC,CAAC;AAE9D,SAAS,SAAS,CAAC,cAAsB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,G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AM,CAAC,CAAC,CAAC;IAErB,yEAAyE;IACzE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,GAAG,EAAE;YACV,MAAM,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC;YAC5B,IAAI,EAAE,IAAI,MAAM;gBAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC,CAAC;QACF,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,gFAAgF;IAChF,sEAAsE;IACtE,MAAM,OAAO,GAAG,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,OAAO;QACL,YAAY,EAAE,OAAO,EAAE,YAAY,IAAI,IAAI;QAC3C,cAAc,EAAE,OAAO,EAAE,cAAc,IAAI,IAAI;QAC/C,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;QAClC,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arnaudjnn/billing-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "The get-paid engine for Stripe + WorkOS apps, for humans and AI agents. Drop-in API-key auth, token/credit + subscription billing, auth.md agent registration, and MPP machine payments, as MCP tools, a REST API, and a CLI. Framework-agnostic, storage-pluggable.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Arnaud Jeannin",
|