@klappay/types 2.0.0 → 2.0.2

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/README.md CHANGED
@@ -57,7 +57,11 @@ API itself (open the API's base URL in a browser once you have access).
57
57
  Full docs (with search and navigation) are published at
58
58
  [api.klappay.com/types](https://api.klappay.com/types) — generated from
59
59
  this same package's `docs/` source, so they never drift from what's
60
- actually exported.
60
+ actually exported. The site also publishes
61
+ [`llms.txt`](https://api.klappay.com/types/llms.txt) and
62
+ [`llms-full.txt`](https://api.klappay.com/types/llms-full.txt) — plain-
63
+ text, LLM-friendly versions of these docs, regenerated on every deploy,
64
+ for feeding an agent or MCP server.
61
65
 
62
66
  | Doc | Covers |
63
67
  |---|---|
package/dist/index.d.mts CHANGED
@@ -97,6 +97,21 @@ declare const AcceptedPaymentSchema: z.ZodObject<{
97
97
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
98
98
  }>;
99
99
  type AcceptedPayment = z.infer<typeof AcceptedPaymentSchema>;
100
+ declare const CHARGE_SPLIT_RECIPIENTS_MAX = 5;
101
+ declare const SplitRecipientSchema: z.ZodObject<{
102
+ address: z.ZodString;
103
+ percent: z.ZodNumber;
104
+ label: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ address: string;
107
+ percent: number;
108
+ label?: string | undefined;
109
+ }, {
110
+ address: string;
111
+ percent: number;
112
+ label?: string | undefined;
113
+ }>;
114
+ type SplitRecipient = z.infer<typeof SplitRecipientSchema>;
100
115
  declare const CHARGE_AMOUNT_MAX = 999999999999;
101
116
  declare const CreateChargeSchema: z.ZodObject<{
102
117
  amount: z.ZodNumber;
@@ -122,6 +137,28 @@ declare const CreateChargeSchema: z.ZodObject<{
122
137
  externalRef: z.ZodOptional<z.ZodString>;
123
138
  source: z.ZodOptional<z.ZodString>;
124
139
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
140
+ redirectUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
141
+ splitRecipients: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
142
+ address: z.ZodString;
143
+ percent: z.ZodNumber;
144
+ label: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ address: string;
147
+ percent: number;
148
+ label?: string | undefined;
149
+ }, {
150
+ address: string;
151
+ percent: number;
152
+ label?: string | undefined;
153
+ }>, "many">, {
154
+ address: string;
155
+ percent: number;
156
+ label?: string | undefined;
157
+ }[], {
158
+ address: string;
159
+ percent: number;
160
+ label?: string | undefined;
161
+ }[]>>;
125
162
  }, "strip", z.ZodTypeAny, {
126
163
  amount: number;
127
164
  currency: "USD";
@@ -134,6 +171,12 @@ declare const CreateChargeSchema: z.ZodObject<{
134
171
  externalRef?: string | undefined;
135
172
  source?: string | undefined;
136
173
  metadata?: Record<string, unknown> | undefined;
174
+ redirectUrl?: string | undefined;
175
+ splitRecipients?: {
176
+ address: string;
177
+ percent: number;
178
+ label?: string | undefined;
179
+ }[] | undefined;
137
180
  }, {
138
181
  amount: number;
139
182
  acceptedPayments: {
@@ -146,6 +189,12 @@ declare const CreateChargeSchema: z.ZodObject<{
146
189
  externalRef?: string | undefined;
147
190
  source?: string | undefined;
148
191
  metadata?: Record<string, unknown> | undefined;
192
+ redirectUrl?: string | undefined;
193
+ splitRecipients?: {
194
+ address: string;
195
+ percent: number;
196
+ label?: string | undefined;
197
+ }[] | undefined;
149
198
  }>;
150
199
  type CreateChargeInput = z.infer<typeof CreateChargeSchema>;
151
200
  type CreateChargeRequest = z.input<typeof CreateChargeSchema>;
@@ -184,6 +233,21 @@ declare const ChargeSchema: z.ZodObject<{
184
233
  externalRef: z.ZodNullable<z.ZodString>;
185
234
  source: z.ZodNullable<z.ZodString>;
186
235
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
236
+ redirectUrl: z.ZodNullable<z.ZodString>;
237
+ checkoutUrl: z.ZodNullable<z.ZodString>;
238
+ splitRecipients: z.ZodArray<z.ZodObject<{
239
+ address: z.ZodString;
240
+ percent: z.ZodNumber;
241
+ label: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ address: string;
244
+ percent: number;
245
+ label?: string | undefined;
246
+ }, {
247
+ address: string;
248
+ percent: number;
249
+ label?: string | undefined;
250
+ }>, "many">;
187
251
  createdAt: z.ZodString;
188
252
  expiresAt: z.ZodString;
189
253
  confirmedAt: z.ZodNullable<z.ZodString>;
@@ -191,6 +255,7 @@ declare const ChargeSchema: z.ZodObject<{
191
255
  lastActivityAt: z.ZodString;
192
256
  }, "strip", z.ZodTypeAny, {
193
257
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
258
+ address: string;
194
259
  amount: number;
195
260
  currency: string;
196
261
  acceptedPayments: {
@@ -200,6 +265,12 @@ declare const ChargeSchema: z.ZodObject<{
200
265
  externalRef: string | null;
201
266
  source: string | null;
202
267
  metadata: Record<string, unknown> | null;
268
+ redirectUrl: string | null;
269
+ splitRecipients: {
270
+ address: string;
271
+ percent: number;
272
+ label?: string | undefined;
273
+ }[];
203
274
  id: string;
204
275
  amountReceived: number | null;
205
276
  isOverpaid: boolean;
@@ -207,11 +278,11 @@ declare const ChargeSchema: z.ZodObject<{
207
278
  token: "USDC" | "USDT";
208
279
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
209
280
  }[];
210
- address: string;
211
281
  settlementStatus: "pending" | "completed" | "failed" | null;
212
282
  environment: "live" | "test";
213
283
  apiKeyId: string | null;
214
284
  txHash: string | null;
285
+ checkoutUrl: string | null;
215
286
  createdAt: string;
216
287
  expiresAt: string;
217
288
  confirmedAt: string | null;
@@ -219,6 +290,7 @@ declare const ChargeSchema: z.ZodObject<{
219
290
  lastActivityAt: string;
220
291
  }, {
221
292
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
293
+ address: string;
222
294
  amount: number;
223
295
  currency: string;
224
296
  acceptedPayments: {
@@ -228,6 +300,12 @@ declare const ChargeSchema: z.ZodObject<{
228
300
  externalRef: string | null;
229
301
  source: string | null;
230
302
  metadata: Record<string, unknown> | null;
303
+ redirectUrl: string | null;
304
+ splitRecipients: {
305
+ address: string;
306
+ percent: number;
307
+ label?: string | undefined;
308
+ }[];
231
309
  id: string;
232
310
  amountReceived: number | null;
233
311
  isOverpaid: boolean;
@@ -235,11 +313,11 @@ declare const ChargeSchema: z.ZodObject<{
235
313
  token: "USDC" | "USDT";
236
314
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
237
315
  }[];
238
- address: string;
239
316
  settlementStatus: "pending" | "completed" | "failed" | null;
240
317
  environment: "live" | "test";
241
318
  apiKeyId: string | null;
242
319
  txHash: string | null;
320
+ checkoutUrl: string | null;
243
321
  createdAt: string;
244
322
  expiresAt: string;
245
323
  confirmedAt: string | null;
@@ -314,6 +392,21 @@ declare const PaginatedChargesSchema: z.ZodObject<{
314
392
  externalRef: z.ZodNullable<z.ZodString>;
315
393
  source: z.ZodNullable<z.ZodString>;
316
394
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
395
+ redirectUrl: z.ZodNullable<z.ZodString>;
396
+ checkoutUrl: z.ZodNullable<z.ZodString>;
397
+ splitRecipients: z.ZodArray<z.ZodObject<{
398
+ address: z.ZodString;
399
+ percent: z.ZodNumber;
400
+ label: z.ZodOptional<z.ZodString>;
401
+ }, "strip", z.ZodTypeAny, {
402
+ address: string;
403
+ percent: number;
404
+ label?: string | undefined;
405
+ }, {
406
+ address: string;
407
+ percent: number;
408
+ label?: string | undefined;
409
+ }>, "many">;
317
410
  createdAt: z.ZodString;
318
411
  expiresAt: z.ZodString;
319
412
  confirmedAt: z.ZodNullable<z.ZodString>;
@@ -321,6 +414,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
321
414
  lastActivityAt: z.ZodString;
322
415
  }, "strip", z.ZodTypeAny, {
323
416
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
417
+ address: string;
324
418
  amount: number;
325
419
  currency: string;
326
420
  acceptedPayments: {
@@ -330,6 +424,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
330
424
  externalRef: string | null;
331
425
  source: string | null;
332
426
  metadata: Record<string, unknown> | null;
427
+ redirectUrl: string | null;
428
+ splitRecipients: {
429
+ address: string;
430
+ percent: number;
431
+ label?: string | undefined;
432
+ }[];
333
433
  id: string;
334
434
  amountReceived: number | null;
335
435
  isOverpaid: boolean;
@@ -337,11 +437,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
337
437
  token: "USDC" | "USDT";
338
438
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
339
439
  }[];
340
- address: string;
341
440
  settlementStatus: "pending" | "completed" | "failed" | null;
342
441
  environment: "live" | "test";
343
442
  apiKeyId: string | null;
344
443
  txHash: string | null;
444
+ checkoutUrl: string | null;
345
445
  createdAt: string;
346
446
  expiresAt: string;
347
447
  confirmedAt: string | null;
@@ -349,6 +449,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
349
449
  lastActivityAt: string;
350
450
  }, {
351
451
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
452
+ address: string;
352
453
  amount: number;
353
454
  currency: string;
354
455
  acceptedPayments: {
@@ -358,6 +459,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
358
459
  externalRef: string | null;
359
460
  source: string | null;
360
461
  metadata: Record<string, unknown> | null;
462
+ redirectUrl: string | null;
463
+ splitRecipients: {
464
+ address: string;
465
+ percent: number;
466
+ label?: string | undefined;
467
+ }[];
361
468
  id: string;
362
469
  amountReceived: number | null;
363
470
  isOverpaid: boolean;
@@ -365,11 +472,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
365
472
  token: "USDC" | "USDT";
366
473
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
367
474
  }[];
368
- address: string;
369
475
  settlementStatus: "pending" | "completed" | "failed" | null;
370
476
  environment: "live" | "test";
371
477
  apiKeyId: string | null;
372
478
  txHash: string | null;
479
+ checkoutUrl: string | null;
373
480
  createdAt: string;
374
481
  expiresAt: string;
375
482
  confirmedAt: string | null;
@@ -381,6 +488,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
381
488
  }, "strip", z.ZodTypeAny, {
382
489
  data: {
383
490
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
491
+ address: string;
384
492
  amount: number;
385
493
  currency: string;
386
494
  acceptedPayments: {
@@ -390,6 +498,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
390
498
  externalRef: string | null;
391
499
  source: string | null;
392
500
  metadata: Record<string, unknown> | null;
501
+ redirectUrl: string | null;
502
+ splitRecipients: {
503
+ address: string;
504
+ percent: number;
505
+ label?: string | undefined;
506
+ }[];
393
507
  id: string;
394
508
  amountReceived: number | null;
395
509
  isOverpaid: boolean;
@@ -397,11 +511,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
397
511
  token: "USDC" | "USDT";
398
512
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
399
513
  }[];
400
- address: string;
401
514
  settlementStatus: "pending" | "completed" | "failed" | null;
402
515
  environment: "live" | "test";
403
516
  apiKeyId: string | null;
404
517
  txHash: string | null;
518
+ checkoutUrl: string | null;
405
519
  createdAt: string;
406
520
  expiresAt: string;
407
521
  confirmedAt: string | null;
@@ -413,6 +527,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
413
527
  }, {
414
528
  data: {
415
529
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
530
+ address: string;
416
531
  amount: number;
417
532
  currency: string;
418
533
  acceptedPayments: {
@@ -422,6 +537,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
422
537
  externalRef: string | null;
423
538
  source: string | null;
424
539
  metadata: Record<string, unknown> | null;
540
+ redirectUrl: string | null;
541
+ splitRecipients: {
542
+ address: string;
543
+ percent: number;
544
+ label?: string | undefined;
545
+ }[];
425
546
  id: string;
426
547
  amountReceived: number | null;
427
548
  isOverpaid: boolean;
@@ -429,11 +550,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
429
550
  token: "USDC" | "USDT";
430
551
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
431
552
  }[];
432
- address: string;
433
553
  settlementStatus: "pending" | "completed" | "failed" | null;
434
554
  environment: "live" | "test";
435
555
  apiKeyId: string | null;
436
556
  txHash: string | null;
557
+ checkoutUrl: string | null;
437
558
  createdAt: string;
438
559
  expiresAt: string;
439
560
  confirmedAt: string | null;
@@ -1726,4 +1847,4 @@ declare const CapabilitiesSchema: z.ZodObject<{
1726
1847
  }>;
1727
1848
  type Capabilities = z.infer<typeof CapabilitiesSchema>;
1728
1849
 
1729
- export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };
1850
+ export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };
package/dist/index.d.ts CHANGED
@@ -97,6 +97,21 @@ declare const AcceptedPaymentSchema: z.ZodObject<{
97
97
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
98
98
  }>;
99
99
  type AcceptedPayment = z.infer<typeof AcceptedPaymentSchema>;
100
+ declare const CHARGE_SPLIT_RECIPIENTS_MAX = 5;
101
+ declare const SplitRecipientSchema: z.ZodObject<{
102
+ address: z.ZodString;
103
+ percent: z.ZodNumber;
104
+ label: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ address: string;
107
+ percent: number;
108
+ label?: string | undefined;
109
+ }, {
110
+ address: string;
111
+ percent: number;
112
+ label?: string | undefined;
113
+ }>;
114
+ type SplitRecipient = z.infer<typeof SplitRecipientSchema>;
100
115
  declare const CHARGE_AMOUNT_MAX = 999999999999;
101
116
  declare const CreateChargeSchema: z.ZodObject<{
102
117
  amount: z.ZodNumber;
@@ -122,6 +137,28 @@ declare const CreateChargeSchema: z.ZodObject<{
122
137
  externalRef: z.ZodOptional<z.ZodString>;
123
138
  source: z.ZodOptional<z.ZodString>;
124
139
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
140
+ redirectUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
141
+ splitRecipients: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
142
+ address: z.ZodString;
143
+ percent: z.ZodNumber;
144
+ label: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ address: string;
147
+ percent: number;
148
+ label?: string | undefined;
149
+ }, {
150
+ address: string;
151
+ percent: number;
152
+ label?: string | undefined;
153
+ }>, "many">, {
154
+ address: string;
155
+ percent: number;
156
+ label?: string | undefined;
157
+ }[], {
158
+ address: string;
159
+ percent: number;
160
+ label?: string | undefined;
161
+ }[]>>;
125
162
  }, "strip", z.ZodTypeAny, {
126
163
  amount: number;
127
164
  currency: "USD";
@@ -134,6 +171,12 @@ declare const CreateChargeSchema: z.ZodObject<{
134
171
  externalRef?: string | undefined;
135
172
  source?: string | undefined;
136
173
  metadata?: Record<string, unknown> | undefined;
174
+ redirectUrl?: string | undefined;
175
+ splitRecipients?: {
176
+ address: string;
177
+ percent: number;
178
+ label?: string | undefined;
179
+ }[] | undefined;
137
180
  }, {
138
181
  amount: number;
139
182
  acceptedPayments: {
@@ -146,6 +189,12 @@ declare const CreateChargeSchema: z.ZodObject<{
146
189
  externalRef?: string | undefined;
147
190
  source?: string | undefined;
148
191
  metadata?: Record<string, unknown> | undefined;
192
+ redirectUrl?: string | undefined;
193
+ splitRecipients?: {
194
+ address: string;
195
+ percent: number;
196
+ label?: string | undefined;
197
+ }[] | undefined;
149
198
  }>;
150
199
  type CreateChargeInput = z.infer<typeof CreateChargeSchema>;
151
200
  type CreateChargeRequest = z.input<typeof CreateChargeSchema>;
@@ -184,6 +233,21 @@ declare const ChargeSchema: z.ZodObject<{
184
233
  externalRef: z.ZodNullable<z.ZodString>;
185
234
  source: z.ZodNullable<z.ZodString>;
186
235
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
236
+ redirectUrl: z.ZodNullable<z.ZodString>;
237
+ checkoutUrl: z.ZodNullable<z.ZodString>;
238
+ splitRecipients: z.ZodArray<z.ZodObject<{
239
+ address: z.ZodString;
240
+ percent: z.ZodNumber;
241
+ label: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ address: string;
244
+ percent: number;
245
+ label?: string | undefined;
246
+ }, {
247
+ address: string;
248
+ percent: number;
249
+ label?: string | undefined;
250
+ }>, "many">;
187
251
  createdAt: z.ZodString;
188
252
  expiresAt: z.ZodString;
189
253
  confirmedAt: z.ZodNullable<z.ZodString>;
@@ -191,6 +255,7 @@ declare const ChargeSchema: z.ZodObject<{
191
255
  lastActivityAt: z.ZodString;
192
256
  }, "strip", z.ZodTypeAny, {
193
257
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
258
+ address: string;
194
259
  amount: number;
195
260
  currency: string;
196
261
  acceptedPayments: {
@@ -200,6 +265,12 @@ declare const ChargeSchema: z.ZodObject<{
200
265
  externalRef: string | null;
201
266
  source: string | null;
202
267
  metadata: Record<string, unknown> | null;
268
+ redirectUrl: string | null;
269
+ splitRecipients: {
270
+ address: string;
271
+ percent: number;
272
+ label?: string | undefined;
273
+ }[];
203
274
  id: string;
204
275
  amountReceived: number | null;
205
276
  isOverpaid: boolean;
@@ -207,11 +278,11 @@ declare const ChargeSchema: z.ZodObject<{
207
278
  token: "USDC" | "USDT";
208
279
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
209
280
  }[];
210
- address: string;
211
281
  settlementStatus: "pending" | "completed" | "failed" | null;
212
282
  environment: "live" | "test";
213
283
  apiKeyId: string | null;
214
284
  txHash: string | null;
285
+ checkoutUrl: string | null;
215
286
  createdAt: string;
216
287
  expiresAt: string;
217
288
  confirmedAt: string | null;
@@ -219,6 +290,7 @@ declare const ChargeSchema: z.ZodObject<{
219
290
  lastActivityAt: string;
220
291
  }, {
221
292
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
293
+ address: string;
222
294
  amount: number;
223
295
  currency: string;
224
296
  acceptedPayments: {
@@ -228,6 +300,12 @@ declare const ChargeSchema: z.ZodObject<{
228
300
  externalRef: string | null;
229
301
  source: string | null;
230
302
  metadata: Record<string, unknown> | null;
303
+ redirectUrl: string | null;
304
+ splitRecipients: {
305
+ address: string;
306
+ percent: number;
307
+ label?: string | undefined;
308
+ }[];
231
309
  id: string;
232
310
  amountReceived: number | null;
233
311
  isOverpaid: boolean;
@@ -235,11 +313,11 @@ declare const ChargeSchema: z.ZodObject<{
235
313
  token: "USDC" | "USDT";
236
314
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
237
315
  }[];
238
- address: string;
239
316
  settlementStatus: "pending" | "completed" | "failed" | null;
240
317
  environment: "live" | "test";
241
318
  apiKeyId: string | null;
242
319
  txHash: string | null;
320
+ checkoutUrl: string | null;
243
321
  createdAt: string;
244
322
  expiresAt: string;
245
323
  confirmedAt: string | null;
@@ -314,6 +392,21 @@ declare const PaginatedChargesSchema: z.ZodObject<{
314
392
  externalRef: z.ZodNullable<z.ZodString>;
315
393
  source: z.ZodNullable<z.ZodString>;
316
394
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
395
+ redirectUrl: z.ZodNullable<z.ZodString>;
396
+ checkoutUrl: z.ZodNullable<z.ZodString>;
397
+ splitRecipients: z.ZodArray<z.ZodObject<{
398
+ address: z.ZodString;
399
+ percent: z.ZodNumber;
400
+ label: z.ZodOptional<z.ZodString>;
401
+ }, "strip", z.ZodTypeAny, {
402
+ address: string;
403
+ percent: number;
404
+ label?: string | undefined;
405
+ }, {
406
+ address: string;
407
+ percent: number;
408
+ label?: string | undefined;
409
+ }>, "many">;
317
410
  createdAt: z.ZodString;
318
411
  expiresAt: z.ZodString;
319
412
  confirmedAt: z.ZodNullable<z.ZodString>;
@@ -321,6 +414,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
321
414
  lastActivityAt: z.ZodString;
322
415
  }, "strip", z.ZodTypeAny, {
323
416
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
417
+ address: string;
324
418
  amount: number;
325
419
  currency: string;
326
420
  acceptedPayments: {
@@ -330,6 +424,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
330
424
  externalRef: string | null;
331
425
  source: string | null;
332
426
  metadata: Record<string, unknown> | null;
427
+ redirectUrl: string | null;
428
+ splitRecipients: {
429
+ address: string;
430
+ percent: number;
431
+ label?: string | undefined;
432
+ }[];
333
433
  id: string;
334
434
  amountReceived: number | null;
335
435
  isOverpaid: boolean;
@@ -337,11 +437,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
337
437
  token: "USDC" | "USDT";
338
438
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
339
439
  }[];
340
- address: string;
341
440
  settlementStatus: "pending" | "completed" | "failed" | null;
342
441
  environment: "live" | "test";
343
442
  apiKeyId: string | null;
344
443
  txHash: string | null;
444
+ checkoutUrl: string | null;
345
445
  createdAt: string;
346
446
  expiresAt: string;
347
447
  confirmedAt: string | null;
@@ -349,6 +449,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
349
449
  lastActivityAt: string;
350
450
  }, {
351
451
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
452
+ address: string;
352
453
  amount: number;
353
454
  currency: string;
354
455
  acceptedPayments: {
@@ -358,6 +459,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
358
459
  externalRef: string | null;
359
460
  source: string | null;
360
461
  metadata: Record<string, unknown> | null;
462
+ redirectUrl: string | null;
463
+ splitRecipients: {
464
+ address: string;
465
+ percent: number;
466
+ label?: string | undefined;
467
+ }[];
361
468
  id: string;
362
469
  amountReceived: number | null;
363
470
  isOverpaid: boolean;
@@ -365,11 +472,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
365
472
  token: "USDC" | "USDT";
366
473
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
367
474
  }[];
368
- address: string;
369
475
  settlementStatus: "pending" | "completed" | "failed" | null;
370
476
  environment: "live" | "test";
371
477
  apiKeyId: string | null;
372
478
  txHash: string | null;
479
+ checkoutUrl: string | null;
373
480
  createdAt: string;
374
481
  expiresAt: string;
375
482
  confirmedAt: string | null;
@@ -381,6 +488,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
381
488
  }, "strip", z.ZodTypeAny, {
382
489
  data: {
383
490
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
491
+ address: string;
384
492
  amount: number;
385
493
  currency: string;
386
494
  acceptedPayments: {
@@ -390,6 +498,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
390
498
  externalRef: string | null;
391
499
  source: string | null;
392
500
  metadata: Record<string, unknown> | null;
501
+ redirectUrl: string | null;
502
+ splitRecipients: {
503
+ address: string;
504
+ percent: number;
505
+ label?: string | undefined;
506
+ }[];
393
507
  id: string;
394
508
  amountReceived: number | null;
395
509
  isOverpaid: boolean;
@@ -397,11 +511,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
397
511
  token: "USDC" | "USDT";
398
512
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
399
513
  }[];
400
- address: string;
401
514
  settlementStatus: "pending" | "completed" | "failed" | null;
402
515
  environment: "live" | "test";
403
516
  apiKeyId: string | null;
404
517
  txHash: string | null;
518
+ checkoutUrl: string | null;
405
519
  createdAt: string;
406
520
  expiresAt: string;
407
521
  confirmedAt: string | null;
@@ -413,6 +527,7 @@ declare const PaginatedChargesSchema: z.ZodObject<{
413
527
  }, {
414
528
  data: {
415
529
  status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
530
+ address: string;
416
531
  amount: number;
417
532
  currency: string;
418
533
  acceptedPayments: {
@@ -422,6 +537,12 @@ declare const PaginatedChargesSchema: z.ZodObject<{
422
537
  externalRef: string | null;
423
538
  source: string | null;
424
539
  metadata: Record<string, unknown> | null;
540
+ redirectUrl: string | null;
541
+ splitRecipients: {
542
+ address: string;
543
+ percent: number;
544
+ label?: string | undefined;
545
+ }[];
425
546
  id: string;
426
547
  amountReceived: number | null;
427
548
  isOverpaid: boolean;
@@ -429,11 +550,11 @@ declare const PaginatedChargesSchema: z.ZodObject<{
429
550
  token: "USDC" | "USDT";
430
551
  network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
431
552
  }[];
432
- address: string;
433
553
  settlementStatus: "pending" | "completed" | "failed" | null;
434
554
  environment: "live" | "test";
435
555
  apiKeyId: string | null;
436
556
  txHash: string | null;
557
+ checkoutUrl: string | null;
437
558
  createdAt: string;
438
559
  expiresAt: string;
439
560
  confirmedAt: string | null;
@@ -1726,4 +1847,4 @@ declare const CapabilitiesSchema: z.ZodObject<{
1726
1847
  }>;
1727
1848
  type Capabilities = z.infer<typeof CapabilitiesSchema>;
1728
1849
 
1729
- export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };
1850
+ export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };