@genesis-tech/genesispay-seller 0.13.1 → 1.3.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 (99) hide show
  1. package/CHANGELOG.md +206 -0
  2. package/README.md +670 -91
  3. package/dist/checkout-documents.d.ts +99 -0
  4. package/dist/checkout-documents.d.ts.map +1 -0
  5. package/dist/checkout-documents.js +155 -0
  6. package/dist/checkout-documents.js.map +1 -0
  7. package/dist/checkout-return.d.ts +41 -0
  8. package/dist/checkout-return.d.ts.map +1 -0
  9. package/dist/checkout-return.js +68 -0
  10. package/dist/checkout-return.js.map +1 -0
  11. package/dist/client.d.ts +318 -0
  12. package/dist/client.d.ts.map +1 -0
  13. package/dist/client.js +718 -0
  14. package/dist/client.js.map +1 -0
  15. package/dist/contract-mandates.d.ts +39 -0
  16. package/dist/contract-mandates.d.ts.map +1 -0
  17. package/dist/contract-mandates.js +98 -0
  18. package/dist/contract-mandates.js.map +1 -0
  19. package/dist/contract-usage.d.ts +29 -0
  20. package/dist/contract-usage.d.ts.map +1 -0
  21. package/dist/contract-usage.js +92 -0
  22. package/dist/contract-usage.js.map +1 -0
  23. package/dist/customers.d.ts +41 -0
  24. package/dist/customers.d.ts.map +1 -0
  25. package/dist/customers.js +76 -0
  26. package/dist/customers.js.map +1 -0
  27. package/dist/entitlements.d.ts +19 -0
  28. package/dist/entitlements.d.ts.map +1 -0
  29. package/dist/entitlements.js +30 -0
  30. package/dist/entitlements.js.map +1 -0
  31. package/dist/errors.d.ts +129 -0
  32. package/dist/errors.d.ts.map +1 -0
  33. package/dist/errors.js +273 -0
  34. package/dist/errors.js.map +1 -0
  35. package/dist/fulfillment-attempts.d.ts +29 -0
  36. package/dist/fulfillment-attempts.d.ts.map +1 -0
  37. package/dist/fulfillment-attempts.js +71 -0
  38. package/dist/fulfillment-attempts.js.map +1 -0
  39. package/dist/fulfillment.d.ts +152 -0
  40. package/dist/fulfillment.d.ts.map +1 -0
  41. package/dist/fulfillment.js +810 -0
  42. package/dist/fulfillment.js.map +1 -0
  43. package/dist/genesispay-settlement.d.ts +32 -0
  44. package/dist/genesispay-settlement.d.ts.map +1 -0
  45. package/dist/genesispay-settlement.js +500 -0
  46. package/dist/genesispay-settlement.js.map +1 -0
  47. package/dist/index.d.ts +22 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +21 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/invoices.d.ts +111 -0
  52. package/dist/invoices.d.ts.map +1 -0
  53. package/dist/invoices.js +192 -0
  54. package/dist/invoices.js.map +1 -0
  55. package/dist/item-tax.d.ts +15 -0
  56. package/dist/item-tax.d.ts.map +1 -0
  57. package/dist/item-tax.js +19 -0
  58. package/dist/item-tax.js.map +1 -0
  59. package/dist/mandate-gate.d.ts +54 -0
  60. package/dist/mandate-gate.d.ts.map +1 -0
  61. package/dist/mandate-gate.js +183 -0
  62. package/dist/mandate-gate.js.map +1 -0
  63. package/dist/mandates.d.ts +189 -0
  64. package/dist/mandates.d.ts.map +1 -0
  65. package/dist/mandates.js +234 -0
  66. package/dist/mandates.js.map +1 -0
  67. package/dist/networks.d.ts +10 -0
  68. package/dist/networks.d.ts.map +1 -0
  69. package/dist/networks.js +23 -0
  70. package/dist/networks.js.map +1 -0
  71. package/dist/payment-gate.d.ts +98 -0
  72. package/dist/payment-gate.d.ts.map +1 -0
  73. package/dist/payment-gate.js +370 -0
  74. package/dist/payment-gate.js.map +1 -0
  75. package/dist/plans.d.ts +68 -0
  76. package/dist/plans.d.ts.map +1 -0
  77. package/dist/plans.js +127 -0
  78. package/dist/plans.js.map +1 -0
  79. package/dist/products.d.ts +170 -0
  80. package/dist/products.d.ts.map +1 -0
  81. package/dist/products.js +1317 -0
  82. package/dist/products.js.map +1 -0
  83. package/dist/resource.d.ts +47 -0
  84. package/dist/resource.d.ts.map +1 -0
  85. package/dist/resource.js +71 -0
  86. package/dist/resource.js.map +1 -0
  87. package/dist/strict-response.d.ts +21 -0
  88. package/dist/strict-response.d.ts.map +1 -0
  89. package/dist/strict-response.js +68 -0
  90. package/dist/strict-response.js.map +1 -0
  91. package/dist/usdc-amount.d.ts +7 -0
  92. package/dist/usdc-amount.d.ts.map +1 -0
  93. package/dist/usdc-amount.js +21 -0
  94. package/dist/usdc-amount.js.map +1 -0
  95. package/dist/webhooks.d.ts +352 -0
  96. package/dist/webhooks.d.ts.map +1 -0
  97. package/dist/webhooks.js +244 -0
  98. package/dist/webhooks.js.map +1 -0
  99. package/package.json +4 -3
@@ -0,0 +1,318 @@
1
+ import type { MandatesResource } from "./mandates.js";
2
+ import type { CustomersResource } from "./customers.js";
3
+ import type { InvoicesResource } from "./invoices.js";
4
+ import { type ItemTax, type ItemTaxUpdate } from "./item-tax.js";
5
+ import type { CheckoutDocumentsResource } from "./checkout-documents.js";
6
+ import type { VerifySettlement } from "./payment-gate.js";
7
+ import type { PlansResource } from "./plans.js";
8
+ import type { ProductsResource } from "./products.js";
9
+ import type { EntitlementsResource } from "./entitlements.js";
10
+ import type { PaymentGateNetwork } from "./networks.js";
11
+ import type { ConstructEventOptions, GenesisPayEvent } from "./webhooks.js";
12
+ import { type FulfillmentResource } from "./fulfillment.js";
13
+ /**
14
+ * The `GenesisPay` client — a Stripe-like entry point that owns the seller key and
15
+ * resolves everything else (payout wallet, network, base URL) from it. The key
16
+ * prefix decides the mode: `gp_sk_test_…` / legacy `gp_sk_…` → test,
17
+ * `gp_sk_live_…` → live. See docs/archive/SELLER_SDK_DX_SPEC.md.
18
+ */
19
+ export type GenesisPayKeyMode = "test" | "live";
20
+ export type GenesisPayClientOptions = {
21
+ /** gp_sk_test_… | gp_sk_live_… | legacy gp_sk_… — the only required field. */
22
+ apiKey: string;
23
+ /** Overrides the mode→URL default (self-host / staging). Must be https (http only for localhost). */
24
+ baseUrl?: string;
25
+ /** Injectable fetch for tests. Defaults to the global fetch. */
26
+ fetchFn?: typeof fetch;
27
+ /** Seller-config cache TTL. Default 5 min. */
28
+ configTtlMs?: number;
29
+ /**
30
+ * Optional local payout pin, including checkout retrieval and strict fulfillment
31
+ * verification. Historical reconciliation must use the original destination's pin.
32
+ */
33
+ expectedPayTo?: string;
34
+ };
35
+ export type SellerConfig = {
36
+ id: string;
37
+ mode: GenesisPayKeyMode;
38
+ payTo: string | null;
39
+ hasPayTo: boolean;
40
+ network: {
41
+ networkName: PaymentGateNetwork;
42
+ chainId: number;
43
+ usdcAddress: string;
44
+ asset: "USDC";
45
+ };
46
+ };
47
+ /**
48
+ * The amount half of {@link CheckoutCreateInput}, as a union so that **one of
49
+ * the two names is always required at compile time** — `amountUsdc` was a
50
+ * required property before 0.6.0, and losing that to two optional fields would
51
+ * have turned a type error into a runtime one.
52
+ */
53
+ export type CheckoutAmountInput = {
54
+ /**
55
+ * Decimal amount **in `asset`** — `"5.00"`, at most 6 decimals, always a
56
+ * string (a float would lose minor units). Hosted checkout links settle
57
+ * in USDC during the beta, so the amount is in dollars.
58
+ *
59
+ * Passing the deprecated `amountUsdc` alongside it is allowed only when
60
+ * both are the same amount; two different values throw
61
+ * `GenesisPayValidationError` before the request.
62
+ */
63
+ amount: string;
64
+ /** @deprecated Use `amount` alone. */
65
+ amountUsdc?: string;
66
+ } | {
67
+ amount?: string;
68
+ /**
69
+ * @deprecated Renamed to `amount` in 0.6.0. The name claimed a currency
70
+ * the value did not always have. Still accepted, and still sent on the wire for backends older than
71
+ * 0.6.0 — but new code should set `amount`.
72
+ */
73
+ amountUsdc: string;
74
+ };
75
+ export type CheckoutCreateInput = CheckoutAmountInput & {
76
+ /** Omitted means unconfigured; human checkout requires explicit item tax. */
77
+ taxConfig?: ItemTax;
78
+ title: string;
79
+ description?: string;
80
+ /** Payment requests are single-use. Use products for repeat purchases. */
81
+ linkType?: "single";
82
+ destinationWallet?: string;
83
+ /**
84
+ * Hosted checkout links settle in USDC during the beta. Omit this field in
85
+ * new integrations; it is kept only to make the invariant explicit in the
86
+ * request type.
87
+ */
88
+ asset?: "USDC";
89
+ /** Free-form correlation data; echoed back in webhooks and `checkout.retrieve()`. */
90
+ metadata?: Record<string, string>;
91
+ /** The merchant's own reference (Stripe: client_reference_id). */
92
+ clientReferenceId?: string;
93
+ /** Where the payer returns after a successful payment (https). */
94
+ returnUrl?: string;
95
+ /** Where the payer returns when they cancel (https). */
96
+ cancelUrl?: string;
97
+ };
98
+ export type IdempotentCreationOptions = {
99
+ /** Seller-account-scoped retry identity; 1–255 characters without surrounding whitespace. */
100
+ idempotencyKey: string;
101
+ };
102
+ export type CheckoutLink = {
103
+ taxConfig: ItemTax | null;
104
+ publicId: string;
105
+ payUrl: string;
106
+ /** Decimal amount in `asset`, as the server normalized it (e.g. `"5.00"`). */
107
+ amount: string;
108
+ /** @deprecated Same value as {@link CheckoutLink.amount}; see the input field. */
109
+ amountUsdc: string;
110
+ /**
111
+ * The currency `amount` is denominated in. Echoed back on create so a EURC
112
+ * link can be confirmed as one without a second round-trip.
113
+ */
114
+ asset: "USDC" | "EURC";
115
+ title: string;
116
+ metadata: Record<string, string> | null;
117
+ clientReferenceId: string | null;
118
+ returnUrl: string | null;
119
+ cancelUrl: string | null;
120
+ };
121
+ /** Lifecycle of a single payment attempt on a link, as the server reports it. */
122
+ export type CheckoutAttemptStatus = "pending" | "submitted" | "confirmed" | "failed" | "expired";
123
+ /**
124
+ * One payment attempt against a checkout link — the receipt data (`txHash`,
125
+ * `payerWallet`) that `paid === true` alone cannot give you.
126
+ *
127
+ * A `reusable` link accumulates attempts; the newest comes first. `txHash` is
128
+ * null while an attempt is still pending, and stays null for attempts created
129
+ * by the test-mode `simulate-payment` endpoint (no transaction exists).
130
+ */
131
+ export type CheckoutAttempt = {
132
+ id: string;
133
+ status: CheckoutAttemptStatus;
134
+ txHash: string | null;
135
+ payerWallet: string | null;
136
+ createdAt: string;
137
+ confirmedAt: string | null;
138
+ failureReason: string | null;
139
+ /**
140
+ * True when no funds moved — an attempt created by
141
+ * `checkout.simulatePayment`. Note that such an attempt also has
142
+ * `txHash: null` — but so does a pending real one, which is why this flag
143
+ * exists rather than inferring it.
144
+ *
145
+ * `false` for a real settlement, including on testnet and in provider
146
+ * sandboxes: this is the fabricated-payment axis, not the environment axis.
147
+ *
148
+ * Defaults to `false` only on this legacy display/polling view when an older
149
+ * backend omits it. This value is never fulfillment evidence; use
150
+ * `fulfillment.verify()` for versioned real-payment authority.
151
+ */
152
+ simulated: boolean;
153
+ };
154
+ export type CheckoutSession = CheckoutLink & {
155
+ description: string | null;
156
+ linkType: "single" | "reusable";
157
+ status: "active" | "paid" | "archived";
158
+ destinationWallet: string;
159
+ chainId: number;
160
+ /**
161
+ * true as soon as at least one payment is confirmed — the value to poll on.
162
+ *
163
+ * For a `reusable` link this answers "has this link ever been paid", not "has
164
+ * this buyer paid": `confirmedPaymentCount` only grows, so `paid` stays true
165
+ * from the first payment onward. Per-buyer fulfilment on a reusable link needs
166
+ * a webhook, or `confirmedPaymentCount` tracked as a delta.
167
+ */
168
+ paid: boolean;
169
+ confirmedPaymentCount: number;
170
+ createdAt: string;
171
+ /**
172
+ * Payment attempts for this link, newest first — empty when the server does
173
+ * not report them (older backend) or when nobody has tried to pay yet.
174
+ */
175
+ attempts: CheckoutAttempt[];
176
+ };
177
+ export type SimulatePaymentOptions = {
178
+ /**
179
+ * Payer address recorded on the simulated attempt. Defaults to a deliberately
180
+ * synthetic server-side placeholder, so nobody mistakes a simulated payment
181
+ * for a real payer in a dashboard or an export.
182
+ */
183
+ payerWallet?: string;
184
+ };
185
+ export type GateConfig = {
186
+ amountUsdc: string;
187
+ description?: string;
188
+ resource?: string;
189
+ mimeType?: string;
190
+ maxTimeoutSeconds?: number;
191
+ };
192
+ type GateHandler<Args extends unknown[]> = (request: Request, ...args: Args) => Response | Promise<Response>;
193
+ export interface ResolvingGate {
194
+ wrap<Args extends unknown[]>(handler: GateHandler<Args>, opts?: {
195
+ verifySettlement?: VerifySettlement;
196
+ }): (request: Request, ...args: Args) => Promise<Response>;
197
+ /** Warm the seller-config cache (and surface auth/wallet errors) before traffic. */
198
+ prime(): Promise<void>;
199
+ }
200
+ export { GenesisPayConfigError, GenesisPayNetworkSafetyError, GenesisPayNotFoundError, GenesisPayRateLimitError, GenesisPayValidationError, type GenesisPayValidationIssue, } from "./errors.js";
201
+ export declare class GenesisPay {
202
+ readonly mode: GenesisPayKeyMode;
203
+ readonly baseUrl: string;
204
+ readonly checkout: {
205
+ create(input: CheckoutCreateInput, options: IdempotentCreationOptions): Promise<CheckoutLink>;
206
+ updateTax(publicId: string, input: ItemTaxUpdate): Promise<CheckoutLink>;
207
+ retrieve(publicId: string): Promise<CheckoutSession>;
208
+ /**
209
+ * Test mode only: records a confirmed payment on one of your links without
210
+ * any money moving, and fires the real `payment.confirmed` (plus
211
+ * `link.paid` for a single-use link) webhooks — the point being that you can
212
+ * exercise your webhook handler end to end.
213
+ *
214
+ * The resulting attempt carries `simulated: true` and `txHash: null`; there
215
+ * is no transaction, and a made-up hash would be a lie in a field other
216
+ * systems point a block explorer at.
217
+ */
218
+ simulatePayment(publicId: string, opts?: SimulatePaymentOptions): Promise<CheckoutSession>;
219
+ };
220
+ /** Subscription plans and their hosted `checkoutUrl` — see ./plans.ts. */
221
+ readonly plans: PlansResource;
222
+ /** The merchant's catalogue and its canonical payment links — see ./products.ts. */
223
+ readonly products: ProductsResource;
224
+ /** Seller-scoped redirect-entitlement verification. */
225
+ readonly entitlements: EntitlementsResource;
226
+ /** Reusable billing contacts for one-off invoices. */
227
+ readonly customers: CustomersResource;
228
+ /** Draft, finalize, deliver, and collect one-off invoices. */
229
+ readonly invoices: InvoicesResource;
230
+ /** Immutable documents generated after hosted human checkout completes. */
231
+ readonly checkoutDocuments: CheckoutDocumentsResource;
232
+ /** Strict seller-scoped payment authority. Tolerant checkout views are display-only. */
233
+ readonly fulfillment: FulfillmentResource;
234
+ /**
235
+ * Payment mandates: bounded, revocable spending approvals a payer signs once.
236
+ *
237
+ * There is no `mandates.activate` on purpose — activation carries the
238
+ * *payer's* signature, is authorized by their wallet rather than by this API
239
+ * key, and therefore belongs in the payer-facing frontend. See the module
240
+ * comment in ./mandates.ts.
241
+ */
242
+ readonly mandates: MandatesResource;
243
+ /**
244
+ * Webhook signature verification. Also exported as the free function
245
+ * `constructEvent` — a webhook route rarely has a client instance in scope,
246
+ * and verification needs the endpoint secret rather than the API key.
247
+ */
248
+ readonly webhooks: {
249
+ constructEvent(rawBody: string | Uint8Array, signatureHeader: string, secret: string, opts?: ConstructEventOptions): Promise<GenesisPayEvent>;
250
+ };
251
+ private readonly apiKey;
252
+ private readonly fetchFn;
253
+ private readonly configTtlMs;
254
+ private readonly expectedPayTo?;
255
+ private cache?;
256
+ private inflight?;
257
+ /**
258
+ * The single authenticated-JSON seam every resource goes through. Bound as a
259
+ * field so it can be handed to `./plans.ts` / `./mandates.ts` without leaking
260
+ * the key, the base URL or `fetch` into them.
261
+ */
262
+ private readonly request;
263
+ constructor(options: GenesisPayClientOptions);
264
+ /** Raw on purpose: product-gate negotiation must preserve 402 protocol headers. */
265
+ private performProductGateRequest;
266
+ private performStrictSellerRequest;
267
+ /**
268
+ * Resolve (and cache) the seller config from the key. Single-flight so a
269
+ * cold-start burst shares one request; failures are never cached (the memo is
270
+ * cleared on rejection so the next call retries).
271
+ */
272
+ retrieveSeller(opts?: {
273
+ forceRefresh?: boolean;
274
+ }): Promise<SellerConfig>;
275
+ gate(config: GateConfig): ResolvingGate;
276
+ private fetchSeller;
277
+ private assertSafe;
278
+ /**
279
+ * Applies the `expectedPayTo` pin to a frozen or explicitly expected destination
280
+ * on creation and authenticated retrieval alike (MR-102/MR-202).
281
+ *
282
+ * Checking it in `assertSafe` alone was not enough: that only covers the
283
+ * `/api/v1/seller` config lookup, while a checkout link and a subscription
284
+ * plan each record their own `destinationWallet` at creation. Those are the
285
+ * addresses money actually moves to — a pin that does not cover them is not
286
+ * the guarantee the option advertises.
287
+ */
288
+ private assertPinnedDestination;
289
+ /**
290
+ * One authenticated JSON round-trip, with the error mapping every method
291
+ * shares. A transport failure (no response at all) is the only case handled
292
+ * here rather than in `throwForErrorResponse`, because there is no status to
293
+ * map — it is always a config/connectivity problem.
294
+ */
295
+ private performRequest;
296
+ /**
297
+ * Creates a payable checkout link — and refuses to hand one back unless the
298
+ * backend that created it answered in this SDK's API version.
299
+ *
300
+ * The version header alone is a request, not a negotiation: a backend that
301
+ * predates the strict surface (or one that was rolled back) ignores it, mints
302
+ * a legacy link, and returns a perfectly ordinary 201. That link is payable
303
+ * and its attempt carries no authority provenance, so strict fulfillment can
304
+ * never verify it — the payer's money would be stranded in an unfulfillable
305
+ * purchase. So the raw response is read here rather than through the tolerant
306
+ * shared seam, and the version + request ID are checked before the link
307
+ * becomes a payUrl anyone can hand to a payer.
308
+ */
309
+ private createCheckout;
310
+ /**
311
+ * Fetch the current state of a checkout link. `paid` is the field to poll on;
312
+ * an unknown publicId raises `GenesisPayNotFoundError`, never a config error.
313
+ */
314
+ private retrieveCheckout;
315
+ /** Test-mode only — see the doc on `checkout.simulatePayment`. */
316
+ private simulateCheckoutPayment;
317
+ }
318
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,O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