better-auth-flutterwave 0.4.2 → 1.0.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.
@@ -1,4 +1,4 @@
1
- //#region src/metadata.ts
1
+ // src/metadata.ts
2
2
  function isMetadataRecord(value) {
3
3
  return value !== null && typeof value === "object" && !Array.isArray(value);
4
4
  }
@@ -64,10 +64,8 @@ function createRenewalMetadata(input) {
64
64
  referenceId: input.referenceId
65
65
  };
66
66
  }
67
- //#endregion
68
- //#region src/version.ts
69
- const PACKAGE_VERSION = "0.4.2";
70
- //#endregion
67
+ // src/version.ts
68
+ const PACKAGE_VERSION = "1.0.0";
71
69
  export { getMetadataBoolean as a, hasFlutterwaveMetadata as c, createRenewalMetadata as i, parseFlutterwaveMetadata as l, createCheckoutMetadata as n, getMetadataNumber as o, createProrationMetadata as r, getMetadataString as s, PACKAGE_VERSION as t, stringifyFlutterwaveMetadata as u };
72
70
 
73
- //# sourceMappingURL=version-WC4th7kC.mjs.map
71
+ //# sourceMappingURL=version-DfR5E0nB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-WC4th7kC.mjs","names":[],"sources":["../src/metadata.ts","../src/version.ts"],"sourcesContent":["export type FlutterwaveMetadata = Record<string, unknown>;\n\nexport interface CheckoutMetadataInput {\n referenceId: string;\n userId: string;\n plan?: string;\n groupId?: string | null;\n product?: string;\n extra?: FlutterwaveMetadata;\n trial: {\n isTrial: boolean;\n requested: boolean;\n granted: boolean;\n deniedReason?: \"already_used\";\n endsAt?: Date;\n };\n}\n\nexport interface ProrationMetadataInput {\n subscriptionId: string;\n referenceId: string;\n newPlan: string;\n oldPlan: string;\n newSeatCount: number;\n remainingDays: number;\n}\n\nexport interface RenewalMetadataInput {\n subscriptionId: string;\n referenceId: string;\n}\n\nfunction isMetadataRecord(value: unknown): value is FlutterwaveMetadata {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nexport function parseFlutterwaveMetadata(value: unknown): FlutterwaveMetadata {\n if (value === undefined || value === null || value === \"\") return {};\n\n if (typeof value === \"string\") {\n try {\n const parsed: unknown = JSON.parse(value);\n return isMetadataRecord(parsed) ? parsed : {};\n } catch {\n return {};\n }\n }\n\n return isMetadataRecord(value) ? value : {};\n}\n\nexport function stringifyFlutterwaveMetadata(value: unknown): string | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n return JSON.stringify(parseFlutterwaveMetadata(value));\n}\n\nexport function hasFlutterwaveMetadata(value: unknown): boolean {\n return Object.keys(parseFlutterwaveMetadata(value)).length > 0;\n}\n\nexport function getMetadataString(metadata: FlutterwaveMetadata, key: string): string | undefined {\n const value = metadata[key];\n return typeof value === \"string\" && value !== \"\" ? value : undefined;\n}\n\nexport function getMetadataNumber(metadata: FlutterwaveMetadata, key: string): number | undefined {\n const value = metadata[key];\n return typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n}\n\nexport function getMetadataBoolean(metadata: FlutterwaveMetadata, key: string): boolean {\n const value = metadata[key];\n return value === true || value === \"true\";\n}\n\nexport function createCheckoutMetadata(input: CheckoutMetadataInput): FlutterwaveMetadata {\n return {\n referenceId: input.referenceId,\n userId: input.userId,\n plan: input.plan,\n groupId: input.groupId,\n product: input.product,\n ...input.extra,\n isTrial: input.trial.isTrial,\n trialRequested: input.trial.requested,\n trialGranted: input.trial.granted,\n trialDeniedReason: input.trial.deniedReason,\n trialEnd: input.trial.endsAt?.toISOString(),\n };\n}\n\nexport function createProrationMetadata(input: ProrationMetadataInput): FlutterwaveMetadata {\n return {\n type: \"proration\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n newPlan: input.newPlan,\n oldPlan: input.oldPlan,\n newSeatCount: input.newSeatCount,\n remainingDays: input.remainingDays,\n };\n}\n\nexport function createRenewalMetadata(input: RenewalMetadataInput): FlutterwaveMetadata {\n return {\n type: \"renewal\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n };\n}\n","export const PACKAGE_VERSION = \"0.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MAAM;EAC5B,cAAc,MAAM,MAAM;EAC1B,mBAAmB,MAAM,MAAM;EAC/B,UAAU,MAAM,MAAM,QAAQ,YAAY;CAC5C;AACF;AAEA,SAAgB,wBAAwB,OAAoD;CAC1F,OAAO;EACL,MAAM;EACN,gBAAgB,MAAM;EACtB,aAAa,MAAM;EACnB,SAAS,MAAM;EACf,SAAS,MAAM;EACf,cAAc,MAAM;EACpB,eAAe,MAAM;CACvB;AACF;AAEA,SAAgB,sBAAsB,OAAkD;CACtF,OAAO;EACL,MAAM;EACN,gBAAgB,MAAM;EACtB,aAAa,MAAM;CACrB;AACF;;;AC7GA,MAAa,kBAAkB"}
1
+ {"version":3,"file":"version-DfR5E0nB.mjs","names":[],"sources":["../src/metadata.ts","../src/version.ts"],"sourcesContent":["export type FlutterwaveMetadata = Record<string, unknown>;\n\nexport interface CheckoutMetadataInput {\n referenceId: string;\n userId: string;\n plan?: string;\n groupId?: string | null;\n product?: string;\n extra?: FlutterwaveMetadata;\n trial: {\n isTrial: boolean;\n requested: boolean;\n granted: boolean;\n deniedReason?: \"already_used\";\n endsAt?: Date;\n };\n}\n\nexport interface ProrationMetadataInput {\n subscriptionId: string;\n referenceId: string;\n newPlan: string;\n oldPlan: string;\n newSeatCount: number;\n remainingDays: number;\n}\n\nexport interface RenewalMetadataInput {\n subscriptionId: string;\n referenceId: string;\n}\n\nfunction isMetadataRecord(value: unknown): value is FlutterwaveMetadata {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nexport function parseFlutterwaveMetadata(value: unknown): FlutterwaveMetadata {\n if (value === undefined || value === null || value === \"\") return {};\n\n if (typeof value === \"string\") {\n try {\n const parsed: unknown = JSON.parse(value);\n return isMetadataRecord(parsed) ? parsed : {};\n } catch {\n return {};\n }\n }\n\n return isMetadataRecord(value) ? value : {};\n}\n\nexport function stringifyFlutterwaveMetadata(value: unknown): string | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n return JSON.stringify(parseFlutterwaveMetadata(value));\n}\n\nexport function hasFlutterwaveMetadata(value: unknown): boolean {\n return Object.keys(parseFlutterwaveMetadata(value)).length > 0;\n}\n\nexport function getMetadataString(metadata: FlutterwaveMetadata, key: string): string | undefined {\n const value = metadata[key];\n return typeof value === \"string\" && value !== \"\" ? value : undefined;\n}\n\nexport function getMetadataNumber(metadata: FlutterwaveMetadata, key: string): number | undefined {\n const value = metadata[key];\n return typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n}\n\nexport function getMetadataBoolean(metadata: FlutterwaveMetadata, key: string): boolean {\n const value = metadata[key];\n return value === true || value === \"true\";\n}\n\nexport function createCheckoutMetadata(input: CheckoutMetadataInput): FlutterwaveMetadata {\n return {\n referenceId: input.referenceId,\n userId: input.userId,\n plan: input.plan,\n groupId: input.groupId,\n product: input.product,\n ...input.extra,\n isTrial: input.trial.isTrial,\n trialRequested: input.trial.requested,\n trialGranted: input.trial.granted,\n trialDeniedReason: input.trial.deniedReason,\n trialEnd: input.trial.endsAt?.toISOString(),\n };\n}\n\nexport function createProrationMetadata(input: ProrationMetadataInput): FlutterwaveMetadata {\n return {\n type: \"proration\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n newPlan: input.newPlan,\n oldPlan: input.oldPlan,\n newSeatCount: input.newSeatCount,\n remainingDays: input.remainingDays,\n };\n}\n\nexport function createRenewalMetadata(input: RenewalMetadataInput): FlutterwaveMetadata {\n return {\n type: \"renewal\",\n subscriptionId: input.subscriptionId,\n referenceId: input.referenceId,\n };\n}\n","export const PACKAGE_VERSION = \"1.0.0\"; // x-release-please-version\n"],"mappings":";AAgCA,SAAS,iBAAiB,OAA8C;CACtE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAgB,yBAAyB,OAAqC;CAC5E,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,IAAI,OAAO,CAAC;CAEnE,IAAI,OAAO,UAAU,UACnB,IAAI;EACF,MAA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ACF;AAEA,SAAgB,sBAAsB,OAAkD;CACtF,OAAO;EACL,MAAM;EACN,gBAAgB,MAAM;EACtB,aAAa,MAAM;CACrB;AACF;;AC7GA,MAAa,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-auth-flutterwave",
3
- "version": "0.4.2",
3
+ "version": "1.0.0",
4
4
  "description": "Production-ready Flutterwave billing plugin for Better Auth. Supports subscriptions, one-time payments, organization billing, secure webhooks and more",
5
5
  "keywords": [
6
6
  "africa",
@@ -67,25 +67,23 @@
67
67
  "access": "public"
68
68
  },
69
69
  "dependencies": {
70
- "better-call": "^1.4.2",
71
- "zod": "^4.6.5"
70
+ "@better-fetch/fetch": "^1.3.3",
71
+ "zod": "^4.6.7"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@arethetypeswrong/cli": "^0.18.5",
75
- "@better-fetch/fetch": "^1.3.2",
76
- "@tanstack/intent": "^0.5.5",
77
- "@types/node": "^26.6.5",
78
- "@vitest/coverage-v8": "5.0.3",
79
- "better-auth": "^1.7.7",
75
+ "@tanstack/intent": "^0.5.6",
76
+ "@types/node": "^26.6.11",
77
+ "@vitest/coverage-v8": "5.1.1",
78
+ "better-auth": "1.7.28",
80
79
  "publint": "^0.3.25",
81
- "skills-npm": "^4.0.0",
82
- "typescript": "npm:@typescript/typescript6@6.0.2",
83
- "vite": "npm:@voidzero-dev/vite-plus-core@1.1.0",
84
- "vite-plus": "1.1.0",
85
- "vitest": "5.0.3"
80
+ "typescript": "7.0.2",
81
+ "vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
82
+ "vite-plus": "1.8.0",
83
+ "vitest": "5.1.1"
86
84
  },
87
85
  "peerDependencies": {
88
- "better-auth": "^1.7.7"
86
+ "better-auth": ">=1.4.22 <2"
89
87
  },
90
88
  "engines": {
91
89
  "node": ">=22.0.0"
@@ -99,8 +97,8 @@
99
97
  "lint": "vp lint src",
100
98
  "lint:package": "publint run --strict",
101
99
  "lint:types": "node scripts/lint-types-packed.mjs",
102
- "typecheck": "tsc6 -p tsconfig.json --noEmit",
103
- "skills:install": "skills-npm --cwd examples/tanstack --yes --force",
104
- "skills:dry-run": "skills-npm --cwd examples/tanstack --dry-run --yes --agents universal --force"
100
+ "creator:pack": "node scripts/pack-creator.mjs",
101
+ "starter:export": "node scripts/export-starter.mjs",
102
+ "typecheck": "tsc -p tsconfig.json --noEmit"
105
103
  }
106
104
  }
@@ -1,23 +1,22 @@
1
1
  ---
2
2
  name: better-auth-flutterwave-setup
3
- description: Set up better-auth-flutterwave with Better Auth and Flutterwave v3.
3
+ description: Configure the Better Auth Flutterwave server plugin, browser client, credentials, and initial database schema.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6; flutterwave-node-v3 1.4.x"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Better Auth Flutterwave setup
11
11
 
12
- Install `better-auth`, `better-auth-flutterwave`, and `flutterwave-node-v3`.
12
+ 1. Install `better-auth` and `better-auth-flutterwave`. The default provider transport uses built-in fetch.
13
+ 2. Add `flutterwave({ publicKey, secretKey, secretHash })` to the server's Better Auth plugins.
14
+ Read credentials from server configuration and use the dashboard webhook secret hash for `secretHash`.
15
+ 3. Register `flutterwaveClient()` from `better-auth-flutterwave/client` in the application auth client.
16
+ Mount the Better Auth handler under the same base path used by the client.
17
+ 4. Generate and apply the plugin schema using the CLI for the installed Better Auth version and
18
+ the application's database migration workflow. Confirm the auth handler and a signed-in catalog
19
+ request work before starting provider checkout.
13
20
 
14
- Configure `publicKey`, `secretKey`, and the separately managed webhook `secretHash`. The optional
15
- `flutterwaveClient` and `fetch` options support dependency injection. Register `flutterwaveClient`
16
- from the package’s `/client` export in the browser.
17
-
18
- Run `npx @better-auth/cli generate` after enabling the plugin and apply the generated migration
19
- with the application's database workflow. Never add Flutterwave customer fields to a user or
20
- organization: billing ownership is local and Flutterwave billing identity is an email.
21
-
22
- The upstream SDK is untyped CommonJS, performs always-on telemetry, and may use an OS temporary
23
- file. The plugin’s validated adapter uses Promise APIs only.
21
+ Inject `fetch` or `flutterwaveClient` for a custom provider transport. Billing belongs to a local
22
+ user or organization; the server resolves the provider billing email from that authorized reference.
@@ -1,21 +1,26 @@
1
1
  ---
2
2
  name: flutterwave-billing-flows
3
- description: Build verified Flutterwave checkout and subscription flows with Better Auth.
3
+ description: Implement Flutterwave checkout, return verification, and subscription enrollment with Better Auth.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6; flutterwave-node-v3 1.4.x"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave billing flows
11
11
 
12
- Initialize one-time payments with explicit `amount`, `currency`, `email`, and `redirectUrl` through
13
- `authClient.flutterwave.transaction.initialize`. The plugin generates `txRef`. Complete the flow
14
- with `.verify({ transactionId, txRef })`; never fulfill from a redirect alone.
12
+ 1. For a signed-in user, call `authClient.flutterwave.transaction.initialize` with an absolute
13
+ `redirectUrl` and either `plan`, `product`, or explicit `amount` and `currency`. The server
14
+ resolves the payer email and establishes the local `txRef`. Configured catalog pricing takes precedence.
15
+ 2. Redirect to the returned checkout `url`. On return, pass exactly one of numeric `transactionId`
16
+ or `txRef` to `authClient.flutterwave.transaction.verify`.
17
+ 3. Grant value after server verification confirms the successful status, expected `txRef`, amount,
18
+ and currency. A browser redirect supplies identifiers to verify.
15
19
 
16
- Use `authClient.subscription.create`, `upgrade`, `cancel`, `restore`, and `list` for subscription
17
- actions. A native subscription starts with card checkout carrying numeric `paymentPlanId`; there is
18
- no standalone Flutterwave subscription-create operation. Locally managed subscriptions omit
19
- `paymentPlanId`.
20
+ A native subscription starts with card checkout carrying a numeric `paymentPlanId`. Omit
21
+ `paymentPlanId` for local renewals. The v3 checkout rejects plans configured with a no-charge trial.
20
22
 
21
- Reconciliation, renewals, refunds, plan sync, and subaccount administration are server-only.
23
+ Use `createFlutterwaveV4Adapter` for direct v4 charges in trusted server code. Use Flutterwave-encrypted
24
+ card fields for card inputs. Reuse idempotency keys on retries and verify the charge against your
25
+ pending order. The Better Auth checkout and
26
+ subscription routes use v3.
@@ -1,17 +1,21 @@
1
1
  ---
2
2
  name: flutterwave-catalog-limits
3
- description: Configure Flutterwave payment plans and local products, limits, seats, and inventory.
3
+ description: Configure Flutterwave payment plans, local products, subscription seats, and entitlement limits.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6; flutterwave-node-v3 1.4.x"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave catalog and limits
11
11
 
12
- Use numeric `paymentPlanId` for Flutterwave-native recurring plans. Omit it for locally renewed
13
- plans using local products, seats, groups, and limits.
12
+ Choose a server-configured plan or product for fixed-price checkout. A plan's base price includes
13
+ the first seat and each additional seat adds `seatAmount`. A product's price is multiplied by
14
+ `quantity`. The server uses the configured price and currency when a catalog item is supplied.
14
15
 
15
- Products and inventory are local records because Flutterwave does not provide a matching remote
16
- product catalog. Only Flutterwave payment plans and subscriptions may be synchronized. Catalog
17
- sync and renewal operations remain trusted-server APIs.
16
+ A numeric `paymentPlanId` selects provider-managed recurring billing. Plans without it use local
17
+ renewals. Use local product records for products and inventory. `syncFlutterwavePlans` synchronizes
18
+ provider payment plans from an authorized server, while products remain application-owned.
19
+
20
+ Call `checkSeatLimit` or `checkTeamLimit` from the relevant membership or team mutation. Use
21
+ `getOrganizationEntitlements` for read-only entitlement decisions scoped to the organization.
@@ -1,20 +1,22 @@
1
1
  ---
2
2
  name: flutterwave-client-api
3
- description: Use the typed browser client exposed by better-auth-flutterwave.
3
+ description: Wire or review Better Auth Flutterwave browser actions for transactions, subscriptions, and catalog reads.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave client API
11
11
 
12
- The canonical transaction actions are
13
- `authClient.flutterwave.transaction.initialize`, `.verify`, and `.list`.
14
- The canonical subscription actions are `authClient.subscription.create`, `.upgrade`, `.cancel`,
15
- `.restore`, and `.list`.
12
+ Register `flutterwaveClient()` through the package's `/client` export. Use
13
+ `authClient.flutterwave.transaction.initialize`, `.verify`, and `.list` for payments and
14
+ `authClient.subscription.create`, `.upgrade`, `.cancel`, `.restore`, and `.list` for subscriptions.
16
15
 
17
- Use `txRef`, `transactionId`, `flwRef`, `paymentPlanId`, `subscriptionId`, and `subaccountId`.
18
- Do not invent remote customer records, billing portals, or management links that Flutterwave does
19
- not provide. Privileged reconciliation, renewal, refund, and sync operations are not browser
20
- actions.
16
+ Read the configured catalog with `authClient.flutterwave.config()`, `.listPlans()`, or
17
+ `.listProducts()`. Await `{ data, error }` by default or pass `{ throw: true }` to supported
18
+ actions and handle rejected requests. Use one locator when verifying a transaction.
19
+
20
+ Keep local `referenceId`, payment `txRef`, provider `transactionId` and `flwRef`, and recurring
21
+ `paymentPlanId` and `subscriptionId` distinct. Renewal, reconciliation, refunds, and plan sync
22
+ belong in independently authorized server workflows.
@@ -1,27 +1,24 @@
1
1
  ---
2
2
  name: flutterwave-local-subscriptions
3
- description: Implement local subscription lifecycle and tokenized Flutterwave renewal.
3
+ description: Implement Flutterwave local subscription renewals, tokenized payments, and period-end cancellation.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6; flutterwave-node-v3 1.4.x"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave local subscriptions
11
11
 
12
- A plan without `paymentPlanId` is locally renewed. Better Auth stores its group, seats, limits,
13
- period state, and encrypted reusable token. Automated trials, scheduled changes, and proration are
14
- not available in the initial release.
12
+ Omit `paymentPlanId` for a locally renewed subscription. Preserve its billing reference, group,
13
+ seats, paid period, and limits. Use the configured base price for the first seat and `seatAmount`
14
+ for additional seats. Keep reusable payment tokens encrypted and outside client output and logs.
15
15
 
16
- Persist reusable Flutterwave payment tokens encrypted with a key derived from the Better Auth
17
- secret. Never return or log a token. Trusted-server renewal prefers the token; if none exists,
18
- create hosted checkout and leave renewal pending until verification.
16
+ Call `chargeSubscriptionRenewal` from an authorized server. Supply a stable `renewalId` and reuse it
17
+ for every retry of the same billing operation. The plugin prefers an encrypted reusable token and
18
+ falls back to hosted checkout while verification is pending. After a dispatch attempt, reconcile that
19
+ same transaction reference before deciding how to handle a provider rejection or missing result.
19
20
 
20
- The base price includes the first seat; additional seats add `seatAmount`. Renewals use that same
21
- formula. Payment verification records stable UTC billing periods; duplicate payments and old
22
- canceled/superseded subscriptions must not advance periods or replace a newer subscription.
23
-
24
- Cancellation accepts a local subscription ID. Period-end cancellation requires a known paid
25
- `periodEnd` and an independently authorized scheduler calling
26
- `processScheduledFlutterwaveCancellations`. Inspect its failed IDs and retry provider failures;
27
- ended local subscriptions require a new checkout before they can become active again.
21
+ Schedule period-end cancellation only with a known paid `periodEnd`. Run
22
+ `processScheduledFlutterwaveCancellations` from an authorized scheduler, inspect the returned
23
+ `failed` IDs, and retry failures. Process another batch when `hasMore` is true. A cancellation can
24
+ be withdrawn while the local paid period is active. Start a new checkout to replace an ended local subscription.
@@ -1,18 +1,21 @@
1
1
  ---
2
2
  name: flutterwave-organization-billing
3
- description: Configure local organization ownership and marketplace splits for Flutterwave billing.
3
+ description: Configure Flutterwave organization checkout, authorize billing references, and allowlist marketplace splits.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave organization billing
11
11
 
12
- Enable `organization.enabled` and use billing roles or `authorizeReference` to authorize members.
13
- The organization ID is the local billing owner; it is not a Flutterwave customer or subaccount.
14
- Store the immutable billing email on the native subscription.
12
+ Enable the Better Auth organization plugin and set `organization.enabled` for Flutterwave. Pass
13
+ the local organization ID as `referenceId`. Owners and admins can bill by default; use
14
+ `organization.billingRoles` or `subscription.authorizeReference` when your application needs a
15
+ different authorization policy. Keep the billing email used for provider-native enrollment on its
16
+ subscription record.
15
17
 
16
18
  Configure marketplace splits separately with `marketplace.allowedSubaccountIds` and optional
17
- `defaultSplit`. Only existing KYC-approved IDs may be used. Per-checkout overrides must be
18
- authorized and allowlisted. The plugin does not provision subaccounts.
19
+ `defaultSplit`. Use existing KYC-approved Flutterwave subaccounts. Keep organization IDs and
20
+ provider subaccount IDs separate, and apply the same reference authorization to checkout, listing,
21
+ and subscription actions.
@@ -1,25 +1,23 @@
1
1
  ---
2
2
  name: flutterwave-schema-migrations
3
- description: Review or migrate the namespaced Better Auth Flutterwave persistence schema.
3
+ description: Generate, review, or migrate the namespaced Better Auth Flutterwave database schema.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave schema migrations
11
11
 
12
- Provider records are `flutterwaveTransaction`, `flutterwaveSubscription`, `flutterwaveProduct`,
13
- `flutterwavePlan`, `flutterwaveWebhookEvent`, and `flutterwaveRefund`. Keep provider IDs, expected
14
- and charged amounts, currency, lifecycle state, periods, local ownership, and reconciliation
15
- timestamps distinct.
12
+ Generate the schema using the CLI for your installed Better Auth version and apply it using the
13
+ application database's migration workflow. Review changes to `flutterwaveTransaction`,
14
+ `flutterwaveSubscription`, `flutterwaveProduct`, `flutterwavePlan`, `flutterwaveWebhookEvent`,
15
+ and `flutterwaveRefund`. Keep local ownership, provider IDs, expected and charged amounts, dates,
16
+ and reusable credentials distinct.
16
17
 
17
- Do not add Flutterwave customer fields to `user` or `organization`. Store the immutable native
18
- subscription email on its record. Reusable payment tokens must be encrypted and never selected into
19
- client-visible output. Verify coexistence with other billing-provider schemas after migrations.
18
+ Check the deployed database has a unique `flutterwaveWebhookEvent.eventId` constraint before
19
+ relying on concurrent webhook claims. Reusable payment tokens stay encrypted and out of
20
+ client-visible projections. Provider billing email belongs on the subscription record.
20
21
 
21
- Webhook `eventId` must have a database uniqueness constraint for concurrent event claims. This
22
- constraint is already present in the 0.2.1 plugin schema; inspect the actual deployed database
23
- before assuming a legacy migration created it. The TanStack example ships a generated initial
24
- D1 migration and a schema drift check. Use incremental reviewed migrations after deployment;
25
- never reapply its initial migration to an existing database.
22
+ The TanStack example ships an initial D1 migration and `db:billing:check`. Use that migration on a
23
+ fresh D1 database. Apply reviewed incremental migrations to an existing database.
@@ -1,26 +1,22 @@
1
1
  ---
2
2
  name: flutterwave-tanstack-start
3
- description: Integrate Better Auth Flutterwave into a TanStack Start application.
3
+ description: Integrate Better Auth Flutterwave into TanStack Start and configure D1-backed scheduled billing.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; TanStack Start; better-auth ^1.6"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave with TanStack Start
11
11
 
12
- Create the server plugin with `publicKey`, `secretKey`, and `secretHash`; keep all three in
13
- server-only environment bindings. Register `flutterwaveClient` in the browser auth client.
12
+ 1. Attach Better Auth to a server route and keep payment credentials in server-only bindings.
13
+ Register `flutterwaveClient()` in the browser and wait for hydration before enabling interactive auth controls.
14
+ 2. Start checkout from an authenticated session and pass an absolute `redirectUrl`. On return,
15
+ validate the numeric `transaction_id` or read `tx_ref`, then verify with exactly one locator.
16
+ Show payment success after the server confirms verification.
17
+ 3. Keep privileged billing operations inside independently authorized server functions or jobs.
14
18
 
15
- Initialize checkout with amount, currency, email, and an absolute `redirectUrl`. On the callback
16
- route, read `transaction_id`, `tx_ref`, and `status`, then call the typed verification action.
17
- Render success only after server verification.
18
-
19
- Keep reconciliation, renewal, refund, plan sync, and subaccount administration in server functions
20
- that independently authorize the current user.
21
-
22
- Use a custom Worker server entry for scheduled events. The persistent example uses the same D1
23
- binding for requests and `processScheduledFlutterwaveCancellations`; run it with `build:billing`
24
- or `dev:billing` after applying the reviewed migration. Its default memory demo cannot reliably
25
- process schedules across isolates and has no Cron Trigger. Do not expose the processor as an
26
- unauthenticated HTTP or browser action.
19
+ To run this package's example from its repository root, run `vp install`, `vp pack`, and
20
+ `vp -C examples/tanstack run dev`. For persistent billing, use its D1 binding and Worker scheduled
21
+ handler. Apply the reviewed migration before starting `dev:billing`. Use the same configured
22
+ database for HTTP and scheduled work. The default memory demo is for interactive checkout tests.
@@ -1,20 +1,24 @@
1
1
  ---
2
2
  name: flutterwave-testing-fixtures
3
- description: Create accurate Flutterwave adapter, checkout, webhook, subscription, and reconciliation tests.
3
+ description: Verify Better Auth Flutterwave checkout, webhook, subscription lifecycle, and reconciliation using accurate fixtures.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; Vitest; flutterwave-node-v3 1.4.x"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave testing fixtures
11
11
 
12
- Inject the SDK-shaped client and `fetch`; do not call the network in unit tests. Validate every
13
- untyped SDK response through the same Zod schemas used in production.
12
+ Use injected `fetch` or a typed `flutterwaveClient` fixture for deterministic unit tests. Match
13
+ the production response shape and exercise the real validation code. Verify the expected `txRef`,
14
+ amount, currency, and status before fulfillment. Include retries, malformed payloads, duplicate and
15
+ out-of-order events, concurrent updates, encrypted token renewal, and hosted checkout fallback as
16
+ they relate to the change.
14
17
 
15
- Cover exact `txRef`, amount, currency, and status verification; malformed responses; duplicate and
16
- out-of-order deliveries; numeric plan/subscription IDs; token encryption; hosted-checkout renewal
17
- fallback; asynchronous refunds; and provider coexistence.
18
+ Sign test webhook payloads over their exact bytes using HMAC-SHA256 and the test `secretHash`.
19
+ Compare the valid case with an invalid signature or altered body. Use the real migrated D1 test
20
+ fixture for scheduled cancellations and uniqueness when testing the persistent demo.
18
21
 
19
- Webhook fixtures use HMAC-SHA256 over the exact raw bytes with `flutterwave-signature` and
20
- `secretHash`. Include tampered-body and invalid-signature cases.
22
+ From the package repository run `vp test` for the local suite. Set `RUN_INTEGRATION_TESTS=true` for
23
+ the optional provider suite and use sandbox credentials. Treat skipped integration cases and
24
+ simulated provider checkout as distinct from live provider evidence.
@@ -1,22 +1,23 @@
1
1
  ---
2
2
  name: flutterwave-webhooks-events
3
- description: Implement secure and idempotent Flutterwave webhook handling.
3
+ description: Configure Flutterwave webhook signatures, event deduplication, retry behavior, and server verification.
4
4
  metadata:
5
5
  library: "better-auth-flutterwave"
6
- version: "0.4.2" # x-release-please-version
7
- compatibility: "Node.js >=22; better-auth ^1.6"
6
+ library_version: "1.0.0" # x-release-please-version
7
+ compatibility: "Node.js >=22 and Better Auth >=1.4.22 <2"
8
8
  ---
9
9
 
10
10
  # Flutterwave webhooks and events
11
11
 
12
- Read the exact raw body. Compute HMAC-SHA256 with the separately configured `secretHash`, compare
13
- it to `flutterwave-signature` in constant time, persist idempotency, and acknowledge quickly.
12
+ Mount `/flutterwave/webhook` under the Better Auth base path. Preserve raw request bytes.
13
+ `flutterwave-signature` is a base64 HMAC-SHA256 digest using the separate webhook `secretHash`.
14
+ Legacy v3 deliveries use `verif-hash`. The handler verifies headers in constant time and deduplicates
15
+ authenticated deliveries with a unique event record.
14
16
 
15
- Re-verify transactions before granting value. Expect duplicate, delayed, and out-of-order events.
16
- Use polling/reconciliation for pending transactions, subscriptions, and refunds. Never substitute
17
- the API secret key for `secretHash` or reserialize JSON before signature verification.
17
+ Grant value only after server verification matches the expected reference, amount, currency, and
18
+ successful status. For v4 events, retrieve the charge and match it to the pending order.
19
+ Reconcile pending v3 transactions or refunds through the trusted server exports.
18
20
 
19
- The handler records completion only after reconciliation and `onEvent` succeed. Failures and busy
20
- claims return HTTP 503 so delivery can be retried; abandoned claims can be reclaimed after five
21
- minutes. Application callbacks must be idempotent because delivery is at least once, including a
22
- crash after external work succeeds but before its completion is persisted.
21
+ Callbacks must be idempotent and complete promptly. A busy claim or failed processing returns
22
+ HTTP 503. Abandoned claims can be retried after five minutes. External work can run again if a
23
+ process stops before recording its successful checkpoint.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-YHYXcci3.d.mts","names":["_$__types_ts0.FlutterwaveTransaction","_$__types_ts0.Subscription","_$__types_ts0.FlutterwavePlan","_$__types_ts0.FlutterwaveRefund"],"sources":["../src/schema.ts","../src/flutterwave-contracts.ts","../src/flutterwave-sdk.ts","../src/types.d.ts","../src/routes.ts","../src/version.ts","../src/metadata.ts","../src/flutterwave-v4.ts","../src/token-crypto.ts","../src/limits.ts","../src/billing-store.ts","../src/operations.ts","../src/reconciliation.ts","../src/index.ts"],"mappings":";;;;;KAIK,kBAAkB,0BAA0B,4BAA4B,OAC3E;EAEE,QAAQ,OAAO,WAAW;EAC1B;EACA;;KAIC,qBAAqB;KAuBrB,sBAAsB;KA4BtB,iBAAiB;KAcjB,cAAc;KAed,sBAAsB;KAatB,gBAAgB;KAgBT,0BAA0B,qBACpC,sBACA,iBACA,cACA,sBAC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BACA,kBACC,QAAQ;;cAGA,gCAAgC;WAClC;WACA;WACA;EAEG,YAAA,mBAAmB,iBAAiB;IAAY;IAAiB;;;;;;;;;;iBAsI/D,yBAAyB,SAAS,4BAA4B;;;KCvNlE;KACA;UACK;EACb;EACA;EACA;;UAEa;EACb;EACA;EACA;EACA;;UAEa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;EACb,eAAe;EACf,WAAW;EACX,WAAW;;UAEE;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ,YAAY;;UAEC;EACb;EACA;EACA;EACA;;UAEa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACI;IACA,gBAAgB,cAAc,iBAAiB;IAC/C,cAAc,cAAc,iBAAiB;IAC7C,kBAAkB,cAAc,iBAAiB;;EAErD,SAAS;EACT;EACA;EACA,YAAY;EACZ,YAAY;;UAEC;EACb;EACA,MAAM;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACI;;IAEJ;MACI;MACA;;;;UAIK;EACb;EACA;EACA;EACA;EACA,MAAM;IACF;IACA;IACA;IACA;IACA;IACA;MACI;MACA;;;;KAIA,4BAA4B;UACvB;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA,OAAO;;UAEM;EACb;EACA;EACA;EACA;;UAEa;EACb;EACA,OAAO,2BAA2B,QAAQ;EAC1C;EACA;EACA;EACA,yBAAyB;EACzB,sBAAsB;IAClB,MAAM;IACN,SAAS;IACT;IACA;KACD,KAAK,2BAA2B;EACnC,0BAA0B;IACtB,OAAO;IACP,cAAc;IACd,MAAM;KACP,KAAK,2BAA2B;EACnC,yBAAyB;IACrB,OAAO;IACP,cAAc;IACd,MAAM;KACP,KAAK,2BAA2B;EACnC,wBAAwB;IACpB,OAAO;IACP,cAAc;IACd,MAAM;KAC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