@billing-io/designs 1.0.0 → 1.2.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { PLANS, MARKETING_PLANS, MARKETING_SANDBOX, COMPARISON_PLANS, COMPARISON_DATA, PRICING_FAQS, MID_CYCLE_THRESHOLD_USD, PAST_DUE_RESTRICT_HOURS, RESTRICT_SUSPEND_HOURS, USAGE_WARNING_THRESHOLD, BILLING_EMAIL_EVENTS, BILLING_EVENT_TYPES, } from "./plans.js";
2
- export type { PlanId, BillingStatus, PlanConfig, MarketingPlan, MarketingSandboxPlan, ComparisonValue, ComparisonFeature, ComparisonSection, FaqEntry, } from "./plans.js";
1
+ /** Canary token temporary, used to verify live npm imports. */
2
+ export declare const CANARY: "blueberries";
3
3
  export { BRAND_SVG_VIEWBOX, BRAND_SVG_PATHS, BADGE_DIMENSIONS, buildBrandBadgeHTML, getBrandSVG, } from "./brand.js";
4
4
  export type { BadgeSize, BadgeDimensions } from "./brand.js";
5
5
  export { OVERLAY_Z_INDEX, EASING, MSG_PREFIX, VARIATION_ALIASES, VARIATIONS, CLOSE_BUTTON, BACKDROP, CARD, PANEL, BOTTOM_SHEET, POPUP, FULLSCREEN, SUCCESS_AUTO_CLOSE_MS, } from "./overlay/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,GACT,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7D,OAAO,EACL,eAAe,EACf,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,EACL,UAAU,EACV,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,iEAAiE;AACjE,eAAO,MAAM,MAAM,EAAG,aAAsB,CAAC;AAG7C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7D,OAAO,EACL,eAAe,EACf,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,EACL,UAAU,EACV,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,15 +1,13 @@
1
- // @billing-io/designs — Centralized design definitions for billing.io
1
+ // @billing-io/designs — Centralized design assets for billing.io
2
2
  //
3
3
  // This package is the single source of truth for:
4
- // - Plan/pricing definitions and types
5
4
  // - Brand assets (SVG badge, logo)
6
5
  // - Checkout overlay design constants (variations, animations, dimensions)
7
- // - Billing system constants (thresholds, event types)
6
+ // - Canonical billing.js IIFE (checkout overlay script)
8
7
  //
9
- // All billing.io projects should import from this package instead of
10
- // duplicating these values.
11
- // Plans, pricing, and billing constants
12
- export { PLANS, MARKETING_PLANS, MARKETING_SANDBOX, COMPARISON_PLANS, COMPARISON_DATA, PRICING_FAQS, MID_CYCLE_THRESHOLD_USD, PAST_DUE_RESTRICT_HOURS, RESTRICT_SUSPEND_HOURS, USAGE_WARNING_THRESHOLD, BILLING_EMAIL_EVENTS, BILLING_EVENT_TYPES, } from "./plans.js";
8
+ // Plans, pricing, and billing system constants live in main/src/lib/billing/constants.ts.
9
+ /** Canary token — temporary, used to verify live npm imports. */
10
+ export const CANARY = "blueberries";
13
11
  // Brand assets
14
12
  export { BRAND_SVG_VIEWBOX, BRAND_SVG_PATHS, BADGE_DIMENSIONS, buildBrandBadgeHTML, getBrandSVG, } from "./brand.js";
15
13
  // Overlay design constants
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,kDAAkD;AAClD,yCAAyC;AACzC,qCAAqC;AACrC,6EAA6E;AAC7E,yDAAyD;AACzD,EAAE;AACF,qEAAqE;AACrE,4BAA4B;AAE5B,wCAAwC;AACxC,OAAO,EACL,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAcpB,eAAe;AACf,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AAIpB,2BAA2B;AAC3B,OAAO,EACL,eAAe,EACf,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,EACL,UAAU,EACV,qBAAqB,GACtB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,kDAAkD;AAClD,qCAAqC;AACrC,6EAA6E;AAC7E,0DAA0D;AAC1D,EAAE;AACF,0FAA0F;AAE1F,iEAAiE;AACjE,MAAM,CAAC,MAAM,MAAM,GAAG,aAAsB,CAAC;AAE7C,eAAe;AACf,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AAIpB,2BAA2B;AAC3B,OAAO,EACL,eAAe,EACf,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,KAAK,EACL,UAAU,EACV,qBAAqB,GACtB,MAAM,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@billing-io/designs",
3
- "version": "1.0.0",
4
- "description": "Centralized plan definitions, checkout overlay designs, and brand assets for billing.io",
3
+ "version": "1.2.0",
4
+ "description": "Checkout overlay designs, brand assets, and billing.js for billing.io",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -10,10 +10,6 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "default": "./dist/index.js"
12
12
  },
13
- "./plans": {
14
- "types": "./dist/plans.d.ts",
15
- "default": "./dist/plans.js"
16
- },
17
13
  "./brand": {
18
14
  "types": "./dist/brand.d.ts",
19
15
  "default": "./dist/brand.js"
@@ -45,9 +41,8 @@
45
41
  "billing.io",
46
42
  "checkout",
47
43
  "designs",
48
- "plans",
49
- "pricing",
50
- "overlay"
44
+ "overlay",
45
+ "brand"
51
46
  ],
52
47
  "author": "billing.io",
53
48
  "license": "MIT",
package/src/index.ts CHANGED
@@ -1,41 +1,14 @@
1
- // @billing-io/designs — Centralized design definitions for billing.io
1
+ // @billing-io/designs — Centralized design assets for billing.io
2
2
  //
3
3
  // This package is the single source of truth for:
4
- // - Plan/pricing definitions and types
5
4
  // - Brand assets (SVG badge, logo)
6
5
  // - Checkout overlay design constants (variations, animations, dimensions)
7
- // - Billing system constants (thresholds, event types)
6
+ // - Canonical billing.js IIFE (checkout overlay script)
8
7
  //
9
- // All billing.io projects should import from this package instead of
10
- // duplicating these values.
8
+ // Plans, pricing, and billing system constants live in main/src/lib/billing/constants.ts.
11
9
 
12
- // Plans, pricing, and billing constants
13
- export {
14
- PLANS,
15
- MARKETING_PLANS,
16
- MARKETING_SANDBOX,
17
- COMPARISON_PLANS,
18
- COMPARISON_DATA,
19
- PRICING_FAQS,
20
- MID_CYCLE_THRESHOLD_USD,
21
- PAST_DUE_RESTRICT_HOURS,
22
- RESTRICT_SUSPEND_HOURS,
23
- USAGE_WARNING_THRESHOLD,
24
- BILLING_EMAIL_EVENTS,
25
- BILLING_EVENT_TYPES,
26
- } from "./plans.js";
27
-
28
- export type {
29
- PlanId,
30
- BillingStatus,
31
- PlanConfig,
32
- MarketingPlan,
33
- MarketingSandboxPlan,
34
- ComparisonValue,
35
- ComparisonFeature,
36
- ComparisonSection,
37
- FaqEntry,
38
- } from "./plans.js";
10
+ /** Canary token — temporary, used to verify live npm imports. */
11
+ export const CANARY = "blueberries" as const;
39
12
 
40
13
  // Brand assets
41
14
  export {
package/dist/plans.d.ts DELETED
@@ -1,82 +0,0 @@
1
- export type PlanId = "free" | "starter" | "growth" | "enterprise";
2
- export type BillingStatus = "active" | "past_due" | "restricted" | "suspended";
3
- export interface PlanConfig {
4
- id: PlanId;
5
- name: string;
6
- description: string;
7
- monthlyMinimum: number;
8
- volumeBps: number;
9
- perPaymentFee: number;
10
- includedVolumeUsd: number;
11
- features: string[];
12
- requiresCard: boolean;
13
- }
14
- export declare const PLANS: Record<PlanId, PlanConfig>;
15
- export interface MarketingPlan {
16
- id: PlanId;
17
- name: string;
18
- price: string;
19
- period: string;
20
- badge?: string;
21
- subheadline: string;
22
- features: string[];
23
- ctaLabel: string;
24
- ctaHref: string;
25
- ctaExternal?: boolean;
26
- }
27
- export declare const MARKETING_PLANS: MarketingPlan[];
28
- export interface MarketingSandboxPlan {
29
- name: string;
30
- price: string;
31
- period: string;
32
- features: string[];
33
- ctaLabel: string;
34
- ctaHref: string;
35
- footnote: string;
36
- }
37
- export declare const MARKETING_SANDBOX: MarketingSandboxPlan;
38
- export type ComparisonValue = boolean | string | Record<string, boolean | string>;
39
- export interface ComparisonFeature {
40
- name: string;
41
- value: ComparisonValue;
42
- }
43
- export interface ComparisonSection {
44
- title: string;
45
- features: ComparisonFeature[];
46
- }
47
- export declare const COMPARISON_PLANS: readonly ["Sandbox", "Starter", "Growth", "Scale"];
48
- export declare const COMPARISON_DATA: ComparisonSection[];
49
- export interface FaqEntry {
50
- id: string;
51
- question: string;
52
- answer: string;
53
- }
54
- export declare const PRICING_FAQS: FaqEntry[];
55
- export declare const MID_CYCLE_THRESHOLD_USD = 100;
56
- export declare const PAST_DUE_RESTRICT_HOURS = 48;
57
- export declare const RESTRICT_SUSPEND_HOURS = 168;
58
- export declare const USAGE_WARNING_THRESHOLD = 0.8;
59
- export declare const BILLING_EMAIL_EVENTS: {
60
- readonly CARD_REQUIRED: "card_required";
61
- readonly USAGE_APPROACHING_LIMIT: "usage_approaching_limit";
62
- readonly MID_CYCLE_CHARGE: "mid_cycle_charge";
63
- readonly PAYMENT_FAILED: "payment_failed";
64
- readonly SERVICE_RESTRICTED: "service_restricted";
65
- readonly SERVICE_SUSPENDED: "service_suspended";
66
- readonly PAYMENT_RECOVERED: "payment_recovered";
67
- };
68
- export declare const BILLING_EVENT_TYPES: {
69
- readonly PLAN_CHANGED: "plan_changed";
70
- readonly SUBSCRIPTION_CREATED: "subscription_created";
71
- readonly USAGE_RECORDED: "usage_recorded";
72
- readonly INVOICE_CREATED: "invoice_created";
73
- readonly INVOICE_PAID: "invoice_paid";
74
- readonly INVOICE_FAILED: "invoice_failed";
75
- readonly MID_CYCLE_INVOICE: "mid_cycle_invoice";
76
- readonly STATUS_CHANGED: "status_changed";
77
- readonly PAYMENT_METHOD_UPDATED: "payment_method_updated";
78
- readonly ACCOUNT_RESTRICTED: "account_restricted";
79
- readonly ACCOUNT_SUSPENDED: "account_suspended";
80
- readonly ACCOUNT_RECOVERED: "account_recovered";
81
- };
82
- //# sourceMappingURL=plans.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAElE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,CAAC;AAE/E,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAqE5C,CAAC;AAQF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QA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AAmB;;;;;;;;;;;;;CAatB,CAAC"}
package/dist/plans.js DELETED
@@ -1,277 +0,0 @@
1
- // @billing-io/designs — Canonical plan definitions
2
- // All billing.io projects should import plan data from this package.
3
- export const PLANS = {
4
- free: {
5
- id: "free",
6
- name: "Free",
7
- description: "For development and testing",
8
- monthlyMinimum: 0,
9
- volumeBps: 0,
10
- perPaymentFee: 0,
11
- includedVolumeUsd: 2000,
12
- features: [
13
- "Up to $2,000/month processed",
14
- "Limited API rate",
15
- "No production SLA",
16
- "No webhook retries",
17
- ],
18
- requiresCard: false,
19
- },
20
- starter: {
21
- id: "starter",
22
- name: "Starter",
23
- description: "For production applications",
24
- monthlyMinimum: 49,
25
- volumeBps: 30, // 0.30%
26
- perPaymentFee: 0.02,
27
- includedVolumeUsd: 5000,
28
- features: [
29
- "0.30% of settled volume",
30
- "$0.02 per successful payment",
31
- "First $5,000/month included",
32
- "Standard webhooks",
33
- "Email support",
34
- ],
35
- requiresCard: true,
36
- },
37
- growth: {
38
- id: "growth",
39
- name: "Growth",
40
- description: "For scaling businesses",
41
- monthlyMinimum: 199,
42
- volumeBps: 20, // 0.20%
43
- perPaymentFee: 0.02,
44
- includedVolumeUsd: 50000,
45
- features: [
46
- "0.20% of settled volume",
47
- "$0.02 per successful payment",
48
- "First $50,000/month included",
49
- "Webhook retries + logs",
50
- "Team access",
51
- "Priority email support",
52
- ],
53
- requiresCard: true,
54
- },
55
- enterprise: {
56
- id: "enterprise",
57
- name: "Enterprise",
58
- description: "Custom pricing and SLA",
59
- monthlyMinimum: 2000,
60
- volumeBps: 10, // 0.10-0.15%, configurable
61
- perPaymentFee: 0.02,
62
- includedVolumeUsd: 500000,
63
- features: [
64
- "0.10-0.15% volume rate",
65
- "Custom minimums",
66
- "SLA guarantee",
67
- "Dedicated infrastructure",
68
- "Custom confirmations",
69
- ],
70
- requiresCard: true,
71
- },
72
- };
73
- export const MARKETING_PLANS = [
74
- {
75
- id: "starter",
76
- name: "Starter",
77
- price: `$${PLANS.starter.monthlyMinimum}`,
78
- period: "/month",
79
- badge: "Most common",
80
- subheadline: `${(PLANS.starter.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.starter.perPaymentFee.toFixed(2)} per payment.`,
81
- features: [
82
- "Branded checkout on your domain",
83
- "Embeddable checkout",
84
- "SDK access",
85
- "Signed webhooks",
86
- "Dashboard and analytics",
87
- "Email support",
88
- ],
89
- ctaLabel: "Go live",
90
- ctaHref: "https://app.billing.io/signup",
91
- },
92
- {
93
- id: "growth",
94
- name: "Growth",
95
- price: `$${PLANS.growth.monthlyMinimum}`,
96
- period: "/month",
97
- subheadline: `${(PLANS.growth.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.growth.perPaymentFee.toFixed(2)} per payment.`,
98
- features: [
99
- "Everything in Starter",
100
- "Webhook retries and logs",
101
- "Team access (up to 5)",
102
- "Priority support",
103
- ],
104
- ctaLabel: "Upgrade to Growth",
105
- ctaHref: "https://app.billing.io/signup",
106
- },
107
- {
108
- id: "enterprise",
109
- name: "Scale",
110
- price: `$${PLANS.enterprise.monthlyMinimum}`,
111
- period: "/month",
112
- subheadline: `${(PLANS.enterprise.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.enterprise.perPaymentFee.toFixed(2)} per payment.`,
113
- features: [
114
- "Everything in Growth",
115
- "Higher throughput and billing caps",
116
- "Unlimited team members",
117
- "Direct support channel",
118
- ],
119
- ctaLabel: "Contact sales",
120
- ctaHref: "https://wa.me/message/ZTXL4WR3SWZQP1",
121
- ctaExternal: true,
122
- },
123
- ];
124
- export const MARKETING_SANDBOX = {
125
- name: "Sandbox (development only)",
126
- price: "$0",
127
- period: "/month",
128
- features: [
129
- "Testnet access only",
130
- "Full SDK access",
131
- "Simulated webhooks",
132
- "Dashboard preview",
133
- "No card required",
134
- "No time limit",
135
- ],
136
- ctaLabel: "Start in sandbox",
137
- ctaHref: "https://app.billing.io/signup",
138
- footnote: "Production usage requires a paid plan.",
139
- };
140
- export const COMPARISON_PLANS = ["Sandbox", "Starter", "Growth", "Scale"];
141
- export const COMPARISON_DATA = [
142
- {
143
- title: "Payments",
144
- features: [
145
- { name: "Testnet access", value: true },
146
- {
147
- name: "Mainnet payments",
148
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
149
- },
150
- {
151
- name: "Hosted checkout",
152
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
153
- },
154
- {
155
- name: "Embeddable checkout",
156
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
157
- },
158
- ],
159
- },
160
- {
161
- title: "Developer tools",
162
- features: [
163
- { name: "SDK access", value: true },
164
- {
165
- name: "Webhooks",
166
- value: { Sandbox: "Simulated", Starter: "Signed", Growth: "Signed", Scale: "Signed" },
167
- },
168
- {
169
- name: "Webhook retries",
170
- value: { Sandbox: false, Starter: false, Growth: true, Scale: true },
171
- },
172
- {
173
- name: "Dashboard",
174
- value: { Sandbox: "Preview", Starter: true, Growth: true, Scale: true },
175
- },
176
- ],
177
- },
178
- {
179
- title: "Team and support",
180
- features: [
181
- {
182
- name: "Team members",
183
- value: { Sandbox: "1", Starter: "1", Growth: "Up to 5", Scale: "Unlimited" },
184
- },
185
- {
186
- name: "Support level",
187
- value: { Sandbox: "Docs only", Starter: "Email", Growth: "Priority", Scale: "Direct channel" },
188
- },
189
- ],
190
- },
191
- {
192
- title: "Billing and limits",
193
- features: [
194
- {
195
- name: "Billing cap",
196
- value: { Sandbox: "N/A", Starter: "$200", Growth: "$500", Scale: "$1,500" },
197
- },
198
- {
199
- name: "Fiat access eligibility",
200
- value: { Sandbox: false, Starter: "After volume", Growth: "After volume", Scale: "After volume" },
201
- },
202
- ],
203
- },
204
- ];
205
- export const PRICING_FAQS = [
206
- {
207
- id: "faq-1",
208
- question: "Do I need a credit card to start?",
209
- answer: "Not for sandbox. You can build and test without a card. A payment method is required when you move to production.",
210
- },
211
- {
212
- id: "faq-2",
213
- question: "When do I start paying?",
214
- answer: "You can build and test for free in sandbox. Production usage is billed according to your plan when you process real payments.",
215
- },
216
- {
217
- id: "faq-3",
218
- question: "When do you charge me?",
219
- answer: "Your plan fee is charged at the start of each billing cycle. Usage fees are charged when they hit a cap or at month-end.",
220
- },
221
- {
222
- id: "faq-4",
223
- question: "What happens if my card fails?",
224
- answer: "We notify you and retry. If payment stays unresolved, production features may be paused until it is sorted out.",
225
- },
226
- {
227
- id: "faq-5",
228
- question: "Do you hold my funds?",
229
- answer: "No. Payments settle directly to your wallet. billing.io is non-custodial.",
230
- },
231
- {
232
- id: "faq-6",
233
- question: "Can I upgrade or downgrade plans?",
234
- answer: "Yes. We recommend upgrades automatically when they save you money at your current volume.",
235
- },
236
- {
237
- id: "faq-7",
238
- question: "When can I access fiat payments?",
239
- answer: "Fiat access becomes available after you process meaningful volume. It is not included by default.",
240
- },
241
- {
242
- id: "faq-8",
243
- question: "Is billing.io right for low-volume projects?",
244
- answer: "If you are still building, use the sandbox. Production plans are designed for businesses processing real payments.",
245
- },
246
- ];
247
- // ---------------------------------------------------------------------------
248
- // Billing system constants (thresholds, events)
249
- // ---------------------------------------------------------------------------
250
- export const MID_CYCLE_THRESHOLD_USD = 100;
251
- export const PAST_DUE_RESTRICT_HOURS = 48;
252
- export const RESTRICT_SUSPEND_HOURS = 168; // 7 days
253
- export const USAGE_WARNING_THRESHOLD = 0.8; // 80%
254
- export const BILLING_EMAIL_EVENTS = {
255
- CARD_REQUIRED: "card_required",
256
- USAGE_APPROACHING_LIMIT: "usage_approaching_limit",
257
- MID_CYCLE_CHARGE: "mid_cycle_charge",
258
- PAYMENT_FAILED: "payment_failed",
259
- SERVICE_RESTRICTED: "service_restricted",
260
- SERVICE_SUSPENDED: "service_suspended",
261
- PAYMENT_RECOVERED: "payment_recovered",
262
- };
263
- export const BILLING_EVENT_TYPES = {
264
- PLAN_CHANGED: "plan_changed",
265
- SUBSCRIPTION_CREATED: "subscription_created",
266
- USAGE_RECORDED: "usage_recorded",
267
- INVOICE_CREATED: "invoice_created",
268
- INVOICE_PAID: "invoice_paid",
269
- INVOICE_FAILED: "invoice_failed",
270
- MID_CYCLE_INVOICE: "mid_cycle_invoice",
271
- STATUS_CHANGED: "status_changed",
272
- PAYMENT_METHOD_UPDATED: "payment_method_updated",
273
- ACCOUNT_RESTRICTED: "account_restricted",
274
- ACCOUNT_SUSPENDED: "account_suspended",
275
- ACCOUNT_RECOVERED: "account_recovered",
276
- };
277
- //# sourceMappingURL=plans.js.map
package/dist/plans.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"plans.js","sourceRoot":"","sources":["../src/plans.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,qEAAqE;AAkBrE,MAAM,CAAC,MAAM,KAAK,GAA+B;IAC/C,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,6BAA6B;QAC1C,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,iBAAiB,EAAE,IAAK;QACxB,QAAQ,EAAE;YACR,8BAA8B;YAC9B,kBAAkB;YAClB,mBAAmB;YACnB,oBAAoB;SACrB;QACD,YAAY,EAAE,KAAK;KACpB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,6BAA6B;QAC1C,cAAc,EAAE,EAAE;QAClB,SAAS,EAAE,EAAE,EAAE,QAAQ;QACvB,aAAa,EAAE,IAAI;QACnB,iBAAiB,EAAE,IAAK;QACxB,QAAQ,EAAE;YACR,yBAAyB;YACzB,8BAA8B;YAC9B,6BAA6B;YAC7B,mBAAmB;YACnB,eAAe;SAChB;QACD,YAAY,EAAE,IAAI;KACnB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wBAAwB;QACrC,cAAc,EAAE,GAAG;QACnB,SAAS,EAAE,EAAE,EAAE,QAAQ;QACvB,aAAa,EAAE,IAAI;QACn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QAAQ,EAAE,mCAAmC;QAC7C,MAAM,EAAE,2FAA2F;KACpG;IACD;QACE,EAAE,EAAE,OAAO;QACX,QAAQ,EAAE,kCAAkC;QAC5C,MAAM,EAAE,mGAAmG;KAC5G;IACD;QACE,EAAE,EAAE,OAAO;QACX,QAAQ,EAAE,8CAA8C;QACxD,MAAM,EAAE,oHAAoH;KAC7H;CACF,CAAC;AAEF,8EAA8E;AAC9E,gDAAgD;AAChD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,SAAS;AAEpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC,CAAC,MAAM;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;IAClD,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE,cAAc;IAC5B,oBAAoB,EAAE,sBAAsB;IAC5C,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,cAAc,EAAE,gBAAgB;IAChC,sBAAsB,EAAE,wBAAwB;IAChD,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC"}
package/src/plans.ts DELETED
@@ -1,359 +0,0 @@
1
- // @billing-io/designs — Canonical plan definitions
2
- // All billing.io projects should import plan data from this package.
3
-
4
- export type PlanId = "free" | "starter" | "growth" | "enterprise";
5
-
6
- export type BillingStatus = "active" | "past_due" | "restricted" | "suspended";
7
-
8
- export interface PlanConfig {
9
- id: PlanId;
10
- name: string;
11
- description: string;
12
- monthlyMinimum: number; // USD
13
- volumeBps: number; // basis points (30 = 0.30%)
14
- perPaymentFee: number; // USD per successful payment
15
- includedVolumeUsd: number; // free volume threshold
16
- features: string[];
17
- requiresCard: boolean;
18
- }
19
-
20
- export const PLANS: Record<PlanId, PlanConfig> = {
21
- free: {
22
- id: "free",
23
- name: "Free",
24
- description: "For development and testing",
25
- monthlyMinimum: 0,
26
- volumeBps: 0,
27
- perPaymentFee: 0,
28
- includedVolumeUsd: 2_000,
29
- features: [
30
- "Up to $2,000/month processed",
31
- "Limited API rate",
32
- "No production SLA",
33
- "No webhook retries",
34
- ],
35
- requiresCard: false,
36
- },
37
- starter: {
38
- id: "starter",
39
- name: "Starter",
40
- description: "For production applications",
41
- monthlyMinimum: 49,
42
- volumeBps: 30, // 0.30%
43
- perPaymentFee: 0.02,
44
- includedVolumeUsd: 5_000,
45
- features: [
46
- "0.30% of settled volume",
47
- "$0.02 per successful payment",
48
- "First $5,000/month included",
49
- "Standard webhooks",
50
- "Email support",
51
- ],
52
- requiresCard: true,
53
- },
54
- growth: {
55
- id: "growth",
56
- name: "Growth",
57
- description: "For scaling businesses",
58
- monthlyMinimum: 199,
59
- volumeBps: 20, // 0.20%
60
- perPaymentFee: 0.02,
61
- includedVolumeUsd: 50_000,
62
- features: [
63
- "0.20% of settled volume",
64
- "$0.02 per successful payment",
65
- "First $50,000/month included",
66
- "Webhook retries + logs",
67
- "Team access",
68
- "Priority email support",
69
- ],
70
- requiresCard: true,
71
- },
72
- enterprise: {
73
- id: "enterprise",
74
- name: "Enterprise",
75
- description: "Custom pricing and SLA",
76
- monthlyMinimum: 2_000,
77
- volumeBps: 10, // 0.10-0.15%, configurable
78
- perPaymentFee: 0.02,
79
- includedVolumeUsd: 500_000,
80
- features: [
81
- "0.10-0.15% volume rate",
82
- "Custom minimums",
83
- "SLA guarantee",
84
- "Dedicated infrastructure",
85
- "Custom confirmations",
86
- ],
87
- requiresCard: true,
88
- },
89
- };
90
-
91
- // ---------------------------------------------------------------------------
92
- // Marketing-facing plan display data
93
- // These are the customer-facing descriptions used on the pricing page.
94
- // They reference the canonical PLANS above but add marketing copy.
95
- // ---------------------------------------------------------------------------
96
-
97
- export interface MarketingPlan {
98
- id: PlanId;
99
- name: string;
100
- price: string; // display string, e.g. "$49"
101
- period: string; // e.g. "/month"
102
- badge?: string;
103
- subheadline: string;
104
- features: string[];
105
- ctaLabel: string;
106
- ctaHref: string;
107
- ctaExternal?: boolean;
108
- }
109
-
110
- export const MARKETING_PLANS: MarketingPlan[] = [
111
- {
112
- id: "starter",
113
- name: "Starter",
114
- price: `$${PLANS.starter.monthlyMinimum}`,
115
- period: "/month",
116
- badge: "Most common",
117
- subheadline: `${(PLANS.starter.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.starter.perPaymentFee.toFixed(2)} per payment.`,
118
- features: [
119
- "Branded checkout on your domain",
120
- "Embeddable checkout",
121
- "SDK access",
122
- "Signed webhooks",
123
- "Dashboard and analytics",
124
- "Email support",
125
- ],
126
- ctaLabel: "Go live",
127
- ctaHref: "https://app.billing.io/signup",
128
- },
129
- {
130
- id: "growth",
131
- name: "Growth",
132
- price: `$${PLANS.growth.monthlyMinimum}`,
133
- period: "/month",
134
- subheadline: `${(PLANS.growth.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.growth.perPaymentFee.toFixed(2)} per payment.`,
135
- features: [
136
- "Everything in Starter",
137
- "Webhook retries and logs",
138
- "Team access (up to 5)",
139
- "Priority support",
140
- ],
141
- ctaLabel: "Upgrade to Growth",
142
- ctaHref: "https://app.billing.io/signup",
143
- },
144
- {
145
- id: "enterprise",
146
- name: "Scale",
147
- price: `$${PLANS.enterprise.monthlyMinimum}`,
148
- period: "/month",
149
- subheadline: `${(PLANS.enterprise.volumeBps / 100).toFixed(2)}% of volume + $${PLANS.enterprise.perPaymentFee.toFixed(2)} per payment.`,
150
- features: [
151
- "Everything in Growth",
152
- "Higher throughput and billing caps",
153
- "Unlimited team members",
154
- "Direct support channel",
155
- ],
156
- ctaLabel: "Contact sales",
157
- ctaHref: "https://wa.me/message/ZTXL4WR3SWZQP1",
158
- ctaExternal: true,
159
- },
160
- ];
161
-
162
- export interface MarketingSandboxPlan {
163
- name: string;
164
- price: string;
165
- period: string;
166
- features: string[];
167
- ctaLabel: string;
168
- ctaHref: string;
169
- footnote: string;
170
- }
171
-
172
- export const MARKETING_SANDBOX: MarketingSandboxPlan = {
173
- name: "Sandbox (development only)",
174
- price: "$0",
175
- period: "/month",
176
- features: [
177
- "Testnet access only",
178
- "Full SDK access",
179
- "Simulated webhooks",
180
- "Dashboard preview",
181
- "No card required",
182
- "No time limit",
183
- ],
184
- ctaLabel: "Start in sandbox",
185
- ctaHref: "https://app.billing.io/signup",
186
- footnote: "Production usage requires a paid plan.",
187
- };
188
-
189
- // ---------------------------------------------------------------------------
190
- // Plan comparison table data
191
- // ---------------------------------------------------------------------------
192
-
193
- export type ComparisonValue = boolean | string | Record<string, boolean | string>;
194
-
195
- export interface ComparisonFeature {
196
- name: string;
197
- value: ComparisonValue;
198
- }
199
-
200
- export interface ComparisonSection {
201
- title: string;
202
- features: ComparisonFeature[];
203
- }
204
-
205
- export const COMPARISON_PLANS = ["Sandbox", "Starter", "Growth", "Scale"] as const;
206
-
207
- export const COMPARISON_DATA: ComparisonSection[] = [
208
- {
209
- title: "Payments",
210
- features: [
211
- { name: "Testnet access", value: true },
212
- {
213
- name: "Mainnet payments",
214
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
215
- },
216
- {
217
- name: "Hosted checkout",
218
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
219
- },
220
- {
221
- name: "Embeddable checkout",
222
- value: { Sandbox: false, Starter: true, Growth: true, Scale: true },
223
- },
224
- ],
225
- },
226
- {
227
- title: "Developer tools",
228
- features: [
229
- { name: "SDK access", value: true },
230
- {
231
- name: "Webhooks",
232
- value: { Sandbox: "Simulated", Starter: "Signed", Growth: "Signed", Scale: "Signed" },
233
- },
234
- {
235
- name: "Webhook retries",
236
- value: { Sandbox: false, Starter: false, Growth: true, Scale: true },
237
- },
238
- {
239
- name: "Dashboard",
240
- value: { Sandbox: "Preview", Starter: true, Growth: true, Scale: true },
241
- },
242
- ],
243
- },
244
- {
245
- title: "Team and support",
246
- features: [
247
- {
248
- name: "Team members",
249
- value: { Sandbox: "1", Starter: "1", Growth: "Up to 5", Scale: "Unlimited" },
250
- },
251
- {
252
- name: "Support level",
253
- value: { Sandbox: "Docs only", Starter: "Email", Growth: "Priority", Scale: "Direct channel" },
254
- },
255
- ],
256
- },
257
- {
258
- title: "Billing and limits",
259
- features: [
260
- {
261
- name: "Billing cap",
262
- value: { Sandbox: "N/A", Starter: "$200", Growth: "$500", Scale: "$1,500" },
263
- },
264
- {
265
- name: "Fiat access eligibility",
266
- value: { Sandbox: false, Starter: "After volume", Growth: "After volume", Scale: "After volume" },
267
- },
268
- ],
269
- },
270
- ];
271
-
272
- // ---------------------------------------------------------------------------
273
- // FAQ data
274
- // ---------------------------------------------------------------------------
275
-
276
- export interface FaqEntry {
277
- id: string;
278
- question: string;
279
- answer: string;
280
- }
281
-
282
- export const PRICING_FAQS: FaqEntry[] = [
283
- {
284
- id: "faq-1",
285
- question: "Do I need a credit card to start?",
286
- answer: "Not for sandbox. You can build and test without a card. A payment method is required when you move to production.",
287
- },
288
- {
289
- id: "faq-2",
290
- question: "When do I start paying?",
291
- answer: "You can build and test for free in sandbox. Production usage is billed according to your plan when you process real payments.",
292
- },
293
- {
294
- id: "faq-3",
295
- question: "When do you charge me?",
296
- answer: "Your plan fee is charged at the start of each billing cycle. Usage fees are charged when they hit a cap or at month-end.",
297
- },
298
- {
299
- id: "faq-4",
300
- question: "What happens if my card fails?",
301
- answer: "We notify you and retry. If payment stays unresolved, production features may be paused until it is sorted out.",
302
- },
303
- {
304
- id: "faq-5",
305
- question: "Do you hold my funds?",
306
- answer: "No. Payments settle directly to your wallet. billing.io is non-custodial.",
307
- },
308
- {
309
- id: "faq-6",
310
- question: "Can I upgrade or downgrade plans?",
311
- answer: "Yes. We recommend upgrades automatically when they save you money at your current volume.",
312
- },
313
- {
314
- id: "faq-7",
315
- question: "When can I access fiat payments?",
316
- answer: "Fiat access becomes available after you process meaningful volume. It is not included by default.",
317
- },
318
- {
319
- id: "faq-8",
320
- question: "Is billing.io right for low-volume projects?",
321
- answer: "If you are still building, use the sandbox. Production plans are designed for businesses processing real payments.",
322
- },
323
- ];
324
-
325
- // ---------------------------------------------------------------------------
326
- // Billing system constants (thresholds, events)
327
- // ---------------------------------------------------------------------------
328
-
329
- export const MID_CYCLE_THRESHOLD_USD = 100;
330
-
331
- export const PAST_DUE_RESTRICT_HOURS = 48;
332
- export const RESTRICT_SUSPEND_HOURS = 168; // 7 days
333
-
334
- export const USAGE_WARNING_THRESHOLD = 0.8; // 80%
335
-
336
- export const BILLING_EMAIL_EVENTS = {
337
- CARD_REQUIRED: "card_required",
338
- USAGE_APPROACHING_LIMIT: "usage_approaching_limit",
339
- MID_CYCLE_CHARGE: "mid_cycle_charge",
340
- PAYMENT_FAILED: "payment_failed",
341
- SERVICE_RESTRICTED: "service_restricted",
342
- SERVICE_SUSPENDED: "service_suspended",
343
- PAYMENT_RECOVERED: "payment_recovered",
344
- } as const;
345
-
346
- export const BILLING_EVENT_TYPES = {
347
- PLAN_CHANGED: "plan_changed",
348
- SUBSCRIPTION_CREATED: "subscription_created",
349
- USAGE_RECORDED: "usage_recorded",
350
- INVOICE_CREATED: "invoice_created",
351
- INVOICE_PAID: "invoice_paid",
352
- INVOICE_FAILED: "invoice_failed",
353
- MID_CYCLE_INVOICE: "mid_cycle_invoice",
354
- STATUS_CHANGED: "status_changed",
355
- PAYMENT_METHOD_UPDATED: "payment_method_updated",
356
- ACCOUNT_RESTRICTED: "account_restricted",
357
- ACCOUNT_SUSPENDED: "account_suspended",
358
- ACCOUNT_RECOVERED: "account_recovered",
359
- } as const;