@nokinc-flur/sdk 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9,6 +9,776 @@ declare function formatAmount(amountMinor: bigint, currency: string): string;
9
9
  declare function normalizeE164(input: string, defaultCountry?: string): string;
10
10
  declare function moneyMinorToNumber(amountMinor: bigint): number;
11
11
 
12
+ declare const MERCHANT_PROFILE_STATUSES: readonly ["pending", "active", "suspended", "closed"];
13
+ declare const SETTLEMENT_SCHEDULES: readonly ["manual", "daily", "t1"];
14
+ declare const COLLECTION_INTENT_STATUSES: readonly ["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"];
15
+ declare const COLLECTION_PAYMENT_STATUSES: readonly ["pending", "paid", "failed", "reversed"];
16
+ declare const MERCHANT_PAYOUT_STATUSES: readonly ["requested", "processing", "paid", "failed", "cancelled"];
17
+ declare const MerchantProfileSchema: z.ZodObject<{
18
+ accountId: z.ZodString;
19
+ legalName: z.ZodString;
20
+ tradingName: z.ZodString;
21
+ merchantCategoryCode: z.ZodString;
22
+ nqrMerchantId: z.ZodString;
23
+ settlementBankCode: z.ZodString;
24
+ settlementAccountNumber: z.ZodString;
25
+ settlementAccountName: z.ZodString;
26
+ settlementSchedule: z.ZodEnum<["manual", "daily", "t1"]>;
27
+ status: z.ZodEnum<["pending", "active", "suspended", "closed"]>;
28
+ offlineEnabled: z.ZodBoolean;
29
+ perTxLimitKobo: z.ZodNumber;
30
+ dailyLimitKobo: z.ZodNumber;
31
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
32
+ createdAtMs: z.ZodNumber;
33
+ updatedAtMs: z.ZodNumber;
34
+ }, "strip", z.ZodTypeAny, {
35
+ status: "pending" | "active" | "suspended" | "closed";
36
+ accountId: string;
37
+ legalName: string;
38
+ tradingName: string;
39
+ merchantCategoryCode: string;
40
+ nqrMerchantId: string;
41
+ settlementBankCode: string;
42
+ settlementAccountNumber: string;
43
+ settlementAccountName: string;
44
+ settlementSchedule: "manual" | "daily" | "t1";
45
+ offlineEnabled: boolean;
46
+ perTxLimitKobo: number;
47
+ dailyLimitKobo: number;
48
+ metadata: Record<string, string | number | boolean | null>;
49
+ createdAtMs: number;
50
+ updatedAtMs: number;
51
+ }, {
52
+ status: "pending" | "active" | "suspended" | "closed";
53
+ accountId: string;
54
+ legalName: string;
55
+ tradingName: string;
56
+ merchantCategoryCode: string;
57
+ nqrMerchantId: string;
58
+ settlementBankCode: string;
59
+ settlementAccountNumber: string;
60
+ settlementAccountName: string;
61
+ settlementSchedule: "manual" | "daily" | "t1";
62
+ offlineEnabled: boolean;
63
+ perTxLimitKobo: number;
64
+ dailyLimitKobo: number;
65
+ metadata: Record<string, string | number | boolean | null>;
66
+ createdAtMs: number;
67
+ updatedAtMs: number;
68
+ }>;
69
+ type MerchantProfile = z.infer<typeof MerchantProfileSchema>;
70
+ declare const UpsertMerchantProfileInputSchema: z.ZodObject<{
71
+ legalName: z.ZodString;
72
+ tradingName: z.ZodString;
73
+ merchantCategoryCode: z.ZodString;
74
+ nqrMerchantId: z.ZodString;
75
+ settlementBankCode: z.ZodString;
76
+ settlementAccountNumber: z.ZodString;
77
+ settlementAccountName: z.ZodString;
78
+ settlementSchedule: z.ZodOptional<z.ZodEnum<["manual", "daily", "t1"]>>;
79
+ status: z.ZodOptional<z.ZodEnum<["pending", "active", "suspended", "closed"]>>;
80
+ offlineEnabled: z.ZodOptional<z.ZodBoolean>;
81
+ perTxLimitKobo: z.ZodOptional<z.ZodNumber>;
82
+ dailyLimitKobo: z.ZodOptional<z.ZodNumber>;
83
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ legalName: string;
86
+ tradingName: string;
87
+ merchantCategoryCode: string;
88
+ nqrMerchantId: string;
89
+ settlementBankCode: string;
90
+ settlementAccountNumber: string;
91
+ settlementAccountName: string;
92
+ status?: "pending" | "active" | "suspended" | "closed" | undefined;
93
+ settlementSchedule?: "manual" | "daily" | "t1" | undefined;
94
+ offlineEnabled?: boolean | undefined;
95
+ perTxLimitKobo?: number | undefined;
96
+ dailyLimitKobo?: number | undefined;
97
+ metadata?: Record<string, string | number | boolean | null> | undefined;
98
+ }, {
99
+ legalName: string;
100
+ tradingName: string;
101
+ merchantCategoryCode: string;
102
+ nqrMerchantId: string;
103
+ settlementBankCode: string;
104
+ settlementAccountNumber: string;
105
+ settlementAccountName: string;
106
+ status?: "pending" | "active" | "suspended" | "closed" | undefined;
107
+ settlementSchedule?: "manual" | "daily" | "t1" | undefined;
108
+ offlineEnabled?: boolean | undefined;
109
+ perTxLimitKobo?: number | undefined;
110
+ dailyLimitKobo?: number | undefined;
111
+ metadata?: Record<string, string | number | boolean | null> | undefined;
112
+ }>;
113
+ type UpsertMerchantProfileInput = z.infer<typeof UpsertMerchantProfileInputSchema>;
114
+ declare const CollectionIntentSchema: z.ZodObject<{
115
+ intentId: z.ZodString;
116
+ accountId: z.ZodString;
117
+ terminalId: z.ZodNullable<z.ZodString>;
118
+ reference: z.ZodString;
119
+ amountKobo: z.ZodNullable<z.ZodNumber>;
120
+ currency: z.ZodString;
121
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
122
+ description: z.ZodNullable<z.ZodString>;
123
+ nqrPayload: z.ZodString;
124
+ provider: z.ZodString;
125
+ providerReference: z.ZodNullable<z.ZodString>;
126
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
127
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
128
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
129
+ createdAtMs: z.ZodNumber;
130
+ updatedAtMs: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
133
+ provider: string;
134
+ currency: string;
135
+ accountId: string;
136
+ metadata: Record<string, string | number | boolean | null>;
137
+ createdAtMs: number;
138
+ updatedAtMs: number;
139
+ intentId: string;
140
+ terminalId: string | null;
141
+ reference: string;
142
+ amountKobo: number | null;
143
+ description: string | null;
144
+ nqrPayload: string;
145
+ providerReference: string | null;
146
+ expiresAtMs: number | null;
147
+ paidAtMs: number | null;
148
+ }, {
149
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
150
+ provider: string;
151
+ currency: string;
152
+ accountId: string;
153
+ metadata: Record<string, string | number | boolean | null>;
154
+ createdAtMs: number;
155
+ updatedAtMs: number;
156
+ intentId: string;
157
+ terminalId: string | null;
158
+ reference: string;
159
+ amountKobo: number | null;
160
+ description: string | null;
161
+ nqrPayload: string;
162
+ providerReference: string | null;
163
+ expiresAtMs: number | null;
164
+ paidAtMs: number | null;
165
+ }>;
166
+ type CollectionIntent = z.infer<typeof CollectionIntentSchema>;
167
+ declare const CreateCollectionIntentInputSchema: z.ZodObject<{
168
+ reference: z.ZodOptional<z.ZodString>;
169
+ amountKobo: z.ZodOptional<z.ZodNumber>;
170
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
171
+ terminalId: z.ZodOptional<z.ZodString>;
172
+ terminalLabel: z.ZodOptional<z.ZodString>;
173
+ merchantCity: z.ZodOptional<z.ZodString>;
174
+ description: z.ZodOptional<z.ZodString>;
175
+ expiresAtMs: z.ZodOptional<z.ZodNumber>;
176
+ provider: z.ZodOptional<z.ZodString>;
177
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ provider?: string | undefined;
180
+ currency?: string | undefined;
181
+ metadata?: Record<string, string | number | boolean | null> | undefined;
182
+ terminalId?: string | undefined;
183
+ reference?: string | undefined;
184
+ amountKobo?: number | undefined;
185
+ description?: string | undefined;
186
+ expiresAtMs?: number | undefined;
187
+ terminalLabel?: string | undefined;
188
+ merchantCity?: string | undefined;
189
+ }, {
190
+ provider?: string | undefined;
191
+ currency?: string | undefined;
192
+ metadata?: Record<string, string | number | boolean | null> | undefined;
193
+ terminalId?: string | undefined;
194
+ reference?: string | undefined;
195
+ amountKobo?: number | undefined;
196
+ description?: string | undefined;
197
+ expiresAtMs?: number | undefined;
198
+ terminalLabel?: string | undefined;
199
+ merchantCity?: string | undefined;
200
+ }>;
201
+ type CreateCollectionIntentInput = z.infer<typeof CreateCollectionIntentInputSchema>;
202
+ declare const PublicCollectionIntentSchema: z.ZodObject<{
203
+ intentId: z.ZodString;
204
+ reference: z.ZodString;
205
+ amountKobo: z.ZodNullable<z.ZodNumber>;
206
+ currency: z.ZodString;
207
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
208
+ merchantAccountId: z.ZodString;
209
+ merchantName: z.ZodString;
210
+ merchantCategoryCode: z.ZodString;
211
+ description: z.ZodNullable<z.ZodString>;
212
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
215
+ currency: string;
216
+ merchantCategoryCode: string;
217
+ intentId: string;
218
+ reference: string;
219
+ amountKobo: number | null;
220
+ description: string | null;
221
+ expiresAtMs: number | null;
222
+ merchantAccountId: string;
223
+ merchantName: string;
224
+ }, {
225
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
226
+ currency: string;
227
+ merchantCategoryCode: string;
228
+ intentId: string;
229
+ reference: string;
230
+ amountKobo: number | null;
231
+ description: string | null;
232
+ expiresAtMs: number | null;
233
+ merchantAccountId: string;
234
+ merchantName: string;
235
+ }>;
236
+ type PublicCollectionIntent = z.infer<typeof PublicCollectionIntentSchema>;
237
+ declare const PayCollectionInputSchema: z.ZodObject<{
238
+ reference: z.ZodString;
239
+ amountKobo: z.ZodOptional<z.ZodNumber>;
240
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
241
+ idempotencyKey: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ reference: string;
244
+ currency?: string | undefined;
245
+ amountKobo?: number | undefined;
246
+ idempotencyKey?: string | undefined;
247
+ }, {
248
+ reference: string;
249
+ currency?: string | undefined;
250
+ amountKobo?: number | undefined;
251
+ idempotencyKey?: string | undefined;
252
+ }>;
253
+ type PayCollectionInput = z.infer<typeof PayCollectionInputSchema>;
254
+ declare const CollectionPaymentSchema: z.ZodObject<{
255
+ paymentId: z.ZodString;
256
+ intentId: z.ZodString;
257
+ accountId: z.ZodString;
258
+ payerUserId: z.ZodNullable<z.ZodString>;
259
+ merchantOwnerUserId: z.ZodString;
260
+ amountKobo: z.ZodNumber;
261
+ currency: z.ZodString;
262
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
263
+ provider: z.ZodString;
264
+ providerReference: z.ZodNullable<z.ZodString>;
265
+ idempotencyKey: z.ZodNullable<z.ZodString>;
266
+ ledgerRef: z.ZodString;
267
+ failureCode: z.ZodNullable<z.ZodString>;
268
+ failureMessage: z.ZodNullable<z.ZodString>;
269
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
270
+ createdAtMs: z.ZodNumber;
271
+ updatedAtMs: z.ZodNumber;
272
+ }, "strip", z.ZodTypeAny, {
273
+ status: "pending" | "paid" | "failed" | "reversed";
274
+ provider: string;
275
+ currency: string;
276
+ accountId: string;
277
+ createdAtMs: number;
278
+ updatedAtMs: number;
279
+ intentId: string;
280
+ amountKobo: number;
281
+ providerReference: string | null;
282
+ paidAtMs: number | null;
283
+ idempotencyKey: string | null;
284
+ paymentId: string;
285
+ payerUserId: string | null;
286
+ merchantOwnerUserId: string;
287
+ ledgerRef: string;
288
+ failureCode: string | null;
289
+ failureMessage: string | null;
290
+ }, {
291
+ status: "pending" | "paid" | "failed" | "reversed";
292
+ provider: string;
293
+ currency: string;
294
+ accountId: string;
295
+ createdAtMs: number;
296
+ updatedAtMs: number;
297
+ intentId: string;
298
+ amountKobo: number;
299
+ providerReference: string | null;
300
+ paidAtMs: number | null;
301
+ idempotencyKey: string | null;
302
+ paymentId: string;
303
+ payerUserId: string | null;
304
+ merchantOwnerUserId: string;
305
+ ledgerRef: string;
306
+ failureCode: string | null;
307
+ failureMessage: string | null;
308
+ }>;
309
+ type CollectionPayment = z.infer<typeof CollectionPaymentSchema>;
310
+ declare const CollectionPaymentResultSchema: z.ZodObject<{
311
+ payment: z.ZodObject<{
312
+ paymentId: z.ZodString;
313
+ intentId: z.ZodString;
314
+ accountId: z.ZodString;
315
+ payerUserId: z.ZodNullable<z.ZodString>;
316
+ merchantOwnerUserId: z.ZodString;
317
+ amountKobo: z.ZodNumber;
318
+ currency: z.ZodString;
319
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
320
+ provider: z.ZodString;
321
+ providerReference: z.ZodNullable<z.ZodString>;
322
+ idempotencyKey: z.ZodNullable<z.ZodString>;
323
+ ledgerRef: z.ZodString;
324
+ failureCode: z.ZodNullable<z.ZodString>;
325
+ failureMessage: z.ZodNullable<z.ZodString>;
326
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
327
+ createdAtMs: z.ZodNumber;
328
+ updatedAtMs: z.ZodNumber;
329
+ }, "strip", z.ZodTypeAny, {
330
+ status: "pending" | "paid" | "failed" | "reversed";
331
+ provider: string;
332
+ currency: string;
333
+ accountId: string;
334
+ createdAtMs: number;
335
+ updatedAtMs: number;
336
+ intentId: string;
337
+ amountKobo: number;
338
+ providerReference: string | null;
339
+ paidAtMs: number | null;
340
+ idempotencyKey: string | null;
341
+ paymentId: string;
342
+ payerUserId: string | null;
343
+ merchantOwnerUserId: string;
344
+ ledgerRef: string;
345
+ failureCode: string | null;
346
+ failureMessage: string | null;
347
+ }, {
348
+ status: "pending" | "paid" | "failed" | "reversed";
349
+ provider: string;
350
+ currency: string;
351
+ accountId: string;
352
+ createdAtMs: number;
353
+ updatedAtMs: number;
354
+ intentId: string;
355
+ amountKobo: number;
356
+ providerReference: string | null;
357
+ paidAtMs: number | null;
358
+ idempotencyKey: string | null;
359
+ paymentId: string;
360
+ payerUserId: string | null;
361
+ merchantOwnerUserId: string;
362
+ ledgerRef: string;
363
+ failureCode: string | null;
364
+ failureMessage: string | null;
365
+ }>;
366
+ intent: z.ZodObject<{
367
+ intentId: z.ZodString;
368
+ accountId: z.ZodString;
369
+ terminalId: z.ZodNullable<z.ZodString>;
370
+ reference: z.ZodString;
371
+ amountKobo: z.ZodNullable<z.ZodNumber>;
372
+ currency: z.ZodString;
373
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
374
+ description: z.ZodNullable<z.ZodString>;
375
+ nqrPayload: z.ZodString;
376
+ provider: z.ZodString;
377
+ providerReference: z.ZodNullable<z.ZodString>;
378
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
379
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
380
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
381
+ createdAtMs: z.ZodNumber;
382
+ updatedAtMs: z.ZodNumber;
383
+ }, "strip", z.ZodTypeAny, {
384
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
385
+ provider: string;
386
+ currency: string;
387
+ accountId: string;
388
+ metadata: Record<string, string | number | boolean | null>;
389
+ createdAtMs: number;
390
+ updatedAtMs: number;
391
+ intentId: string;
392
+ terminalId: string | null;
393
+ reference: string;
394
+ amountKobo: number | null;
395
+ description: string | null;
396
+ nqrPayload: string;
397
+ providerReference: string | null;
398
+ expiresAtMs: number | null;
399
+ paidAtMs: number | null;
400
+ }, {
401
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
402
+ provider: string;
403
+ currency: string;
404
+ accountId: string;
405
+ metadata: Record<string, string | number | boolean | null>;
406
+ createdAtMs: number;
407
+ updatedAtMs: number;
408
+ intentId: string;
409
+ terminalId: string | null;
410
+ reference: string;
411
+ amountKobo: number | null;
412
+ description: string | null;
413
+ nqrPayload: string;
414
+ providerReference: string | null;
415
+ expiresAtMs: number | null;
416
+ paidAtMs: number | null;
417
+ }>;
418
+ receipt: z.ZodOptional<z.ZodUnknown>;
419
+ replayed: z.ZodBoolean;
420
+ }, "strip", z.ZodTypeAny, {
421
+ payment: {
422
+ status: "pending" | "paid" | "failed" | "reversed";
423
+ provider: string;
424
+ currency: string;
425
+ accountId: string;
426
+ createdAtMs: number;
427
+ updatedAtMs: number;
428
+ intentId: string;
429
+ amountKobo: number;
430
+ providerReference: string | null;
431
+ paidAtMs: number | null;
432
+ idempotencyKey: string | null;
433
+ paymentId: string;
434
+ payerUserId: string | null;
435
+ merchantOwnerUserId: string;
436
+ ledgerRef: string;
437
+ failureCode: string | null;
438
+ failureMessage: string | null;
439
+ };
440
+ intent: {
441
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
442
+ provider: string;
443
+ currency: string;
444
+ accountId: string;
445
+ metadata: Record<string, string | number | boolean | null>;
446
+ createdAtMs: number;
447
+ updatedAtMs: number;
448
+ intentId: string;
449
+ terminalId: string | null;
450
+ reference: string;
451
+ amountKobo: number | null;
452
+ description: string | null;
453
+ nqrPayload: string;
454
+ providerReference: string | null;
455
+ expiresAtMs: number | null;
456
+ paidAtMs: number | null;
457
+ };
458
+ replayed: boolean;
459
+ receipt?: unknown;
460
+ }, {
461
+ payment: {
462
+ status: "pending" | "paid" | "failed" | "reversed";
463
+ provider: string;
464
+ currency: string;
465
+ accountId: string;
466
+ createdAtMs: number;
467
+ updatedAtMs: number;
468
+ intentId: string;
469
+ amountKobo: number;
470
+ providerReference: string | null;
471
+ paidAtMs: number | null;
472
+ idempotencyKey: string | null;
473
+ paymentId: string;
474
+ payerUserId: string | null;
475
+ merchantOwnerUserId: string;
476
+ ledgerRef: string;
477
+ failureCode: string | null;
478
+ failureMessage: string | null;
479
+ };
480
+ intent: {
481
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
482
+ provider: string;
483
+ currency: string;
484
+ accountId: string;
485
+ metadata: Record<string, string | number | boolean | null>;
486
+ createdAtMs: number;
487
+ updatedAtMs: number;
488
+ intentId: string;
489
+ terminalId: string | null;
490
+ reference: string;
491
+ amountKobo: number | null;
492
+ description: string | null;
493
+ nqrPayload: string;
494
+ providerReference: string | null;
495
+ expiresAtMs: number | null;
496
+ paidAtMs: number | null;
497
+ };
498
+ replayed: boolean;
499
+ receipt?: unknown;
500
+ }>;
501
+ type CollectionPaymentResult = z.infer<typeof CollectionPaymentResultSchema>;
502
+ declare const CollectionReportSummarySchema: z.ZodObject<{
503
+ accountId: z.ZodString;
504
+ fromMs: z.ZodNumber;
505
+ toMs: z.ZodNumber;
506
+ currency: z.ZodString;
507
+ paidCount: z.ZodNumber;
508
+ paidAmountKobo: z.ZodNumber;
509
+ pendingCount: z.ZodNumber;
510
+ failedCount: z.ZodNumber;
511
+ reversedCount: z.ZodNumber;
512
+ availableBalanceKobo: z.ZodNumber;
513
+ }, "strip", z.ZodTypeAny, {
514
+ currency: string;
515
+ accountId: string;
516
+ fromMs: number;
517
+ toMs: number;
518
+ paidCount: number;
519
+ paidAmountKobo: number;
520
+ pendingCount: number;
521
+ failedCount: number;
522
+ reversedCount: number;
523
+ availableBalanceKobo: number;
524
+ }, {
525
+ currency: string;
526
+ accountId: string;
527
+ fromMs: number;
528
+ toMs: number;
529
+ paidCount: number;
530
+ paidAmountKobo: number;
531
+ pendingCount: number;
532
+ failedCount: number;
533
+ reversedCount: number;
534
+ availableBalanceKobo: number;
535
+ }>;
536
+ type CollectionReportSummary = z.infer<typeof CollectionReportSummarySchema>;
537
+ declare const CollectionStatementSchema: z.ZodObject<{
538
+ accountId: z.ZodString;
539
+ year: z.ZodNumber;
540
+ month: z.ZodNumber;
541
+ currency: z.ZodString;
542
+ totalPaidKobo: z.ZodNumber;
543
+ items: z.ZodArray<z.ZodObject<{
544
+ paymentId: z.ZodString;
545
+ intentId: z.ZodString;
546
+ accountId: z.ZodString;
547
+ payerUserId: z.ZodNullable<z.ZodString>;
548
+ merchantOwnerUserId: z.ZodString;
549
+ amountKobo: z.ZodNumber;
550
+ currency: z.ZodString;
551
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
552
+ provider: z.ZodString;
553
+ providerReference: z.ZodNullable<z.ZodString>;
554
+ idempotencyKey: z.ZodNullable<z.ZodString>;
555
+ ledgerRef: z.ZodString;
556
+ failureCode: z.ZodNullable<z.ZodString>;
557
+ failureMessage: z.ZodNullable<z.ZodString>;
558
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
559
+ createdAtMs: z.ZodNumber;
560
+ updatedAtMs: z.ZodNumber;
561
+ }, "strip", z.ZodTypeAny, {
562
+ status: "pending" | "paid" | "failed" | "reversed";
563
+ provider: string;
564
+ currency: string;
565
+ accountId: string;
566
+ createdAtMs: number;
567
+ updatedAtMs: number;
568
+ intentId: string;
569
+ amountKobo: number;
570
+ providerReference: string | null;
571
+ paidAtMs: number | null;
572
+ idempotencyKey: string | null;
573
+ paymentId: string;
574
+ payerUserId: string | null;
575
+ merchantOwnerUserId: string;
576
+ ledgerRef: string;
577
+ failureCode: string | null;
578
+ failureMessage: string | null;
579
+ }, {
580
+ status: "pending" | "paid" | "failed" | "reversed";
581
+ provider: string;
582
+ currency: string;
583
+ accountId: string;
584
+ createdAtMs: number;
585
+ updatedAtMs: number;
586
+ intentId: string;
587
+ amountKobo: number;
588
+ providerReference: string | null;
589
+ paidAtMs: number | null;
590
+ idempotencyKey: string | null;
591
+ paymentId: string;
592
+ payerUserId: string | null;
593
+ merchantOwnerUserId: string;
594
+ ledgerRef: string;
595
+ failureCode: string | null;
596
+ failureMessage: string | null;
597
+ }>, "many">;
598
+ }, "strip", z.ZodTypeAny, {
599
+ currency: string;
600
+ items: {
601
+ status: "pending" | "paid" | "failed" | "reversed";
602
+ provider: string;
603
+ currency: string;
604
+ accountId: string;
605
+ createdAtMs: number;
606
+ updatedAtMs: number;
607
+ intentId: string;
608
+ amountKobo: number;
609
+ providerReference: string | null;
610
+ paidAtMs: number | null;
611
+ idempotencyKey: string | null;
612
+ paymentId: string;
613
+ payerUserId: string | null;
614
+ merchantOwnerUserId: string;
615
+ ledgerRef: string;
616
+ failureCode: string | null;
617
+ failureMessage: string | null;
618
+ }[];
619
+ accountId: string;
620
+ year: number;
621
+ month: number;
622
+ totalPaidKobo: number;
623
+ }, {
624
+ currency: string;
625
+ items: {
626
+ status: "pending" | "paid" | "failed" | "reversed";
627
+ provider: string;
628
+ currency: string;
629
+ accountId: string;
630
+ createdAtMs: number;
631
+ updatedAtMs: number;
632
+ intentId: string;
633
+ amountKobo: number;
634
+ providerReference: string | null;
635
+ paidAtMs: number | null;
636
+ idempotencyKey: string | null;
637
+ paymentId: string;
638
+ payerUserId: string | null;
639
+ merchantOwnerUserId: string;
640
+ ledgerRef: string;
641
+ failureCode: string | null;
642
+ failureMessage: string | null;
643
+ }[];
644
+ accountId: string;
645
+ year: number;
646
+ month: number;
647
+ totalPaidKobo: number;
648
+ }>;
649
+ type CollectionStatement = z.infer<typeof CollectionStatementSchema>;
650
+ declare const CreatePayoutInputSchema: z.ZodObject<{
651
+ amountKobo: z.ZodNumber;
652
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
653
+ idempotencyKey: z.ZodString;
654
+ }, "strip", z.ZodTypeAny, {
655
+ amountKobo: number;
656
+ idempotencyKey: string;
657
+ currency?: string | undefined;
658
+ }, {
659
+ amountKobo: number;
660
+ idempotencyKey: string;
661
+ currency?: string | undefined;
662
+ }>;
663
+ type CreatePayoutInput = z.infer<typeof CreatePayoutInputSchema>;
664
+ declare const MerchantPayoutSchema: z.ZodObject<{
665
+ payoutId: z.ZodString;
666
+ accountId: z.ZodString;
667
+ amountKobo: z.ZodNumber;
668
+ currency: z.ZodString;
669
+ status: z.ZodEnum<["requested", "processing", "paid", "failed", "cancelled"]>;
670
+ idempotencyKey: z.ZodNullable<z.ZodString>;
671
+ ledgerRef: z.ZodString;
672
+ providerReference: z.ZodNullable<z.ZodString>;
673
+ requestedByUserId: z.ZodNullable<z.ZodString>;
674
+ failureCode: z.ZodNullable<z.ZodString>;
675
+ failureMessage: z.ZodNullable<z.ZodString>;
676
+ createdAtMs: z.ZodNumber;
677
+ updatedAtMs: z.ZodNumber;
678
+ }, "strip", z.ZodTypeAny, {
679
+ status: "paid" | "cancelled" | "failed" | "requested" | "processing";
680
+ currency: string;
681
+ accountId: string;
682
+ createdAtMs: number;
683
+ updatedAtMs: number;
684
+ amountKobo: number;
685
+ providerReference: string | null;
686
+ idempotencyKey: string | null;
687
+ ledgerRef: string;
688
+ failureCode: string | null;
689
+ failureMessage: string | null;
690
+ payoutId: string;
691
+ requestedByUserId: string | null;
692
+ }, {
693
+ status: "paid" | "cancelled" | "failed" | "requested" | "processing";
694
+ currency: string;
695
+ accountId: string;
696
+ createdAtMs: number;
697
+ updatedAtMs: number;
698
+ amountKobo: number;
699
+ providerReference: string | null;
700
+ idempotencyKey: string | null;
701
+ ledgerRef: string;
702
+ failureCode: string | null;
703
+ failureMessage: string | null;
704
+ payoutId: string;
705
+ requestedByUserId: string | null;
706
+ }>;
707
+ type MerchantPayout = z.infer<typeof MerchantPayoutSchema>;
708
+ declare const ProviderEventInputSchema: z.ZodObject<{
709
+ provider: z.ZodString;
710
+ eventId: z.ZodString;
711
+ eventType: z.ZodString;
712
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ provider: string;
715
+ eventId: string;
716
+ eventType: string;
717
+ payload?: Record<string, unknown> | undefined;
718
+ }, {
719
+ provider: string;
720
+ eventId: string;
721
+ eventType: string;
722
+ payload?: Record<string, unknown> | undefined;
723
+ }>;
724
+ type ProviderEventInput = z.infer<typeof ProviderEventInputSchema>;
725
+ declare const ProviderEventRecordSchema: z.ZodObject<{
726
+ id: z.ZodString;
727
+ provider: z.ZodString;
728
+ eventId: z.ZodString;
729
+ eventType: z.ZodString;
730
+ signatureVerified: z.ZodBoolean;
731
+ receivedAtMs: z.ZodNumber;
732
+ processedAtMs: z.ZodNullable<z.ZodNumber>;
733
+ }, "strip", z.ZodTypeAny, {
734
+ provider: string;
735
+ id: string;
736
+ eventId: string;
737
+ eventType: string;
738
+ signatureVerified: boolean;
739
+ receivedAtMs: number;
740
+ processedAtMs: number | null;
741
+ }, {
742
+ provider: string;
743
+ id: string;
744
+ eventId: string;
745
+ eventType: string;
746
+ signatureVerified: boolean;
747
+ receivedAtMs: number;
748
+ processedAtMs: number | null;
749
+ }>;
750
+ type ProviderEventRecord = z.infer<typeof ProviderEventRecordSchema>;
751
+ type CollectionsClientOptions = {
752
+ baseUrl: string;
753
+ fetchImpl?: typeof fetch;
754
+ };
755
+ type CollectionsClient = {
756
+ upsertMerchantProfile: (accountId: string, input: UpsertMerchantProfileInput) => Promise<MerchantProfile>;
757
+ getMerchantProfile: (accountId: string) => Promise<MerchantProfile>;
758
+ createIntent: (input: CreateCollectionIntentInput) => Promise<CollectionIntent>;
759
+ getIntent: (intentId: string) => Promise<CollectionIntent>;
760
+ resolveIntent: (reference: string) => Promise<PublicCollectionIntent>;
761
+ pay: (input: PayCollectionInput) => Promise<CollectionPaymentResult>;
762
+ reportSummary: (input: {
763
+ fromMs: number;
764
+ toMs: number;
765
+ currency?: string;
766
+ }) => Promise<CollectionReportSummary>;
767
+ monthlyStatement: (input: {
768
+ year: number;
769
+ month: number;
770
+ currency?: string;
771
+ }) => Promise<CollectionStatement>;
772
+ createPayout: (input: CreatePayoutInput) => Promise<MerchantPayout>;
773
+ getPayout: (payoutId: string) => Promise<MerchantPayout>;
774
+ recordProviderEvent: (input: ProviderEventInput) => Promise<ProviderEventRecord>;
775
+ };
776
+ type PartnerCollectionsClient = Pick<CollectionsClient, 'createIntent' | 'getIntent' | 'reportSummary' | 'monthlyStatement' | 'createPayout' | 'getPayout' | 'recordProviderEvent'>;
777
+ type ConsumerCollectionsClient = Pick<CollectionsClient, 'resolveIntent' | 'pay'>;
778
+ declare function createCollectionsClient(opts: CollectionsClientOptions): CollectionsClient;
779
+ declare function createPartnerCollectionsClient(opts: CollectionsClientOptions): PartnerCollectionsClient;
780
+ declare function createConsumerCollectionsClient(opts: CollectionsClientOptions): ConsumerCollectionsClient;
781
+
12
782
  type FlurClientOptions = {
13
783
  baseUrl: string;
14
784
  fetchImpl?: typeof fetch;
@@ -152,6 +922,8 @@ type AccountActivityItem = {
152
922
  timestamp: string;
153
923
  };
154
924
  type AccountSummaryResponse = {
925
+ userId: string;
926
+ nuban: string | null;
155
927
  balance: number;
156
928
  currency: string;
157
929
  dailySendLimit: number;
@@ -215,6 +987,12 @@ type SendMoneyInput = {
215
987
  type SendMoneyOptions = AuthorizedOptions & {
216
988
  deviceId: string;
217
989
  };
990
+ type ResolveCollectionOptions = AuthorizedOptions;
991
+ type PayCollectionOptions = AuthorizedOptions & {
992
+ idempotencyKey?: string;
993
+ };
994
+ type ResolveCollectionResponse = PublicCollectionIntent;
995
+ type PayCollectionResponse = CollectionPaymentResult;
218
996
  type AuthorizeSendWithBiometricInput = {
219
997
  userId: string;
220
998
  deviceId: string;
@@ -263,6 +1041,8 @@ declare class FlurClient {
263
1041
  resolveRecipient(input: RecipientResolveInput, options: AuthorizedOptions): Promise<RecipientResolveResponse>;
264
1042
  createTransfer(input: TransferInput, options: CreateTransferOptions): Promise<TransferResponse>;
265
1043
  sendMoney(input: SendMoneyInput, options: SendMoneyOptions): Promise<TransferResponse>;
1044
+ resolveCollection(reference: string, options: ResolveCollectionOptions): Promise<ResolveCollectionResponse>;
1045
+ payCollection(input: PayCollectionInput, options: PayCollectionOptions): Promise<PayCollectionResponse>;
266
1046
  accountSummary(options: AuthorizedOptions): Promise<AccountSummaryResponse>;
267
1047
  listTransactions(options: ListTransactionsOptions): Promise<TransactionsListResponse>;
268
1048
  transactionDetail(transactionId: string, options: AuthorizedOptions): Promise<TransactionDetailResponse>;
@@ -666,6 +1446,7 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
666
1446
  }, "strip", z.ZodTypeAny, {
667
1447
  reference: string;
668
1448
  amountKobo: number;
1449
+ expiresAtMs: number;
669
1450
  merchantOAC: {
670
1451
  userId: string;
671
1452
  deviceId: string;
@@ -678,11 +1459,11 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
678
1459
  counterSeed: number;
679
1460
  issuerSig: string;
680
1461
  };
681
- expiresAtMs: number;
682
1462
  merchantSig: string;
683
1463
  }, {
684
1464
  reference: string;
685
1465
  amountKobo: number;
1466
+ expiresAtMs: number;
686
1467
  merchantOAC: {
687
1468
  userId: string;
688
1469
  deviceId: string;
@@ -695,7 +1476,6 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
695
1476
  counterSeed: number;
696
1477
  issuerSig: string;
697
1478
  };
698
- expiresAtMs: number;
699
1479
  merchantSig: string;
700
1480
  }>;
701
1481
  type OfflinePaymentRequest = z.infer<typeof OfflinePaymentRequestSchema>;
@@ -787,6 +1567,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
787
1567
  }, "strip", z.ZodTypeAny, {
788
1568
  reference: string;
789
1569
  amountKobo: number;
1570
+ expiresAtMs: number;
790
1571
  merchantOAC: {
791
1572
  userId: string;
792
1573
  deviceId: string;
@@ -799,11 +1580,11 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
799
1580
  counterSeed: number;
800
1581
  issuerSig: string;
801
1582
  };
802
- expiresAtMs: number;
803
1583
  merchantSig: string;
804
1584
  }, {
805
1585
  reference: string;
806
1586
  amountKobo: number;
1587
+ expiresAtMs: number;
807
1588
  merchantOAC: {
808
1589
  userId: string;
809
1590
  deviceId: string;
@@ -816,7 +1597,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
816
1597
  counterSeed: number;
817
1598
  issuerSig: string;
818
1599
  };
819
- expiresAtMs: number;
820
1600
  merchantSig: string;
821
1601
  }>;
822
1602
  payerOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -903,6 +1683,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
903
1683
  request: {
904
1684
  reference: string;
905
1685
  amountKobo: number;
1686
+ expiresAtMs: number;
906
1687
  merchantOAC: {
907
1688
  userId: string;
908
1689
  deviceId: string;
@@ -915,7 +1696,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
915
1696
  counterSeed: number;
916
1697
  issuerSig: string;
917
1698
  };
918
- expiresAtMs: number;
919
1699
  merchantSig: string;
920
1700
  };
921
1701
  payerOAC: {
@@ -936,6 +1716,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
936
1716
  request: {
937
1717
  reference: string;
938
1718
  amountKobo: number;
1719
+ expiresAtMs: number;
939
1720
  merchantOAC: {
940
1721
  userId: string;
941
1722
  deviceId: string;
@@ -948,7 +1729,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
948
1729
  counterSeed: number;
949
1730
  issuerSig: string;
950
1731
  };
951
- expiresAtMs: number;
952
1732
  merchantSig: string;
953
1733
  };
954
1734
  payerOAC: {
@@ -988,13 +1768,13 @@ declare function decodePaymentRequestQR(s: string): OfflinePaymentRequest;
988
1768
  declare function encodeAuthorizationQR(auth: OfflinePaymentAuthorization): string;
989
1769
  declare function decodeAuthorizationQR(s: string): OfflinePaymentAuthorization;
990
1770
 
991
- declare const PARTNER_SCOPES: readonly ["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"];
1771
+ declare const PARTNER_SCOPES: readonly ["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"];
992
1772
  type PartnerScope = (typeof PARTNER_SCOPES)[number];
993
1773
  declare const ApiCredentialPublicSchema: z.ZodObject<{
994
1774
  id: z.ZodString;
995
1775
  accountId: z.ZodString;
996
1776
  keyId: z.ZodString;
997
- scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"]>, "many">;
1777
+ scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"]>, "many">;
998
1778
  label: z.ZodNullable<z.ZodString>;
999
1779
  createdAtMs: z.ZodNumber;
1000
1780
  lastUsedAtMs: z.ZodNullable<z.ZodNumber>;
@@ -1002,19 +1782,19 @@ declare const ApiCredentialPublicSchema: z.ZodObject<{
1002
1782
  }, "strip", z.ZodTypeAny, {
1003
1783
  id: string;
1004
1784
  accountId: string;
1785
+ createdAtMs: number;
1005
1786
  keyId: string;
1006
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1787
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1007
1788
  label: string | null;
1008
- createdAtMs: number;
1009
1789
  lastUsedAtMs: number | null;
1010
1790
  revokedAtMs: number | null;
1011
1791
  }, {
1012
1792
  id: string;
1013
1793
  accountId: string;
1794
+ createdAtMs: number;
1014
1795
  keyId: string;
1015
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1796
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1016
1797
  label: string | null;
1017
- createdAtMs: number;
1018
1798
  lastUsedAtMs: number | null;
1019
1799
  revokedAtMs: number | null;
1020
1800
  }>;
@@ -1023,7 +1803,7 @@ declare const MintedApiCredentialSchema: z.ZodObject<{
1023
1803
  id: z.ZodString;
1024
1804
  accountId: z.ZodString;
1025
1805
  keyId: z.ZodString;
1026
- scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"]>, "many">;
1806
+ scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"]>, "many">;
1027
1807
  label: z.ZodNullable<z.ZodString>;
1028
1808
  createdAtMs: z.ZodNumber;
1029
1809
  lastUsedAtMs: z.ZodNullable<z.ZodNumber>;
@@ -1033,20 +1813,20 @@ declare const MintedApiCredentialSchema: z.ZodObject<{
1033
1813
  }, "strip", z.ZodTypeAny, {
1034
1814
  id: string;
1035
1815
  accountId: string;
1816
+ createdAtMs: number;
1036
1817
  keyId: string;
1037
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1818
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1038
1819
  label: string | null;
1039
- createdAtMs: number;
1040
1820
  lastUsedAtMs: number | null;
1041
1821
  revokedAtMs: number | null;
1042
1822
  secret: string;
1043
1823
  }, {
1044
1824
  id: string;
1045
1825
  accountId: string;
1826
+ createdAtMs: number;
1046
1827
  keyId: string;
1047
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1828
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1048
1829
  label: string | null;
1049
- createdAtMs: number;
1050
1830
  lastUsedAtMs: number | null;
1051
1831
  revokedAtMs: number | null;
1052
1832
  secret: string;
@@ -1065,6 +1845,8 @@ type PartnerClientOptions = {
1065
1845
  nowMs?: () => number;
1066
1846
  /** Override nonce generator for tests. */
1067
1847
  nonce?: () => string;
1848
+ /** Optional scope claim forwarded as X-Flur-Scope; backend credentials remain authoritative. */
1849
+ scope?: readonly PartnerScope[];
1068
1850
  };
1069
1851
  type PartnerSignResult = {
1070
1852
  authorization: string;
@@ -1131,22 +1913,22 @@ declare const OfflineTokenSchema: z.ZodObject<{
1131
1913
  issuerSig: z.ZodString;
1132
1914
  }, "strip", z.ZodTypeAny, {
1133
1915
  currency: string;
1134
- issuerSig: string;
1135
1916
  expiresAtMs: number;
1917
+ payerUserId: string;
1918
+ issuerSig: string;
1136
1919
  tokenId: string;
1137
1920
  tokenSerial: string;
1138
1921
  issuerAccountId: string;
1139
- payerUserId: string;
1140
1922
  maxAmountKobo: number;
1141
1923
  issuedAtMs: number;
1142
1924
  }, {
1143
1925
  currency: string;
1144
- issuerSig: string;
1145
1926
  expiresAtMs: number;
1927
+ payerUserId: string;
1928
+ issuerSig: string;
1146
1929
  tokenId: string;
1147
1930
  tokenSerial: string;
1148
1931
  issuerAccountId: string;
1149
- payerUserId: string;
1150
1932
  maxAmountKobo: number;
1151
1933
  issuedAtMs: number;
1152
1934
  }>;
@@ -1170,8 +1952,8 @@ declare const PaymentClaimSchema: z.ZodObject<{
1170
1952
  }, "strip", z.ZodTypeAny, {
1171
1953
  currency: string;
1172
1954
  amountKobo: number;
1173
- tokenSerial: string;
1174
1955
  payerUserId: string;
1956
+ tokenSerial: string;
1175
1957
  payeeUserId: string;
1176
1958
  payerNonce: string;
1177
1959
  payeeNonce: string;
@@ -1185,8 +1967,8 @@ declare const PaymentClaimSchema: z.ZodObject<{
1185
1967
  payeeSignature?: string | undefined;
1186
1968
  }, {
1187
1969
  amountKobo: number;
1188
- tokenSerial: string;
1189
1970
  payerUserId: string;
1971
+ tokenSerial: string;
1190
1972
  payeeUserId: string;
1191
1973
  payerNonce: string;
1192
1974
  payeeNonce: string;
@@ -1218,12 +2000,12 @@ declare const SettlementSchema: z.ZodObject<{
1218
2000
  }, "strip", z.ZodTypeAny, {
1219
2001
  status: "SETTLED" | "REVIEW" | "REJECTED";
1220
2002
  currency: string;
1221
- issuerSig: string;
1222
- amountKobo: number;
1223
2003
  createdAtMs: number;
2004
+ amountKobo: number;
2005
+ payerUserId: string;
2006
+ issuerSig: string;
1224
2007
  tokenSerial: string;
1225
2008
  issuerAccountId: string;
1226
- payerUserId: string;
1227
2009
  encounterId: string;
1228
2010
  payeeUserId: string;
1229
2011
  settlementId: string;
@@ -1232,12 +2014,12 @@ declare const SettlementSchema: z.ZodObject<{
1232
2014
  }, {
1233
2015
  status: "SETTLED" | "REVIEW" | "REJECTED";
1234
2016
  currency: string;
1235
- issuerSig: string;
1236
- amountKobo: number;
1237
2017
  createdAtMs: number;
2018
+ amountKobo: number;
2019
+ payerUserId: string;
2020
+ issuerSig: string;
1238
2021
  tokenSerial: string;
1239
2022
  issuerAccountId: string;
1240
- payerUserId: string;
1241
2023
  encounterId: string;
1242
2024
  payeeUserId: string;
1243
2025
  settlementId: string;
@@ -1263,12 +2045,12 @@ declare const SettleResponseSchema: z.ZodObject<{
1263
2045
  }, "strip", z.ZodTypeAny, {
1264
2046
  status: "SETTLED" | "REVIEW" | "REJECTED";
1265
2047
  currency: string;
1266
- issuerSig: string;
1267
- amountKobo: number;
1268
2048
  createdAtMs: number;
2049
+ amountKobo: number;
2050
+ payerUserId: string;
2051
+ issuerSig: string;
1269
2052
  tokenSerial: string;
1270
2053
  issuerAccountId: string;
1271
- payerUserId: string;
1272
2054
  encounterId: string;
1273
2055
  payeeUserId: string;
1274
2056
  settlementId: string;
@@ -1277,12 +2059,12 @@ declare const SettleResponseSchema: z.ZodObject<{
1277
2059
  }, {
1278
2060
  status: "SETTLED" | "REVIEW" | "REJECTED";
1279
2061
  currency: string;
1280
- issuerSig: string;
1281
- amountKobo: number;
1282
2062
  createdAtMs: number;
2063
+ amountKobo: number;
2064
+ payerUserId: string;
2065
+ issuerSig: string;
1283
2066
  tokenSerial: string;
1284
2067
  issuerAccountId: string;
1285
- payerUserId: string;
1286
2068
  encounterId: string;
1287
2069
  payeeUserId: string;
1288
2070
  settlementId: string;
@@ -1292,41 +2074,41 @@ declare const SettleResponseSchema: z.ZodObject<{
1292
2074
  encounterId: z.ZodString;
1293
2075
  replayed: z.ZodBoolean;
1294
2076
  }, "strip", z.ZodTypeAny, {
2077
+ replayed: boolean;
1295
2078
  encounterId: string;
1296
2079
  settlement: {
1297
2080
  status: "SETTLED" | "REVIEW" | "REJECTED";
1298
2081
  currency: string;
1299
- issuerSig: string;
1300
- amountKobo: number;
1301
2082
  createdAtMs: number;
2083
+ amountKobo: number;
2084
+ payerUserId: string;
2085
+ issuerSig: string;
1302
2086
  tokenSerial: string;
1303
2087
  issuerAccountId: string;
1304
- payerUserId: string;
1305
2088
  encounterId: string;
1306
2089
  payeeUserId: string;
1307
2090
  settlementId: string;
1308
2091
  settlementKey: string;
1309
2092
  receiptId: string | null;
1310
2093
  };
1311
- replayed: boolean;
1312
2094
  }, {
2095
+ replayed: boolean;
1313
2096
  encounterId: string;
1314
2097
  settlement: {
1315
2098
  status: "SETTLED" | "REVIEW" | "REJECTED";
1316
2099
  currency: string;
1317
- issuerSig: string;
1318
- amountKobo: number;
1319
2100
  createdAtMs: number;
2101
+ amountKobo: number;
2102
+ payerUserId: string;
2103
+ issuerSig: string;
1320
2104
  tokenSerial: string;
1321
2105
  issuerAccountId: string;
1322
- payerUserId: string;
1323
2106
  encounterId: string;
1324
2107
  payeeUserId: string;
1325
2108
  settlementId: string;
1326
2109
  settlementKey: string;
1327
2110
  receiptId: string | null;
1328
2111
  };
1329
- replayed: boolean;
1330
2112
  }>;
1331
2113
  type SettleResponse = z.infer<typeof SettleResponseSchema>;
1332
2114
  /**
@@ -1441,6 +2223,7 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1441
2223
  }, "strip", z.ZodTypeAny, {
1442
2224
  nonce: string;
1443
2225
  currency: string;
2226
+ metadata: Record<string, string | number | boolean | null>;
1444
2227
  validFromMs: number;
1445
2228
  validUntilMs: number;
1446
2229
  counterSeed: number;
@@ -1449,17 +2232,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1449
2232
  passId: string;
1450
2233
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1451
2234
  issuerId: string;
1452
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1453
- metadata: Record<string, string | number | boolean | null>;
2235
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1454
2236
  holderDeviceId: string;
1455
2237
  holderDevicePubkey: string;
1456
- cumulativeCapKobo?: number | undefined;
1457
2238
  amountKobo?: number | undefined;
2239
+ cumulativeCapKobo?: number | undefined;
1458
2240
  templateId?: string | undefined;
1459
2241
  holderUserId?: string | undefined;
1460
2242
  }, {
1461
2243
  nonce: string;
1462
2244
  currency: string;
2245
+ metadata: Record<string, string | number | boolean | null>;
1463
2246
  validFromMs: number;
1464
2247
  validUntilMs: number;
1465
2248
  counterSeed: number;
@@ -1468,17 +2251,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1468
2251
  passId: string;
1469
2252
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1470
2253
  issuerId: string;
1471
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1472
- metadata: Record<string, string | number | boolean | null>;
2254
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1473
2255
  holderDeviceId: string;
1474
2256
  holderDevicePubkey: string;
1475
- cumulativeCapKobo?: number | undefined;
1476
2257
  amountKobo?: number | undefined;
2258
+ cumulativeCapKobo?: number | undefined;
1477
2259
  templateId?: string | undefined;
1478
2260
  holderUserId?: string | undefined;
1479
2261
  }>, {
1480
2262
  nonce: string;
1481
2263
  currency: string;
2264
+ metadata: Record<string, string | number | boolean | null>;
1482
2265
  validFromMs: number;
1483
2266
  validUntilMs: number;
1484
2267
  counterSeed: number;
@@ -1487,17 +2270,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1487
2270
  passId: string;
1488
2271
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1489
2272
  issuerId: string;
1490
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1491
- metadata: Record<string, string | number | boolean | null>;
2273
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1492
2274
  holderDeviceId: string;
1493
2275
  holderDevicePubkey: string;
1494
- cumulativeCapKobo?: number | undefined;
1495
2276
  amountKobo?: number | undefined;
2277
+ cumulativeCapKobo?: number | undefined;
1496
2278
  templateId?: string | undefined;
1497
2279
  holderUserId?: string | undefined;
1498
2280
  }, {
1499
2281
  nonce: string;
1500
2282
  currency: string;
2283
+ metadata: Record<string, string | number | boolean | null>;
1501
2284
  validFromMs: number;
1502
2285
  validUntilMs: number;
1503
2286
  counterSeed: number;
@@ -1506,12 +2289,11 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1506
2289
  passId: string;
1507
2290
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1508
2291
  issuerId: string;
1509
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1510
- metadata: Record<string, string | number | boolean | null>;
2292
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1511
2293
  holderDeviceId: string;
1512
2294
  holderDevicePubkey: string;
1513
- cumulativeCapKobo?: number | undefined;
1514
2295
  amountKobo?: number | undefined;
2296
+ cumulativeCapKobo?: number | undefined;
1515
2297
  templateId?: string | undefined;
1516
2298
  holderUserId?: string | undefined;
1517
2299
  }>;
@@ -1568,6 +2350,7 @@ declare const RedemptionSchema: z.ZodObject<{
1568
2350
  }, "strip", z.ZodTypeAny, {
1569
2351
  nonce: string;
1570
2352
  currency: string;
2353
+ metadata: Record<string, string | number | boolean | null>;
1571
2354
  validFromMs: number;
1572
2355
  validUntilMs: number;
1573
2356
  counterSeed: number;
@@ -1576,17 +2359,17 @@ declare const RedemptionSchema: z.ZodObject<{
1576
2359
  passId: string;
1577
2360
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1578
2361
  issuerId: string;
1579
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1580
- metadata: Record<string, string | number | boolean | null>;
2362
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1581
2363
  holderDeviceId: string;
1582
2364
  holderDevicePubkey: string;
1583
- cumulativeCapKobo?: number | undefined;
1584
2365
  amountKobo?: number | undefined;
2366
+ cumulativeCapKobo?: number | undefined;
1585
2367
  templateId?: string | undefined;
1586
2368
  holderUserId?: string | undefined;
1587
2369
  }, {
1588
2370
  nonce: string;
1589
2371
  currency: string;
2372
+ metadata: Record<string, string | number | boolean | null>;
1590
2373
  validFromMs: number;
1591
2374
  validUntilMs: number;
1592
2375
  counterSeed: number;
@@ -1595,17 +2378,17 @@ declare const RedemptionSchema: z.ZodObject<{
1595
2378
  passId: string;
1596
2379
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1597
2380
  issuerId: string;
1598
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1599
- metadata: Record<string, string | number | boolean | null>;
2381
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1600
2382
  holderDeviceId: string;
1601
2383
  holderDevicePubkey: string;
1602
- cumulativeCapKobo?: number | undefined;
1603
2384
  amountKobo?: number | undefined;
2385
+ cumulativeCapKobo?: number | undefined;
1604
2386
  templateId?: string | undefined;
1605
2387
  holderUserId?: string | undefined;
1606
2388
  }>, {
1607
2389
  nonce: string;
1608
2390
  currency: string;
2391
+ metadata: Record<string, string | number | boolean | null>;
1609
2392
  validFromMs: number;
1610
2393
  validUntilMs: number;
1611
2394
  counterSeed: number;
@@ -1614,17 +2397,17 @@ declare const RedemptionSchema: z.ZodObject<{
1614
2397
  passId: string;
1615
2398
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1616
2399
  issuerId: string;
1617
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1618
- metadata: Record<string, string | number | boolean | null>;
2400
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1619
2401
  holderDeviceId: string;
1620
2402
  holderDevicePubkey: string;
1621
- cumulativeCapKobo?: number | undefined;
1622
2403
  amountKobo?: number | undefined;
2404
+ cumulativeCapKobo?: number | undefined;
1623
2405
  templateId?: string | undefined;
1624
2406
  holderUserId?: string | undefined;
1625
2407
  }, {
1626
2408
  nonce: string;
1627
2409
  currency: string;
2410
+ metadata: Record<string, string | number | boolean | null>;
1628
2411
  validFromMs: number;
1629
2412
  validUntilMs: number;
1630
2413
  counterSeed: number;
@@ -1633,12 +2416,11 @@ declare const RedemptionSchema: z.ZodObject<{
1633
2416
  passId: string;
1634
2417
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1635
2418
  issuerId: string;
1636
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1637
- metadata: Record<string, string | number | boolean | null>;
2419
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1638
2420
  holderDeviceId: string;
1639
2421
  holderDevicePubkey: string;
1640
- cumulativeCapKobo?: number | undefined;
1641
2422
  amountKobo?: number | undefined;
2423
+ cumulativeCapKobo?: number | undefined;
1642
2424
  templateId?: string | undefined;
1643
2425
  holderUserId?: string | undefined;
1644
2426
  }>;
@@ -1657,6 +2439,7 @@ declare const RedemptionSchema: z.ZodObject<{
1657
2439
  pass: {
1658
2440
  nonce: string;
1659
2441
  currency: string;
2442
+ metadata: Record<string, string | number | boolean | null>;
1660
2443
  validFromMs: number;
1661
2444
  validUntilMs: number;
1662
2445
  counterSeed: number;
@@ -1665,12 +2448,11 @@ declare const RedemptionSchema: z.ZodObject<{
1665
2448
  passId: string;
1666
2449
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1667
2450
  issuerId: string;
1668
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1669
- metadata: Record<string, string | number | boolean | null>;
2451
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1670
2452
  holderDeviceId: string;
1671
2453
  holderDevicePubkey: string;
1672
- cumulativeCapKobo?: number | undefined;
1673
2454
  amountKobo?: number | undefined;
2455
+ cumulativeCapKobo?: number | undefined;
1674
2456
  templateId?: string | undefined;
1675
2457
  holderUserId?: string | undefined;
1676
2458
  };
@@ -1684,6 +2466,7 @@ declare const RedemptionSchema: z.ZodObject<{
1684
2466
  pass: {
1685
2467
  nonce: string;
1686
2468
  currency: string;
2469
+ metadata: Record<string, string | number | boolean | null>;
1687
2470
  validFromMs: number;
1688
2471
  validUntilMs: number;
1689
2472
  counterSeed: number;
@@ -1692,12 +2475,11 @@ declare const RedemptionSchema: z.ZodObject<{
1692
2475
  passId: string;
1693
2476
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1694
2477
  issuerId: string;
1695
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1696
- metadata: Record<string, string | number | boolean | null>;
2478
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1697
2479
  holderDeviceId: string;
1698
2480
  holderDevicePubkey: string;
1699
- cumulativeCapKobo?: number | undefined;
1700
2481
  amountKobo?: number | undefined;
2482
+ cumulativeCapKobo?: number | undefined;
1701
2483
  templateId?: string | undefined;
1702
2484
  holderUserId?: string | undefined;
1703
2485
  };
@@ -1761,54 +2543,54 @@ declare const ReceiptSchema: z.ZodEffects<z.ZodObject<{
1761
2543
  issuerSig: z.ZodString;
1762
2544
  }, "strip", z.ZodTypeAny, {
1763
2545
  currency: string;
1764
- issuerSig: string;
1765
2546
  amountKobo: number;
1766
2547
  payerUserId: string;
2548
+ payload: Record<string, string | number | boolean | null>;
2549
+ issuerSig: string;
1767
2550
  issuedAtMs: number;
1768
2551
  payeeUserId: string;
1769
2552
  receiptId: string;
1770
2553
  issuerId: string;
1771
2554
  channel: "pass" | "cash";
1772
- payload: Record<string, string | number | boolean | null>;
1773
2555
  intentId?: string | undefined;
1774
2556
  passRedemptionId?: string | undefined;
1775
2557
  }, {
1776
2558
  currency: string;
1777
- issuerSig: string;
1778
2559
  amountKobo: number;
1779
2560
  payerUserId: string;
2561
+ payload: Record<string, string | number | boolean | null>;
2562
+ issuerSig: string;
1780
2563
  issuedAtMs: number;
1781
2564
  payeeUserId: string;
1782
2565
  receiptId: string;
1783
2566
  issuerId: string;
1784
2567
  channel: "pass" | "cash";
1785
- payload: Record<string, string | number | boolean | null>;
1786
2568
  intentId?: string | undefined;
1787
2569
  passRedemptionId?: string | undefined;
1788
2570
  }>, {
1789
2571
  currency: string;
1790
- issuerSig: string;
1791
2572
  amountKobo: number;
1792
2573
  payerUserId: string;
2574
+ payload: Record<string, string | number | boolean | null>;
2575
+ issuerSig: string;
1793
2576
  issuedAtMs: number;
1794
2577
  payeeUserId: string;
1795
2578
  receiptId: string;
1796
2579
  issuerId: string;
1797
2580
  channel: "pass" | "cash";
1798
- payload: Record<string, string | number | boolean | null>;
1799
2581
  intentId?: string | undefined;
1800
2582
  passRedemptionId?: string | undefined;
1801
2583
  }, {
1802
2584
  currency: string;
1803
- issuerSig: string;
1804
2585
  amountKobo: number;
1805
2586
  payerUserId: string;
2587
+ payload: Record<string, string | number | boolean | null>;
2588
+ issuerSig: string;
1806
2589
  issuedAtMs: number;
1807
2590
  payeeUserId: string;
1808
2591
  receiptId: string;
1809
2592
  issuerId: string;
1810
2593
  channel: "pass" | "cash";
1811
- payload: Record<string, string | number | boolean | null>;
1812
2594
  intentId?: string | undefined;
1813
2595
  passRedemptionId?: string | undefined;
1814
2596
  }>;
@@ -1952,8 +2734,8 @@ type FlurInitOptions = {
1952
2734
  fetchImpl?: typeof fetch;
1953
2735
  /** When true, all QR generation is performed locally without any network call. */
1954
2736
  offlineMode?: boolean;
1955
- /** Optional scope claim forwarded as `X-Flur-Scope`. Backend remains authoritative. */
1956
- scope?: readonly string[];
2737
+ /** Optional scope claim forwarded as `X-Flur-Scope`. Backend credentials remain authoritative. */
2738
+ scope?: readonly PartnerScope[];
1957
2739
  };
1958
2740
  type FlurPaymentEvent = {
1959
2741
  type: string;
@@ -1977,6 +2759,8 @@ type CashNamespace = {
1977
2759
  type FlurHandle = CashNamespace & {
1978
2760
  /** Cash / money: NQR generation, payment subscriptions, transfers (future). */
1979
2761
  cash: CashNamespace;
2762
+ /** Collections: merchant NQR intents, reports, statements, payouts. */
2763
+ collections: PartnerCollectionsClient;
1980
2764
  /** Passes: tickets, vouchers, loyalty, transit. */
1981
2765
  passes: PassesClient;
1982
2766
  /** Receipts: signed, immutable views over cash + pass events. */
@@ -2273,7 +3057,7 @@ declare const OACRecordSchema: z.ZodObject<{
2273
3057
  revokedAtMs: z.ZodNullable<z.ZodNumber>;
2274
3058
  holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2275
3059
  }, "strip", z.ZodTypeAny, {
2276
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3060
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2277
3061
  issuerSig: string;
2278
3062
  revokedAtMs: number | null;
2279
3063
  oac: {
@@ -2295,7 +3079,7 @@ declare const OACRecordSchema: z.ZodObject<{
2295
3079
  supersededAtMs: number | null;
2296
3080
  holdId?: string | null | undefined;
2297
3081
  }, {
2298
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3082
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2299
3083
  issuerSig: string;
2300
3084
  revokedAtMs: number | null;
2301
3085
  oac: {
@@ -2395,12 +3179,12 @@ declare const OfflineHoldRecordSchema: z.ZodObject<{
2395
3179
  closedAtMs: z.ZodNullable<z.ZodNumber>;
2396
3180
  isTrusted: z.ZodOptional<z.ZodBoolean>;
2397
3181
  }, "strip", z.ZodTypeAny, {
2398
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3182
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2399
3183
  userId: string;
2400
3184
  deviceId: string;
2401
3185
  currency: string;
2402
- amountKobo: number;
2403
3186
  createdAtMs: number;
3187
+ amountKobo: number;
2404
3188
  holdId: string;
2405
3189
  installId: string | null;
2406
3190
  partnerId: string;
@@ -2414,12 +3198,12 @@ declare const OfflineHoldRecordSchema: z.ZodObject<{
2414
3198
  closedAtMs: number | null;
2415
3199
  isTrusted?: boolean | undefined;
2416
3200
  }, {
2417
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3201
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2418
3202
  userId: string;
2419
3203
  deviceId: string;
2420
3204
  currency: string;
2421
- amountKobo: number;
2422
3205
  createdAtMs: number;
3206
+ amountKobo: number;
2423
3207
  holdId: string;
2424
3208
  installId: string | null;
2425
3209
  partnerId: string;
@@ -2455,12 +3239,12 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2455
3239
  closedAtMs: z.ZodNullable<z.ZodNumber>;
2456
3240
  isTrusted: z.ZodOptional<z.ZodBoolean>;
2457
3241
  }, "strip", z.ZodTypeAny, {
2458
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3242
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2459
3243
  userId: string;
2460
3244
  deviceId: string;
2461
3245
  currency: string;
2462
- amountKobo: number;
2463
3246
  createdAtMs: number;
3247
+ amountKobo: number;
2464
3248
  holdId: string;
2465
3249
  installId: string | null;
2466
3250
  partnerId: string;
@@ -2474,12 +3258,12 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2474
3258
  closedAtMs: number | null;
2475
3259
  isTrusted?: boolean | undefined;
2476
3260
  }, {
2477
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3261
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2478
3262
  userId: string;
2479
3263
  deviceId: string;
2480
3264
  currency: string;
2481
- amountKobo: number;
2482
3265
  createdAtMs: number;
3266
+ amountKobo: number;
2483
3267
  holdId: string;
2484
3268
  installId: string | null;
2485
3269
  partnerId: string;
@@ -2543,7 +3327,7 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2543
3327
  revokedAtMs: z.ZodNullable<z.ZodNumber>;
2544
3328
  holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2545
3329
  }, "strip", z.ZodTypeAny, {
2546
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3330
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2547
3331
  issuerSig: string;
2548
3332
  revokedAtMs: number | null;
2549
3333
  oac: {
@@ -2565,7 +3349,7 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2565
3349
  supersededAtMs: number | null;
2566
3350
  holdId?: string | null | undefined;
2567
3351
  }, {
2568
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3352
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2569
3353
  issuerSig: string;
2570
3354
  revokedAtMs: number | null;
2571
3355
  oac: {
@@ -2589,7 +3373,7 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2589
3373
  }>;
2590
3374
  }, "strip", z.ZodTypeAny, {
2591
3375
  oac: {
2592
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3376
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2593
3377
  issuerSig: string;
2594
3378
  revokedAtMs: number | null;
2595
3379
  oac: {
@@ -2612,12 +3396,12 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2612
3396
  holdId?: string | null | undefined;
2613
3397
  };
2614
3398
  hold: {
2615
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3399
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2616
3400
  userId: string;
2617
3401
  deviceId: string;
2618
3402
  currency: string;
2619
- amountKobo: number;
2620
3403
  createdAtMs: number;
3404
+ amountKobo: number;
2621
3405
  holdId: string;
2622
3406
  installId: string | null;
2623
3407
  partnerId: string;
@@ -2633,7 +3417,7 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2633
3417
  };
2634
3418
  }, {
2635
3419
  oac: {
2636
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3420
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2637
3421
  issuerSig: string;
2638
3422
  revokedAtMs: number | null;
2639
3423
  oac: {
@@ -2656,12 +3440,12 @@ declare const EnableOfflineResultSchema: z.ZodObject<{
2656
3440
  holdId?: string | null | undefined;
2657
3441
  };
2658
3442
  hold: {
2659
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3443
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2660
3444
  userId: string;
2661
3445
  deviceId: string;
2662
3446
  currency: string;
2663
- amountKobo: number;
2664
3447
  createdAtMs: number;
3448
+ amountKobo: number;
2665
3449
  holdId: string;
2666
3450
  installId: string | null;
2667
3451
  partnerId: string;
@@ -2698,12 +3482,12 @@ declare const DisableOfflineResultSchema: z.ZodObject<{
2698
3482
  closedAtMs: z.ZodNullable<z.ZodNumber>;
2699
3483
  isTrusted: z.ZodOptional<z.ZodBoolean>;
2700
3484
  }, "strip", z.ZodTypeAny, {
2701
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3485
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2702
3486
  userId: string;
2703
3487
  deviceId: string;
2704
3488
  currency: string;
2705
- amountKobo: number;
2706
3489
  createdAtMs: number;
3490
+ amountKobo: number;
2707
3491
  holdId: string;
2708
3492
  installId: string | null;
2709
3493
  partnerId: string;
@@ -2717,12 +3501,12 @@ declare const DisableOfflineResultSchema: z.ZodObject<{
2717
3501
  closedAtMs: number | null;
2718
3502
  isTrusted?: boolean | undefined;
2719
3503
  }, {
2720
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3504
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2721
3505
  userId: string;
2722
3506
  deviceId: string;
2723
3507
  currency: string;
2724
- amountKobo: number;
2725
3508
  createdAtMs: number;
3509
+ amountKobo: number;
2726
3510
  holdId: string;
2727
3511
  installId: string | null;
2728
3512
  partnerId: string;
@@ -2740,12 +3524,12 @@ declare const DisableOfflineResultSchema: z.ZodObject<{
2740
3524
  settledClaims: z.ZodNumber;
2741
3525
  }, "strip", z.ZodTypeAny, {
2742
3526
  hold: {
2743
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3527
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2744
3528
  userId: string;
2745
3529
  deviceId: string;
2746
3530
  currency: string;
2747
- amountKobo: number;
2748
3531
  createdAtMs: number;
3532
+ amountKobo: number;
2749
3533
  holdId: string;
2750
3534
  installId: string | null;
2751
3535
  partnerId: string;
@@ -2763,12 +3547,12 @@ declare const DisableOfflineResultSchema: z.ZodObject<{
2763
3547
  settledClaims: number;
2764
3548
  }, {
2765
3549
  hold: {
2766
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3550
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2767
3551
  userId: string;
2768
3552
  deviceId: string;
2769
3553
  currency: string;
2770
- amountKobo: number;
2771
3554
  createdAtMs: number;
3555
+ amountKobo: number;
2772
3556
  holdId: string;
2773
3557
  installId: string | null;
2774
3558
  partnerId: string;
@@ -2807,12 +3591,12 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2807
3591
  closedAtMs: z.ZodNullable<z.ZodNumber>;
2808
3592
  isTrusted: z.ZodOptional<z.ZodBoolean>;
2809
3593
  }, "strip", z.ZodTypeAny, {
2810
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3594
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2811
3595
  userId: string;
2812
3596
  deviceId: string;
2813
3597
  currency: string;
2814
- amountKobo: number;
2815
3598
  createdAtMs: number;
3599
+ amountKobo: number;
2816
3600
  holdId: string;
2817
3601
  installId: string | null;
2818
3602
  partnerId: string;
@@ -2826,12 +3610,12 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2826
3610
  closedAtMs: number | null;
2827
3611
  isTrusted?: boolean | undefined;
2828
3612
  }, {
2829
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3613
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2830
3614
  userId: string;
2831
3615
  deviceId: string;
2832
3616
  currency: string;
2833
- amountKobo: number;
2834
3617
  createdAtMs: number;
3618
+ amountKobo: number;
2835
3619
  holdId: string;
2836
3620
  installId: string | null;
2837
3621
  partnerId: string;
@@ -2895,7 +3679,7 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2895
3679
  revokedAtMs: z.ZodNullable<z.ZodNumber>;
2896
3680
  holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2897
3681
  }, "strip", z.ZodTypeAny, {
2898
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3682
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2899
3683
  issuerSig: string;
2900
3684
  revokedAtMs: number | null;
2901
3685
  oac: {
@@ -2917,7 +3701,7 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2917
3701
  supersededAtMs: number | null;
2918
3702
  holdId?: string | null | undefined;
2919
3703
  }, {
2920
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3704
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2921
3705
  issuerSig: string;
2922
3706
  revokedAtMs: number | null;
2923
3707
  oac: {
@@ -2941,7 +3725,7 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2941
3725
  }>>;
2942
3726
  }, "strip", z.ZodTypeAny, {
2943
3727
  active: {
2944
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3728
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2945
3729
  issuerSig: string;
2946
3730
  revokedAtMs: number | null;
2947
3731
  oac: {
@@ -2964,12 +3748,12 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2964
3748
  holdId?: string | null | undefined;
2965
3749
  } | null;
2966
3750
  hold: {
2967
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3751
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
2968
3752
  userId: string;
2969
3753
  deviceId: string;
2970
3754
  currency: string;
2971
- amountKobo: number;
2972
3755
  createdAtMs: number;
3756
+ amountKobo: number;
2973
3757
  holdId: string;
2974
3758
  installId: string | null;
2975
3759
  partnerId: string;
@@ -2985,7 +3769,7 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
2985
3769
  } | null;
2986
3770
  }, {
2987
3771
  active: {
2988
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3772
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
2989
3773
  issuerSig: string;
2990
3774
  revokedAtMs: number | null;
2991
3775
  oac: {
@@ -3008,12 +3792,12 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3008
3792
  holdId?: string | null | undefined;
3009
3793
  } | null;
3010
3794
  hold: {
3011
- status: "active" | "revoked" | "closed" | "disabling" | "draining" | "placing" | "failed";
3795
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3012
3796
  userId: string;
3013
3797
  deviceId: string;
3014
3798
  currency: string;
3015
- amountKobo: number;
3016
3799
  createdAtMs: number;
3800
+ amountKobo: number;
3017
3801
  holdId: string;
3018
3802
  installId: string | null;
3019
3803
  partnerId: string;
@@ -3080,7 +3864,7 @@ declare const OfflineStateResultSchema: z.ZodObject<{
3080
3864
  revokedAtMs: z.ZodNullable<z.ZodNumber>;
3081
3865
  holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3082
3866
  }, "strip", z.ZodTypeAny, {
3083
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3867
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3084
3868
  issuerSig: string;
3085
3869
  revokedAtMs: number | null;
3086
3870
  oac: {
@@ -3102,7 +3886,7 @@ declare const OfflineStateResultSchema: z.ZodObject<{
3102
3886
  supersededAtMs: number | null;
3103
3887
  holdId?: string | null | undefined;
3104
3888
  }, {
3105
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3889
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3106
3890
  issuerSig: string;
3107
3891
  revokedAtMs: number | null;
3108
3892
  oac: {
@@ -3126,7 +3910,7 @@ declare const OfflineStateResultSchema: z.ZodObject<{
3126
3910
  }>>;
3127
3911
  }, "strip", z.ZodTypeAny, {
3128
3912
  active: {
3129
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3913
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3130
3914
  issuerSig: string;
3131
3915
  revokedAtMs: number | null;
3132
3916
  oac: {
@@ -3150,7 +3934,7 @@ declare const OfflineStateResultSchema: z.ZodObject<{
3150
3934
  } | null;
3151
3935
  }, {
3152
3936
  active: {
3153
- status: "active" | "expired" | "revoked" | "closed" | "superseded" | "disabling" | "draining";
3937
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3154
3938
  issuerSig: string;
3155
3939
  revokedAtMs: number | null;
3156
3940
  oac: {
@@ -3244,31 +4028,31 @@ declare const ConsumerSettlementSchema: z.ZodObject<{
3244
4028
  }, "strip", z.ZodTypeAny, {
3245
4029
  status: "SETTLED" | "REVIEW";
3246
4030
  currency: string;
3247
- issuerSig: string;
3248
- amountKobo: number;
3249
4031
  createdAtMs: number;
4032
+ amountKobo: number;
3250
4033
  payerUserId: string;
4034
+ ledgerRef: string | null;
4035
+ issuerSig: string;
3251
4036
  encounterId: string;
3252
4037
  payeeUserId: string;
3253
4038
  settlementId: string;
3254
4039
  settlementKey: string;
3255
4040
  oacId: string;
3256
4041
  reviewReason: string | null;
3257
- ledgerRef: string | null;
3258
4042
  }, {
3259
4043
  status: "SETTLED" | "REVIEW";
3260
4044
  currency: string;
3261
- issuerSig: string;
3262
- amountKobo: number;
3263
4045
  createdAtMs: number;
4046
+ amountKobo: number;
3264
4047
  payerUserId: string;
4048
+ ledgerRef: string | null;
4049
+ issuerSig: string;
3265
4050
  encounterId: string;
3266
4051
  payeeUserId: string;
3267
4052
  settlementId: string;
3268
4053
  settlementKey: string;
3269
4054
  oacId: string;
3270
4055
  reviewReason: string | null;
3271
- ledgerRef: string | null;
3272
4056
  }>;
3273
4057
  type ConsumerSettlement = z.infer<typeof ConsumerSettlementSchema>;
3274
4058
  declare const ConsumerSettleResultSchema: z.ZodObject<{
@@ -3289,70 +4073,70 @@ declare const ConsumerSettleResultSchema: z.ZodObject<{
3289
4073
  }, "strip", z.ZodTypeAny, {
3290
4074
  status: "SETTLED" | "REVIEW";
3291
4075
  currency: string;
3292
- issuerSig: string;
3293
- amountKobo: number;
3294
4076
  createdAtMs: number;
4077
+ amountKobo: number;
3295
4078
  payerUserId: string;
4079
+ ledgerRef: string | null;
4080
+ issuerSig: string;
3296
4081
  encounterId: string;
3297
4082
  payeeUserId: string;
3298
4083
  settlementId: string;
3299
4084
  settlementKey: string;
3300
4085
  oacId: string;
3301
4086
  reviewReason: string | null;
3302
- ledgerRef: string | null;
3303
4087
  }, {
3304
4088
  status: "SETTLED" | "REVIEW";
3305
4089
  currency: string;
3306
- issuerSig: string;
3307
- amountKobo: number;
3308
4090
  createdAtMs: number;
4091
+ amountKobo: number;
3309
4092
  payerUserId: string;
4093
+ ledgerRef: string | null;
4094
+ issuerSig: string;
3310
4095
  encounterId: string;
3311
4096
  payeeUserId: string;
3312
4097
  settlementId: string;
3313
4098
  settlementKey: string;
3314
4099
  oacId: string;
3315
4100
  reviewReason: string | null;
3316
- ledgerRef: string | null;
3317
4101
  }>;
3318
4102
  encounterId: z.ZodString;
3319
4103
  replayed: z.ZodBoolean;
3320
4104
  }, "strip", z.ZodTypeAny, {
4105
+ replayed: boolean;
3321
4106
  encounterId: string;
3322
4107
  settlement: {
3323
4108
  status: "SETTLED" | "REVIEW";
3324
4109
  currency: string;
3325
- issuerSig: string;
3326
- amountKobo: number;
3327
4110
  createdAtMs: number;
4111
+ amountKobo: number;
3328
4112
  payerUserId: string;
4113
+ ledgerRef: string | null;
4114
+ issuerSig: string;
3329
4115
  encounterId: string;
3330
4116
  payeeUserId: string;
3331
4117
  settlementId: string;
3332
4118
  settlementKey: string;
3333
4119
  oacId: string;
3334
4120
  reviewReason: string | null;
3335
- ledgerRef: string | null;
3336
4121
  };
3337
- replayed: boolean;
3338
4122
  }, {
4123
+ replayed: boolean;
3339
4124
  encounterId: string;
3340
4125
  settlement: {
3341
4126
  status: "SETTLED" | "REVIEW";
3342
4127
  currency: string;
3343
- issuerSig: string;
3344
- amountKobo: number;
3345
4128
  createdAtMs: number;
4129
+ amountKobo: number;
3346
4130
  payerUserId: string;
4131
+ ledgerRef: string | null;
4132
+ issuerSig: string;
3347
4133
  encounterId: string;
3348
4134
  payeeUserId: string;
3349
4135
  settlementId: string;
3350
4136
  settlementKey: string;
3351
4137
  oacId: string;
3352
4138
  reviewReason: string | null;
3353
- ledgerRef: string | null;
3354
4139
  };
3355
- replayed: boolean;
3356
4140
  }>;
3357
4141
  type ConsumerSettleResult = z.infer<typeof ConsumerSettleResultSchema>;
3358
4142
  declare const RevokeDeviceKeyInputSchema: z.ZodObject<{
@@ -3387,4 +4171,758 @@ type MeOfflineClient = {
3387
4171
  };
3388
4172
  declare function createMeOfflineClient(opts: MeOfflineClientOptions): MeOfflineClient;
3389
4173
 
3390
- export { ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, type CashNamespace, type ConsumerOAC, type OACRecord as ConsumerOACRecord, OACRecordSchema as ConsumerOACRecordSchema, ConsumerOACSchema, type ConsumerPaymentClaim, ConsumerPaymentClaimSchema, type ConsumerSettleResult, ConsumerSettleResultSchema, type ConsumerSettlement, ConsumerSettlementSchema, type CreateBusinessAccountInput, type CreatePayLinkResponse, type CreateTransferOptions, type DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, type DisableOfflineInput, DisableOfflineInputSchema, type DisableOfflineResult, DisableOfflineResultSchema, type Ed25519KeyPair, type EnableOfflineInput, EnableOfflineInputSchema, type EnableOfflineResult, EnableOfflineResultSchema, FIELD, FlurApiError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, type HmacFetchOptions, type IssueOACInput, IssueOACInputSchema, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type ListPassesInput, type ListPassesResponse, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, type MeOfflineClient, type MeOfflineClientOptions, type MembershipRole, type MerchantAccountInfo, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, type OfflineHoldRecord, OfflineHoldRecordSchema, type OfflinePaymentAuthorization, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineStateResult, OfflineStateResultSchema, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerScope, type PartnerSignResult, type Pass, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PaymentClaim, PaymentClaimSchema, type PinSetInput, type PinVerifyInput, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, type Receipt, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceKeyInput, RegisterDeviceKeyInputSchema, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolvePayLinkResponse, type RevokeDeviceKeyInput, RevokeDeviceKeyInputSchema, type RevokePassInput, type RoutingHint, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementSchema, type SignedConsumerOAC, SignedConsumerOACSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, bodySha256Hex, buildAuthorization, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeEncounterId, constantTimeEqual, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflineSettlementsClient, createPassesClient, createReceiptsClient, decodeAuthorizationQR, decodeBase45, decodePaymentRequestQR, encodeAuthorizationQR, encodeBase45, encodeNQR, encodePaymentRequestQR, formatAmount, generateDynamicQR, generateKeyPair, generateStaticQR, init, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, publicKeyFromPrivate, readTLV, routingHint, sign, signAuthorization, signCanonical, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verify, verifyAuthorization, verifyCanonical, verifyOAC, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
4174
+ /**
4175
+ * Partner-funded wallet rails SDK.
4176
+ *
4177
+ * Provides two clients:
4178
+ * - `createPartnerFundingClient(partnerClient)` — uses partner HMAC for
4179
+ * the bank/merchant partner endpoints (funding webhook, payout events,
4180
+ * daily reconciliation). The caller MUST have minted credentials with
4181
+ * the appropriate scopes (`partner:funding:write`, `partner:payout:write`,
4182
+ * `partner:reconciliation:read`).
4183
+ * - `createConsumerWithdrawalsClient(opts)` — session-bearer auth for the
4184
+ * consumer endpoints (linked payout destinations, withdrawals).
4185
+ *
4186
+ * Schemas mirror `flur-backend/src/partner-funding/types.ts`. Money is
4187
+ * always represented in MINOR units (e.g. kobo for NGN). BIGINT-bearing
4188
+ * response fields are serialized as integer strings to avoid JS number
4189
+ * precision issues; reserve balances and imbalances may be signed.
4190
+ */
4191
+
4192
+ declare const PARTNER_KINDS: readonly ["bank", "merchant"];
4193
+ type PartnerKind = (typeof PARTNER_KINDS)[number];
4194
+ declare const CUSTODIAL_MODES: readonly ["agent_of_bank", "flur_virtual_pool"];
4195
+ type CustodialMode = (typeof CUSTODIAL_MODES)[number];
4196
+ declare const PARTNER_PROFILE_STATUSES: readonly ["active", "suspended", "closed"];
4197
+ type PartnerProfileStatus = (typeof PARTNER_PROFILE_STATUSES)[number];
4198
+ declare const PARTNER_FUNDING_DIRECTIONS: readonly ["credit", "debit"];
4199
+ type PartnerFundingDirection = (typeof PARTNER_FUNDING_DIRECTIONS)[number];
4200
+ declare const PARTNER_FUNDING_STATUSES: readonly ["pending", "posted", "failed"];
4201
+ type PartnerFundingStatus = (typeof PARTNER_FUNDING_STATUSES)[number];
4202
+ declare const PAYOUT_DESTINATION_STATUSES: readonly ["pending", "verified", "disabled"];
4203
+ type PayoutDestinationStatus = (typeof PAYOUT_DESTINATION_STATUSES)[number];
4204
+ declare const WITHDRAWAL_STATES: readonly ["requested", "submitted", "processing", "paid", "failed", "reversed"];
4205
+ type WithdrawalState = (typeof WITHDRAWAL_STATES)[number];
4206
+ declare const PartnerProfileSchema: z.ZodObject<{
4207
+ partnerAccountId: z.ZodString;
4208
+ kind: z.ZodEnum<["bank", "merchant"]>;
4209
+ custodialMode: z.ZodEnum<["agent_of_bank", "flur_virtual_pool"]>;
4210
+ displayName: z.ZodString;
4211
+ bankCode: z.ZodNullable<z.ZodString>;
4212
+ poolAccountNumber: z.ZodNullable<z.ZodString>;
4213
+ status: z.ZodEnum<["active", "suspended", "closed"]>;
4214
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4215
+ createdAtMs: z.ZodNumber;
4216
+ updatedAtMs: z.ZodNumber;
4217
+ }, "strip", z.ZodTypeAny, {
4218
+ status: "active" | "suspended" | "closed";
4219
+ displayName: string;
4220
+ metadata: Record<string, unknown>;
4221
+ createdAtMs: number;
4222
+ updatedAtMs: number;
4223
+ kind: "bank" | "merchant";
4224
+ partnerAccountId: string;
4225
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4226
+ bankCode: string | null;
4227
+ poolAccountNumber: string | null;
4228
+ }, {
4229
+ status: "active" | "suspended" | "closed";
4230
+ displayName: string;
4231
+ metadata: Record<string, unknown>;
4232
+ createdAtMs: number;
4233
+ updatedAtMs: number;
4234
+ kind: "bank" | "merchant";
4235
+ partnerAccountId: string;
4236
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4237
+ bankCode: string | null;
4238
+ poolAccountNumber: string | null;
4239
+ }>;
4240
+ type PartnerProfile = z.infer<typeof PartnerProfileSchema>;
4241
+ declare const UpsertPartnerProfileInputSchema: z.ZodObject<{
4242
+ kind: z.ZodEnum<["bank", "merchant"]>;
4243
+ custodialMode: z.ZodEnum<["agent_of_bank", "flur_virtual_pool"]>;
4244
+ displayName: z.ZodString;
4245
+ bankCode: z.ZodOptional<z.ZodString>;
4246
+ poolAccountNumber: z.ZodOptional<z.ZodString>;
4247
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4248
+ }, "strip", z.ZodTypeAny, {
4249
+ displayName: string;
4250
+ kind: "bank" | "merchant";
4251
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4252
+ metadata?: Record<string, unknown> | undefined;
4253
+ bankCode?: string | undefined;
4254
+ poolAccountNumber?: string | undefined;
4255
+ }, {
4256
+ displayName: string;
4257
+ kind: "bank" | "merchant";
4258
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4259
+ metadata?: Record<string, unknown> | undefined;
4260
+ bankCode?: string | undefined;
4261
+ poolAccountNumber?: string | undefined;
4262
+ }>;
4263
+ type UpsertPartnerProfileInput = z.infer<typeof UpsertPartnerProfileInputSchema>;
4264
+ declare const PartnerFundingEventInputSchema: z.ZodObject<{
4265
+ externalRef: z.ZodString;
4266
+ direction: z.ZodOptional<z.ZodEnum<["credit", "debit"]>>;
4267
+ userId: z.ZodOptional<z.ZodString>;
4268
+ accountId: z.ZodOptional<z.ZodString>;
4269
+ amountMinor: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
4270
+ currency: z.ZodEffects<z.ZodString, string, string>;
4271
+ fundingSource: z.ZodOptional<z.ZodString>;
4272
+ providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4273
+ }, "strip", z.ZodTypeAny, {
4274
+ amountMinor: string | number;
4275
+ currency: string;
4276
+ externalRef: string;
4277
+ userId?: string | undefined;
4278
+ direction?: "credit" | "debit" | undefined;
4279
+ accountId?: string | undefined;
4280
+ fundingSource?: string | undefined;
4281
+ providerMetadata?: Record<string, unknown> | undefined;
4282
+ }, {
4283
+ amountMinor: string | number;
4284
+ currency: string;
4285
+ externalRef: string;
4286
+ userId?: string | undefined;
4287
+ direction?: "credit" | "debit" | undefined;
4288
+ accountId?: string | undefined;
4289
+ fundingSource?: string | undefined;
4290
+ providerMetadata?: Record<string, unknown> | undefined;
4291
+ }>;
4292
+ type PartnerFundingEventInput = z.infer<typeof PartnerFundingEventInputSchema>;
4293
+ declare const PartnerFundingSchema: z.ZodObject<{
4294
+ fundingId: z.ZodString;
4295
+ partnerId: z.ZodString;
4296
+ accountId: z.ZodString;
4297
+ userId: z.ZodNullable<z.ZodString>;
4298
+ direction: z.ZodEnum<["credit", "debit"]>;
4299
+ currency: z.ZodString;
4300
+ amountMinor: z.ZodString;
4301
+ externalRef: z.ZodString;
4302
+ status: z.ZodEnum<["pending", "posted", "failed"]>;
4303
+ fundingSource: z.ZodString;
4304
+ ledgerRef: z.ZodString;
4305
+ providerMetadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4306
+ createdAtMs: z.ZodNumber;
4307
+ updatedAtMs: z.ZodNumber;
4308
+ }, "strip", z.ZodTypeAny, {
4309
+ status: "pending" | "failed" | "posted";
4310
+ userId: string | null;
4311
+ amountMinor: string;
4312
+ currency: string;
4313
+ direction: "credit" | "debit";
4314
+ accountId: string;
4315
+ createdAtMs: number;
4316
+ updatedAtMs: number;
4317
+ ledgerRef: string;
4318
+ partnerId: string;
4319
+ externalRef: string;
4320
+ fundingSource: string;
4321
+ providerMetadata: Record<string, unknown>;
4322
+ fundingId: string;
4323
+ }, {
4324
+ status: "pending" | "failed" | "posted";
4325
+ userId: string | null;
4326
+ amountMinor: string;
4327
+ currency: string;
4328
+ direction: "credit" | "debit";
4329
+ accountId: string;
4330
+ createdAtMs: number;
4331
+ updatedAtMs: number;
4332
+ ledgerRef: string;
4333
+ partnerId: string;
4334
+ externalRef: string;
4335
+ fundingSource: string;
4336
+ providerMetadata: Record<string, unknown>;
4337
+ fundingId: string;
4338
+ }>;
4339
+ type PartnerFunding = z.infer<typeof PartnerFundingSchema>;
4340
+ declare const IngestFundingResultSchema: z.ZodObject<{
4341
+ funding: z.ZodObject<{
4342
+ fundingId: z.ZodString;
4343
+ partnerId: z.ZodString;
4344
+ accountId: z.ZodString;
4345
+ userId: z.ZodNullable<z.ZodString>;
4346
+ direction: z.ZodEnum<["credit", "debit"]>;
4347
+ currency: z.ZodString;
4348
+ amountMinor: z.ZodString;
4349
+ externalRef: z.ZodString;
4350
+ status: z.ZodEnum<["pending", "posted", "failed"]>;
4351
+ fundingSource: z.ZodString;
4352
+ ledgerRef: z.ZodString;
4353
+ providerMetadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4354
+ createdAtMs: z.ZodNumber;
4355
+ updatedAtMs: z.ZodNumber;
4356
+ }, "strip", z.ZodTypeAny, {
4357
+ status: "pending" | "failed" | "posted";
4358
+ userId: string | null;
4359
+ amountMinor: string;
4360
+ currency: string;
4361
+ direction: "credit" | "debit";
4362
+ accountId: string;
4363
+ createdAtMs: number;
4364
+ updatedAtMs: number;
4365
+ ledgerRef: string;
4366
+ partnerId: string;
4367
+ externalRef: string;
4368
+ fundingSource: string;
4369
+ providerMetadata: Record<string, unknown>;
4370
+ fundingId: string;
4371
+ }, {
4372
+ status: "pending" | "failed" | "posted";
4373
+ userId: string | null;
4374
+ amountMinor: string;
4375
+ currency: string;
4376
+ direction: "credit" | "debit";
4377
+ accountId: string;
4378
+ createdAtMs: number;
4379
+ updatedAtMs: number;
4380
+ ledgerRef: string;
4381
+ partnerId: string;
4382
+ externalRef: string;
4383
+ fundingSource: string;
4384
+ providerMetadata: Record<string, unknown>;
4385
+ fundingId: string;
4386
+ }>;
4387
+ replayed: z.ZodBoolean;
4388
+ }, "strip", z.ZodTypeAny, {
4389
+ replayed: boolean;
4390
+ funding: {
4391
+ status: "pending" | "failed" | "posted";
4392
+ userId: string | null;
4393
+ amountMinor: string;
4394
+ currency: string;
4395
+ direction: "credit" | "debit";
4396
+ accountId: string;
4397
+ createdAtMs: number;
4398
+ updatedAtMs: number;
4399
+ ledgerRef: string;
4400
+ partnerId: string;
4401
+ externalRef: string;
4402
+ fundingSource: string;
4403
+ providerMetadata: Record<string, unknown>;
4404
+ fundingId: string;
4405
+ };
4406
+ }, {
4407
+ replayed: boolean;
4408
+ funding: {
4409
+ status: "pending" | "failed" | "posted";
4410
+ userId: string | null;
4411
+ amountMinor: string;
4412
+ currency: string;
4413
+ direction: "credit" | "debit";
4414
+ accountId: string;
4415
+ createdAtMs: number;
4416
+ updatedAtMs: number;
4417
+ ledgerRef: string;
4418
+ partnerId: string;
4419
+ externalRef: string;
4420
+ fundingSource: string;
4421
+ providerMetadata: Record<string, unknown>;
4422
+ fundingId: string;
4423
+ };
4424
+ }>;
4425
+ type IngestFundingResult = z.infer<typeof IngestFundingResultSchema>;
4426
+ declare const PayoutDestinationSchema: z.ZodObject<{
4427
+ destinationId: z.ZodString;
4428
+ accountId: z.ZodString;
4429
+ partnerId: z.ZodString;
4430
+ bankCode: z.ZodString;
4431
+ accountNumber: z.ZodString;
4432
+ accountName: z.ZodString;
4433
+ status: z.ZodEnum<["pending", "verified", "disabled"]>;
4434
+ verifiedAtMs: z.ZodNullable<z.ZodNumber>;
4435
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4436
+ createdAtMs: z.ZodNumber;
4437
+ updatedAtMs: z.ZodNumber;
4438
+ }, "strip", z.ZodTypeAny, {
4439
+ status: "pending" | "verified" | "disabled";
4440
+ accountId: string;
4441
+ metadata: Record<string, unknown>;
4442
+ createdAtMs: number;
4443
+ updatedAtMs: number;
4444
+ partnerId: string;
4445
+ bankCode: string;
4446
+ destinationId: string;
4447
+ accountNumber: string;
4448
+ accountName: string;
4449
+ verifiedAtMs: number | null;
4450
+ }, {
4451
+ status: "pending" | "verified" | "disabled";
4452
+ accountId: string;
4453
+ metadata: Record<string, unknown>;
4454
+ createdAtMs: number;
4455
+ updatedAtMs: number;
4456
+ partnerId: string;
4457
+ bankCode: string;
4458
+ destinationId: string;
4459
+ accountNumber: string;
4460
+ accountName: string;
4461
+ verifiedAtMs: number | null;
4462
+ }>;
4463
+ type PayoutDestination = z.infer<typeof PayoutDestinationSchema>;
4464
+ declare const CreatePayoutDestinationInputSchema: z.ZodObject<{
4465
+ partnerId: z.ZodString;
4466
+ bankCode: z.ZodString;
4467
+ accountNumber: z.ZodString;
4468
+ accountName: z.ZodString;
4469
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4470
+ }, "strip", z.ZodTypeAny, {
4471
+ partnerId: string;
4472
+ bankCode: string;
4473
+ accountNumber: string;
4474
+ accountName: string;
4475
+ metadata?: Record<string, unknown> | undefined;
4476
+ }, {
4477
+ partnerId: string;
4478
+ bankCode: string;
4479
+ accountNumber: string;
4480
+ accountName: string;
4481
+ metadata?: Record<string, unknown> | undefined;
4482
+ }>;
4483
+ type CreatePayoutDestinationInput = z.infer<typeof CreatePayoutDestinationInputSchema>;
4484
+ declare const ListPayoutDestinationsResultSchema: z.ZodObject<{
4485
+ items: z.ZodArray<z.ZodObject<{
4486
+ destinationId: z.ZodString;
4487
+ accountId: z.ZodString;
4488
+ partnerId: z.ZodString;
4489
+ bankCode: z.ZodString;
4490
+ accountNumber: z.ZodString;
4491
+ accountName: z.ZodString;
4492
+ status: z.ZodEnum<["pending", "verified", "disabled"]>;
4493
+ verifiedAtMs: z.ZodNullable<z.ZodNumber>;
4494
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4495
+ createdAtMs: z.ZodNumber;
4496
+ updatedAtMs: z.ZodNumber;
4497
+ }, "strip", z.ZodTypeAny, {
4498
+ status: "pending" | "verified" | "disabled";
4499
+ accountId: string;
4500
+ metadata: Record<string, unknown>;
4501
+ createdAtMs: number;
4502
+ updatedAtMs: number;
4503
+ partnerId: string;
4504
+ bankCode: string;
4505
+ destinationId: string;
4506
+ accountNumber: string;
4507
+ accountName: string;
4508
+ verifiedAtMs: number | null;
4509
+ }, {
4510
+ status: "pending" | "verified" | "disabled";
4511
+ accountId: string;
4512
+ metadata: Record<string, unknown>;
4513
+ createdAtMs: number;
4514
+ updatedAtMs: number;
4515
+ partnerId: string;
4516
+ bankCode: string;
4517
+ destinationId: string;
4518
+ accountNumber: string;
4519
+ accountName: string;
4520
+ verifiedAtMs: number | null;
4521
+ }>, "many">;
4522
+ }, "strip", z.ZodTypeAny, {
4523
+ items: {
4524
+ status: "pending" | "verified" | "disabled";
4525
+ accountId: string;
4526
+ metadata: Record<string, unknown>;
4527
+ createdAtMs: number;
4528
+ updatedAtMs: number;
4529
+ partnerId: string;
4530
+ bankCode: string;
4531
+ destinationId: string;
4532
+ accountNumber: string;
4533
+ accountName: string;
4534
+ verifiedAtMs: number | null;
4535
+ }[];
4536
+ }, {
4537
+ items: {
4538
+ status: "pending" | "verified" | "disabled";
4539
+ accountId: string;
4540
+ metadata: Record<string, unknown>;
4541
+ createdAtMs: number;
4542
+ updatedAtMs: number;
4543
+ partnerId: string;
4544
+ bankCode: string;
4545
+ destinationId: string;
4546
+ accountNumber: string;
4547
+ accountName: string;
4548
+ verifiedAtMs: number | null;
4549
+ }[];
4550
+ }>;
4551
+ type ListPayoutDestinationsResult = z.infer<typeof ListPayoutDestinationsResultSchema>;
4552
+ declare const WithdrawalSchema: z.ZodObject<{
4553
+ withdrawalId: z.ZodString;
4554
+ accountId: z.ZodString;
4555
+ userId: z.ZodString;
4556
+ partnerId: z.ZodString;
4557
+ destinationId: z.ZodString;
4558
+ currency: z.ZodString;
4559
+ amountMinor: z.ZodString;
4560
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4561
+ idempotencyKey: z.ZodString;
4562
+ providerRef: z.ZodNullable<z.ZodString>;
4563
+ lastError: z.ZodNullable<z.ZodString>;
4564
+ ledgerRef: z.ZodString;
4565
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4566
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4567
+ createdAtMs: z.ZodNumber;
4568
+ updatedAtMs: z.ZodNumber;
4569
+ }, "strip", z.ZodTypeAny, {
4570
+ userId: string;
4571
+ amountMinor: string;
4572
+ currency: string;
4573
+ accountId: string;
4574
+ metadata: Record<string, unknown>;
4575
+ createdAtMs: number;
4576
+ updatedAtMs: number;
4577
+ idempotencyKey: string;
4578
+ ledgerRef: string;
4579
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4580
+ partnerId: string;
4581
+ destinationId: string;
4582
+ withdrawalId: string;
4583
+ providerRef: string | null;
4584
+ lastError: string | null;
4585
+ reverseLedgerRef: string | null;
4586
+ }, {
4587
+ userId: string;
4588
+ amountMinor: string;
4589
+ currency: string;
4590
+ accountId: string;
4591
+ metadata: Record<string, unknown>;
4592
+ createdAtMs: number;
4593
+ updatedAtMs: number;
4594
+ idempotencyKey: string;
4595
+ ledgerRef: string;
4596
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4597
+ partnerId: string;
4598
+ destinationId: string;
4599
+ withdrawalId: string;
4600
+ providerRef: string | null;
4601
+ lastError: string | null;
4602
+ reverseLedgerRef: string | null;
4603
+ }>;
4604
+ type Withdrawal = z.infer<typeof WithdrawalSchema>;
4605
+ declare const CreateWithdrawalInputSchema: z.ZodObject<{
4606
+ destinationId: z.ZodString;
4607
+ amountMinor: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
4608
+ currency: z.ZodEffects<z.ZodString, string, string>;
4609
+ idempotencyKey: z.ZodString;
4610
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4611
+ }, "strip", z.ZodTypeAny, {
4612
+ amountMinor: string | number;
4613
+ currency: string;
4614
+ idempotencyKey: string;
4615
+ destinationId: string;
4616
+ metadata?: Record<string, unknown> | undefined;
4617
+ }, {
4618
+ amountMinor: string | number;
4619
+ currency: string;
4620
+ idempotencyKey: string;
4621
+ destinationId: string;
4622
+ metadata?: Record<string, unknown> | undefined;
4623
+ }>;
4624
+ type CreateWithdrawalInput = z.infer<typeof CreateWithdrawalInputSchema>;
4625
+ declare const CreateWithdrawalResultSchema: z.ZodObject<{
4626
+ withdrawal: z.ZodObject<{
4627
+ withdrawalId: z.ZodString;
4628
+ accountId: z.ZodString;
4629
+ userId: z.ZodString;
4630
+ partnerId: z.ZodString;
4631
+ destinationId: z.ZodString;
4632
+ currency: z.ZodString;
4633
+ amountMinor: z.ZodString;
4634
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4635
+ idempotencyKey: z.ZodString;
4636
+ providerRef: z.ZodNullable<z.ZodString>;
4637
+ lastError: z.ZodNullable<z.ZodString>;
4638
+ ledgerRef: z.ZodString;
4639
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4640
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4641
+ createdAtMs: z.ZodNumber;
4642
+ updatedAtMs: z.ZodNumber;
4643
+ }, "strip", z.ZodTypeAny, {
4644
+ userId: string;
4645
+ amountMinor: string;
4646
+ currency: string;
4647
+ accountId: string;
4648
+ metadata: Record<string, unknown>;
4649
+ createdAtMs: number;
4650
+ updatedAtMs: number;
4651
+ idempotencyKey: string;
4652
+ ledgerRef: string;
4653
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4654
+ partnerId: string;
4655
+ destinationId: string;
4656
+ withdrawalId: string;
4657
+ providerRef: string | null;
4658
+ lastError: string | null;
4659
+ reverseLedgerRef: string | null;
4660
+ }, {
4661
+ userId: string;
4662
+ amountMinor: string;
4663
+ currency: string;
4664
+ accountId: string;
4665
+ metadata: Record<string, unknown>;
4666
+ createdAtMs: number;
4667
+ updatedAtMs: number;
4668
+ idempotencyKey: string;
4669
+ ledgerRef: string;
4670
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4671
+ partnerId: string;
4672
+ destinationId: string;
4673
+ withdrawalId: string;
4674
+ providerRef: string | null;
4675
+ lastError: string | null;
4676
+ reverseLedgerRef: string | null;
4677
+ }>;
4678
+ replayed: z.ZodBoolean;
4679
+ }, "strip", z.ZodTypeAny, {
4680
+ replayed: boolean;
4681
+ withdrawal: {
4682
+ userId: string;
4683
+ amountMinor: string;
4684
+ currency: string;
4685
+ accountId: string;
4686
+ metadata: Record<string, unknown>;
4687
+ createdAtMs: number;
4688
+ updatedAtMs: number;
4689
+ idempotencyKey: string;
4690
+ ledgerRef: string;
4691
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4692
+ partnerId: string;
4693
+ destinationId: string;
4694
+ withdrawalId: string;
4695
+ providerRef: string | null;
4696
+ lastError: string | null;
4697
+ reverseLedgerRef: string | null;
4698
+ };
4699
+ }, {
4700
+ replayed: boolean;
4701
+ withdrawal: {
4702
+ userId: string;
4703
+ amountMinor: string;
4704
+ currency: string;
4705
+ accountId: string;
4706
+ metadata: Record<string, unknown>;
4707
+ createdAtMs: number;
4708
+ updatedAtMs: number;
4709
+ idempotencyKey: string;
4710
+ ledgerRef: string;
4711
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4712
+ partnerId: string;
4713
+ destinationId: string;
4714
+ withdrawalId: string;
4715
+ providerRef: string | null;
4716
+ lastError: string | null;
4717
+ reverseLedgerRef: string | null;
4718
+ };
4719
+ }>;
4720
+ type CreateWithdrawalResult = z.infer<typeof CreateWithdrawalResultSchema>;
4721
+ declare const PayoutEventInputSchema: z.ZodObject<{
4722
+ externalRef: z.ZodString;
4723
+ withdrawalId: z.ZodOptional<z.ZodString>;
4724
+ state: z.ZodEnum<["submitted", "processing", "paid", "failed"]>;
4725
+ providerRef: z.ZodOptional<z.ZodString>;
4726
+ failureCode: z.ZodOptional<z.ZodString>;
4727
+ failureMessage: z.ZodOptional<z.ZodString>;
4728
+ providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4729
+ }, "strip", z.ZodTypeAny, {
4730
+ state: "paid" | "failed" | "processing" | "submitted";
4731
+ externalRef: string;
4732
+ failureCode?: string | undefined;
4733
+ failureMessage?: string | undefined;
4734
+ providerMetadata?: Record<string, unknown> | undefined;
4735
+ withdrawalId?: string | undefined;
4736
+ providerRef?: string | undefined;
4737
+ }, {
4738
+ state: "paid" | "failed" | "processing" | "submitted";
4739
+ externalRef: string;
4740
+ failureCode?: string | undefined;
4741
+ failureMessage?: string | undefined;
4742
+ providerMetadata?: Record<string, unknown> | undefined;
4743
+ withdrawalId?: string | undefined;
4744
+ providerRef?: string | undefined;
4745
+ }>;
4746
+ type PayoutEventInput = z.infer<typeof PayoutEventInputSchema>;
4747
+ declare const RecordPayoutEventResultSchema: z.ZodObject<{
4748
+ withdrawal: z.ZodObject<{
4749
+ withdrawalId: z.ZodString;
4750
+ accountId: z.ZodString;
4751
+ userId: z.ZodString;
4752
+ partnerId: z.ZodString;
4753
+ destinationId: z.ZodString;
4754
+ currency: z.ZodString;
4755
+ amountMinor: z.ZodString;
4756
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4757
+ idempotencyKey: z.ZodString;
4758
+ providerRef: z.ZodNullable<z.ZodString>;
4759
+ lastError: z.ZodNullable<z.ZodString>;
4760
+ ledgerRef: z.ZodString;
4761
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4762
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4763
+ createdAtMs: z.ZodNumber;
4764
+ updatedAtMs: z.ZodNumber;
4765
+ }, "strip", z.ZodTypeAny, {
4766
+ userId: string;
4767
+ amountMinor: string;
4768
+ currency: string;
4769
+ accountId: string;
4770
+ metadata: Record<string, unknown>;
4771
+ createdAtMs: number;
4772
+ updatedAtMs: number;
4773
+ idempotencyKey: string;
4774
+ ledgerRef: string;
4775
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4776
+ partnerId: string;
4777
+ destinationId: string;
4778
+ withdrawalId: string;
4779
+ providerRef: string | null;
4780
+ lastError: string | null;
4781
+ reverseLedgerRef: string | null;
4782
+ }, {
4783
+ userId: string;
4784
+ amountMinor: string;
4785
+ currency: string;
4786
+ accountId: string;
4787
+ metadata: Record<string, unknown>;
4788
+ createdAtMs: number;
4789
+ updatedAtMs: number;
4790
+ idempotencyKey: string;
4791
+ ledgerRef: string;
4792
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4793
+ partnerId: string;
4794
+ destinationId: string;
4795
+ withdrawalId: string;
4796
+ providerRef: string | null;
4797
+ lastError: string | null;
4798
+ reverseLedgerRef: string | null;
4799
+ }>;
4800
+ replayed: z.ZodBoolean;
4801
+ }, "strip", z.ZodTypeAny, {
4802
+ replayed: boolean;
4803
+ withdrawal: {
4804
+ userId: string;
4805
+ amountMinor: string;
4806
+ currency: string;
4807
+ accountId: string;
4808
+ metadata: Record<string, unknown>;
4809
+ createdAtMs: number;
4810
+ updatedAtMs: number;
4811
+ idempotencyKey: string;
4812
+ ledgerRef: string;
4813
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4814
+ partnerId: string;
4815
+ destinationId: string;
4816
+ withdrawalId: string;
4817
+ providerRef: string | null;
4818
+ lastError: string | null;
4819
+ reverseLedgerRef: string | null;
4820
+ };
4821
+ }, {
4822
+ replayed: boolean;
4823
+ withdrawal: {
4824
+ userId: string;
4825
+ amountMinor: string;
4826
+ currency: string;
4827
+ accountId: string;
4828
+ metadata: Record<string, unknown>;
4829
+ createdAtMs: number;
4830
+ updatedAtMs: number;
4831
+ idempotencyKey: string;
4832
+ ledgerRef: string;
4833
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4834
+ partnerId: string;
4835
+ destinationId: string;
4836
+ withdrawalId: string;
4837
+ providerRef: string | null;
4838
+ lastError: string | null;
4839
+ reverseLedgerRef: string | null;
4840
+ };
4841
+ }>;
4842
+ type RecordPayoutEventResult = z.infer<typeof RecordPayoutEventResultSchema>;
4843
+ declare const ReconciliationReportSchema: z.ZodObject<{
4844
+ partnerId: z.ZodString;
4845
+ currency: z.ZodString;
4846
+ fromMs: z.ZodNumber;
4847
+ toMs: z.ZodNumber;
4848
+ fundingsCreditMinor: z.ZodString;
4849
+ fundingsDebitMinor: z.ZodString;
4850
+ withdrawalsPaidMinor: z.ZodString;
4851
+ withdrawalsReversedMinor: z.ZodString;
4852
+ withdrawalsInFlightMinor: z.ZodString;
4853
+ expectedReserveBalanceMinor: z.ZodString;
4854
+ actualReserveBalanceMinor: z.ZodString;
4855
+ imbalanceMinor: z.ZodString;
4856
+ generatedAtMs: z.ZodNumber;
4857
+ }, "strip", z.ZodTypeAny, {
4858
+ currency: string;
4859
+ fromMs: number;
4860
+ toMs: number;
4861
+ partnerId: string;
4862
+ fundingsCreditMinor: string;
4863
+ fundingsDebitMinor: string;
4864
+ withdrawalsPaidMinor: string;
4865
+ withdrawalsReversedMinor: string;
4866
+ withdrawalsInFlightMinor: string;
4867
+ expectedReserveBalanceMinor: string;
4868
+ actualReserveBalanceMinor: string;
4869
+ imbalanceMinor: string;
4870
+ generatedAtMs: number;
4871
+ }, {
4872
+ currency: string;
4873
+ fromMs: number;
4874
+ toMs: number;
4875
+ partnerId: string;
4876
+ fundingsCreditMinor: string;
4877
+ fundingsDebitMinor: string;
4878
+ withdrawalsPaidMinor: string;
4879
+ withdrawalsReversedMinor: string;
4880
+ withdrawalsInFlightMinor: string;
4881
+ expectedReserveBalanceMinor: string;
4882
+ actualReserveBalanceMinor: string;
4883
+ imbalanceMinor: string;
4884
+ generatedAtMs: number;
4885
+ }>;
4886
+ type ReconciliationReport = z.infer<typeof ReconciliationReportSchema>;
4887
+ type PartnerFundingClient = {
4888
+ /** Submit a funding event (idempotent on externalRef per partner). */
4889
+ ingestFunding: (input: PartnerFundingEventInput) => Promise<IngestFundingResult>;
4890
+ /** Send a payout state update (idempotent on terminal states). */
4891
+ recordPayoutEvent: (input: PayoutEventInput) => Promise<RecordPayoutEventResult>;
4892
+ /** Fetch the daily reconciliation report. */
4893
+ reconciliation: (input: {
4894
+ currency: string;
4895
+ fromMs?: number;
4896
+ toMs?: number;
4897
+ }) => Promise<ReconciliationReport>;
4898
+ };
4899
+ declare function createPartnerFundingClient(partner: FlurPartnerClient): PartnerFundingClient;
4900
+ type ConsumerWithdrawalsClientOptions = {
4901
+ baseUrl: string;
4902
+ /** Session-authenticated fetch (Authorization: Bearer <session-token>). */
4903
+ fetchImpl?: typeof fetch;
4904
+ };
4905
+ type ConsumerWithdrawalsClient = {
4906
+ listDestinations: () => Promise<ListPayoutDestinationsResult>;
4907
+ createDestination: (input: CreatePayoutDestinationInput) => Promise<PayoutDestination>;
4908
+ verifyDestination: (destinationId: string) => Promise<PayoutDestination>;
4909
+ disableDestination: (destinationId: string) => Promise<PayoutDestination>;
4910
+ createWithdrawal: (input: CreateWithdrawalInput) => Promise<CreateWithdrawalResult>;
4911
+ getWithdrawal: (withdrawalId: string) => Promise<Withdrawal>;
4912
+ };
4913
+ declare function createConsumerWithdrawalsClient(opts: ConsumerWithdrawalsClientOptions): ConsumerWithdrawalsClient;
4914
+ /**
4915
+ * Partner profile upsert is session-authenticated on the backend (a member
4916
+ * of the partner account must perform the action), so it uses a regular
4917
+ * session-bearer fetch rather than the partner HMAC client.
4918
+ */
4919
+ type PartnerProfileAdminClientOptions = {
4920
+ baseUrl: string;
4921
+ fetchImpl?: typeof fetch;
4922
+ };
4923
+ type PartnerProfileAdminClient = {
4924
+ upsertProfile: (partnerAccountId: string, input: UpsertPartnerProfileInput) => Promise<PartnerProfile>;
4925
+ };
4926
+ declare function createPartnerProfileAdminClient(opts: PartnerProfileAdminClientOptions): PartnerProfileAdminClient;
4927
+
4928
+ export { ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, COLLECTION_INTENT_STATUSES, COLLECTION_PAYMENT_STATUSES, CUSTODIAL_MODES, type CashNamespace, type CollectionIntent, CollectionIntentSchema, type CollectionPayment, type CollectionPaymentResult, CollectionPaymentResultSchema, CollectionPaymentSchema, type CollectionReportSummary, CollectionReportSummarySchema, type CollectionStatement, CollectionStatementSchema, type CollectionsClient, type CollectionsClientOptions, type ConsumerCollectionsClient, type ConsumerOAC, type OACRecord as ConsumerOACRecord, OACRecordSchema as ConsumerOACRecordSchema, ConsumerOACSchema, type ConsumerPaymentClaim, ConsumerPaymentClaimSchema, type ConsumerSettleResult, ConsumerSettleResultSchema, type ConsumerSettlement, ConsumerSettlementSchema, type ConsumerWithdrawalsClient, type ConsumerWithdrawalsClientOptions, type CreateBusinessAccountInput, type CreateCollectionIntentInput, CreateCollectionIntentInputSchema, type CreatePayLinkResponse, type CreatePayoutDestinationInput, CreatePayoutDestinationInputSchema, type CreatePayoutInput, CreatePayoutInputSchema, type CreateTransferOptions, type CreateWithdrawalInput, CreateWithdrawalInputSchema, type CreateWithdrawalResult, CreateWithdrawalResultSchema, type CustodialMode, type DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, type DisableOfflineInput, DisableOfflineInputSchema, type DisableOfflineResult, DisableOfflineResultSchema, type Ed25519KeyPair, type EnableOfflineInput, EnableOfflineInputSchema, type EnableOfflineResult, EnableOfflineResultSchema, FIELD, FlurApiError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, type HmacFetchOptions, type IngestFundingResult, IngestFundingResultSchema, type IssueOACInput, IssueOACInputSchema, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type ListPassesInput, type ListPassesResponse, type ListPayoutDestinationsResult, ListPayoutDestinationsResultSchema, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, MERCHANT_PAYOUT_STATUSES, MERCHANT_PROFILE_STATUSES, type MeOfflineClient, type MeOfflineClientOptions, type MembershipRole, type MerchantAccountInfo, type MerchantPayout, MerchantPayoutSchema, type MerchantProfile, MerchantProfileSchema, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, type OfflineHoldRecord, OfflineHoldRecordSchema, type OfflinePaymentAuthorization, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineStateResult, OfflineStateResultSchema, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, PARTNER_FUNDING_DIRECTIONS, PARTNER_FUNDING_STATUSES, PARTNER_KINDS, PARTNER_PROFILE_STATUSES, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, PAYOUT_DESTINATION_STATUSES, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerCollectionsClient, type PartnerFunding, type PartnerFundingClient, type PartnerFundingDirection, type PartnerFundingEventInput, PartnerFundingEventInputSchema, PartnerFundingSchema, type PartnerFundingStatus, type PartnerKind, type PartnerProfile, type PartnerProfileAdminClient, type PartnerProfileAdminClientOptions, PartnerProfileSchema, type PartnerProfileStatus, type PartnerScope, type PartnerSignResult, type Pass, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PayCollectionInput, PayCollectionInputSchema, type PayCollectionOptions, type PayCollectionResponse, type PaymentClaim, PaymentClaimSchema, type PayoutDestination, PayoutDestinationSchema, type PayoutDestinationStatus, type PayoutEventInput, PayoutEventInputSchema, type PinSetInput, type PinVerifyInput, type ProviderEventInput, ProviderEventInputSchema, type ProviderEventRecord, ProviderEventRecordSchema, type PublicCollectionIntent, PublicCollectionIntentSchema, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, type Receipt, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type ReconciliationReport, ReconciliationReportSchema, type RecordPayoutEventResult, RecordPayoutEventResultSchema, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceKeyInput, RegisterDeviceKeyInputSchema, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolveCollectionOptions, type ResolveCollectionResponse, type ResolvePayLinkResponse, RevokeDeviceKeyInputSchema, type RevokePassInput, type RoutingHint, SETTLEMENT_SCHEDULES, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementSchema, type SignedConsumerOAC, SignedConsumerOACSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, type UpsertMerchantProfileInput, UpsertMerchantProfileInputSchema, type UpsertPartnerProfileInput, UpsertPartnerProfileInputSchema, WITHDRAWAL_STATES, type Withdrawal, WithdrawalSchema, type WithdrawalState, bodySha256Hex, buildAuthorization, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeEncounterId, constantTimeEqual, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createCollectionsClient, createConsumerCollectionsClient, createConsumerWithdrawalsClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflineSettlementsClient, createPartnerCollectionsClient, createPartnerFundingClient, createPartnerProfileAdminClient, createPassesClient, createReceiptsClient, decodeAuthorizationQR, decodeBase45, decodePaymentRequestQR, encodeAuthorizationQR, encodeBase45, encodeNQR, encodePaymentRequestQR, formatAmount, generateDynamicQR, generateKeyPair, generateStaticQR, init, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, publicKeyFromPrivate, readTLV, routingHint, sign, signAuthorization, signCanonical, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verify, verifyAuthorization, verifyCanonical, verifyOAC, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };