xendit-fn 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +442 -0
  3. package/lib/index.cjs +1588 -0
  4. package/lib/index.d.cts +9574 -0
  5. package/lib/index.d.ts +7 -0
  6. package/lib/index.d.ts.map +1 -0
  7. package/lib/index.esm.d.ts +9574 -0
  8. package/lib/index.esm.js +1544 -0
  9. package/lib/sdk/axios.d.ts +3 -0
  10. package/lib/sdk/axios.d.ts.map +1 -0
  11. package/lib/sdk/card/index.d.ts +2 -0
  12. package/lib/sdk/card/index.d.ts.map +1 -0
  13. package/lib/sdk/card/schema.d.ts +586 -0
  14. package/lib/sdk/card/schema.d.ts.map +1 -0
  15. package/lib/sdk/common.d.ts +28 -0
  16. package/lib/sdk/common.d.ts.map +1 -0
  17. package/lib/sdk/customer/index.d.ts +7 -0
  18. package/lib/sdk/customer/index.d.ts.map +1 -0
  19. package/lib/sdk/customer/schema.d.ts +5933 -0
  20. package/lib/sdk/customer/schema.d.ts.map +1 -0
  21. package/lib/sdk/ewallet/create.d.ts +173 -0
  22. package/lib/sdk/ewallet/create.d.ts.map +1 -0
  23. package/lib/sdk/ewallet/schema.d.ts +783 -0
  24. package/lib/sdk/ewallet/schema.d.ts.map +1 -0
  25. package/lib/sdk/index.d.ts +2201 -0
  26. package/lib/sdk/index.d.ts.map +1 -0
  27. package/lib/sdk/invoice/index.d.ts +8 -0
  28. package/lib/sdk/invoice/index.d.ts.map +1 -0
  29. package/lib/sdk/invoice/schema.d.ts +2198 -0
  30. package/lib/sdk/invoice/schema.d.ts.map +1 -0
  31. package/lib/sdk/payment-method/index.d.ts +7 -0
  32. package/lib/sdk/payment-method/index.d.ts.map +1 -0
  33. package/lib/sdk/payment-method/schema.d.ts +990 -0
  34. package/lib/sdk/payment-method/schema.d.ts.map +1 -0
  35. package/lib/utils/errors.d.ts +58 -0
  36. package/lib/utils/errors.d.ts.map +1 -0
  37. package/lib/utils/index.d.ts +6 -0
  38. package/lib/utils/index.d.ts.map +1 -0
  39. package/lib/utils/pagination.d.ts +134 -0
  40. package/lib/utils/pagination.d.ts.map +1 -0
  41. package/lib/utils/rate-limit.d.ts +90 -0
  42. package/lib/utils/rate-limit.d.ts.map +1 -0
  43. package/lib/utils/type-guards.d.ts +13 -0
  44. package/lib/utils/type-guards.d.ts.map +1 -0
  45. package/lib/utils/webhook.d.ts +101 -0
  46. package/lib/utils/webhook.d.ts.map +1 -0
  47. package/package.json +83 -0
@@ -0,0 +1,2201 @@
1
+ import { type RateLimitConfig } from "../utils/rate-limit";
2
+ export type { Customer, CustomerResource, GetCustomer, GetCustomerByRefId, GetCustomerByRefIdResource, UpdateParams, } from "./customer/schema";
3
+ export type { EWalletChargeParams, EWalletChargeResource, GetEWalletChargeParams, } from "./ewallet/schema";
4
+ export type { CreatePaymentMethod, GetPaymentMethod, ListPaymentMethods, UpdatePaymentMethod, PaymentMethodResource, } from "./payment-method/schema";
5
+ export type { CreateInvoice, GetInvoice, ListInvoices, UpdateInvoice, ExpireInvoice, InvoiceResource, } from "./invoice/schema";
6
+ export type { RateLimitConfig };
7
+ interface XenditOptions {
8
+ /**
9
+ * Rate limiting configuration
10
+ */
11
+ rateLimit?: RateLimitConfig;
12
+ }
13
+ declare const Xendit: (key: string, options?: XenditOptions) => {
14
+ customer: {
15
+ create: (data: {
16
+ type: "INDIVIDUAL";
17
+ individual_detail: {
18
+ given_names: string;
19
+ surname?: string | undefined;
20
+ nationality?: string | undefined;
21
+ place_of_birth?: string | undefined;
22
+ date_of_birth?: string | undefined;
23
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
24
+ employment?: {
25
+ employer_name: string;
26
+ nature_of_business: string;
27
+ role_description: string;
28
+ } | undefined;
29
+ };
30
+ reference_id: string;
31
+ email?: string | undefined;
32
+ mobile_number?: string | undefined;
33
+ phone_number?: string | undefined;
34
+ description?: string | null | undefined;
35
+ business_detail?: undefined;
36
+ hashed_phone_number?: string | null | undefined;
37
+ addresses?: {
38
+ country: string;
39
+ street_line1?: string | null | undefined;
40
+ street_line2?: string | null | undefined;
41
+ city?: string | null | undefined;
42
+ province_state?: string | null | undefined;
43
+ postal_code?: string | null | undefined;
44
+ category?: string | null | undefined;
45
+ is_primary?: boolean | null | undefined;
46
+ }[] | undefined;
47
+ identity_accounts?: {
48
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
49
+ properties: {
50
+ type: "BANK_ACCOUNT";
51
+ properties: {
52
+ account_number: string;
53
+ account_holder_name: string;
54
+ swift_code?: string | undefined;
55
+ account_type?: string | undefined;
56
+ account_details?: string | undefined;
57
+ currency?: string | undefined;
58
+ };
59
+ } | {
60
+ type: "EWALLET";
61
+ properties: {
62
+ account_number: string;
63
+ account_holder_name: string;
64
+ currency?: string | undefined;
65
+ };
66
+ } | {
67
+ type: "CREDIT_CARD";
68
+ properties: {
69
+ token_id: string;
70
+ };
71
+ } | {
72
+ type: "OTC";
73
+ properties: {
74
+ payment_code: string;
75
+ expires_at?: string | undefined;
76
+ };
77
+ } | {
78
+ type: "QR_CODE";
79
+ properties: {
80
+ qr_string: string;
81
+ };
82
+ } | {
83
+ type: "PAY_LATER";
84
+ properties: {
85
+ account_id: string;
86
+ account_holder_name?: string | undefined;
87
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
88
+ };
89
+ } | {
90
+ type: "SOCIAL_MEDIA";
91
+ properties: {
92
+ account_id: string;
93
+ account_handle?: string | undefined;
94
+ };
95
+ };
96
+ country?: string | null | undefined;
97
+ company?: string | null | undefined;
98
+ description?: string | null | undefined;
99
+ }[] | undefined;
100
+ kyc_documents?: {
101
+ type: string;
102
+ country: string;
103
+ expires_at: null;
104
+ sub_type: string;
105
+ document_name: string;
106
+ document_number: string;
107
+ holder_name: string;
108
+ document_images: string[];
109
+ }[] | undefined;
110
+ date_of_registration?: string | null | undefined;
111
+ domicile_of_registration?: string | null | undefined;
112
+ metadata?: {} | null | undefined;
113
+ } | {
114
+ type: "BUSINESS";
115
+ business_detail: {
116
+ business_name: string;
117
+ business_type: string;
118
+ trading_name?: string | undefined;
119
+ };
120
+ reference_id: string;
121
+ email?: string | undefined;
122
+ mobile_number?: string | undefined;
123
+ phone_number?: string | undefined;
124
+ description?: string | null | undefined;
125
+ individual_detail?: undefined;
126
+ hashed_phone_number?: string | null | undefined;
127
+ addresses?: {
128
+ country: string;
129
+ street_line1?: string | null | undefined;
130
+ street_line2?: string | null | undefined;
131
+ city?: string | null | undefined;
132
+ province_state?: string | null | undefined;
133
+ postal_code?: string | null | undefined;
134
+ category?: string | null | undefined;
135
+ is_primary?: boolean | null | undefined;
136
+ }[] | undefined;
137
+ identity_accounts?: {
138
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
139
+ properties: {
140
+ type: "BANK_ACCOUNT";
141
+ properties: {
142
+ account_number: string;
143
+ account_holder_name: string;
144
+ swift_code?: string | undefined;
145
+ account_type?: string | undefined;
146
+ account_details?: string | undefined;
147
+ currency?: string | undefined;
148
+ };
149
+ } | {
150
+ type: "EWALLET";
151
+ properties: {
152
+ account_number: string;
153
+ account_holder_name: string;
154
+ currency?: string | undefined;
155
+ };
156
+ } | {
157
+ type: "CREDIT_CARD";
158
+ properties: {
159
+ token_id: string;
160
+ };
161
+ } | {
162
+ type: "OTC";
163
+ properties: {
164
+ payment_code: string;
165
+ expires_at?: string | undefined;
166
+ };
167
+ } | {
168
+ type: "QR_CODE";
169
+ properties: {
170
+ qr_string: string;
171
+ };
172
+ } | {
173
+ type: "PAY_LATER";
174
+ properties: {
175
+ account_id: string;
176
+ account_holder_name?: string | undefined;
177
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
178
+ };
179
+ } | {
180
+ type: "SOCIAL_MEDIA";
181
+ properties: {
182
+ account_id: string;
183
+ account_handle?: string | undefined;
184
+ };
185
+ };
186
+ country?: string | null | undefined;
187
+ company?: string | null | undefined;
188
+ description?: string | null | undefined;
189
+ }[] | undefined;
190
+ kyc_documents?: {
191
+ type: string;
192
+ country: string;
193
+ expires_at: null;
194
+ sub_type: string;
195
+ document_name: string;
196
+ document_number: string;
197
+ holder_name: string;
198
+ document_images: string[];
199
+ }[] | undefined;
200
+ date_of_registration?: string | null | undefined;
201
+ domicile_of_registration?: string | null | undefined;
202
+ metadata?: {} | null | undefined;
203
+ }) => Promise<{
204
+ type: "INDIVIDUAL";
205
+ individual_detail: {
206
+ given_names: string;
207
+ surname?: string | undefined;
208
+ nationality?: string | undefined;
209
+ place_of_birth?: string | undefined;
210
+ date_of_birth?: string | undefined;
211
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
212
+ employment?: {
213
+ employer_name: string;
214
+ nature_of_business: string;
215
+ role_description: string;
216
+ } | undefined;
217
+ };
218
+ reference_id: string;
219
+ id: string;
220
+ created: string;
221
+ updated: string;
222
+ email?: string | undefined;
223
+ mobile_number?: string | undefined;
224
+ phone_number?: string | undefined;
225
+ description?: string | null | undefined;
226
+ business_detail?: undefined;
227
+ hashed_phone_number?: string | null | undefined;
228
+ addresses?: {
229
+ country: string;
230
+ street_line1?: string | null | undefined;
231
+ street_line2?: string | null | undefined;
232
+ city?: string | null | undefined;
233
+ province_state?: string | null | undefined;
234
+ postal_code?: string | null | undefined;
235
+ category?: string | null | undefined;
236
+ is_primary?: boolean | null | undefined;
237
+ }[] | undefined;
238
+ identity_accounts?: {
239
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
240
+ properties: {
241
+ type: "BANK_ACCOUNT";
242
+ properties: {
243
+ account_number: string;
244
+ account_holder_name: string;
245
+ swift_code?: string | undefined;
246
+ account_type?: string | undefined;
247
+ account_details?: string | undefined;
248
+ currency?: string | undefined;
249
+ };
250
+ } | {
251
+ type: "EWALLET";
252
+ properties: {
253
+ account_number: string;
254
+ account_holder_name: string;
255
+ currency?: string | undefined;
256
+ };
257
+ } | {
258
+ type: "CREDIT_CARD";
259
+ properties: {
260
+ token_id: string;
261
+ };
262
+ } | {
263
+ type: "OTC";
264
+ properties: {
265
+ payment_code: string;
266
+ expires_at?: string | undefined;
267
+ };
268
+ } | {
269
+ type: "QR_CODE";
270
+ properties: {
271
+ qr_string: string;
272
+ };
273
+ } | {
274
+ type: "PAY_LATER";
275
+ properties: {
276
+ account_id: string;
277
+ account_holder_name?: string | undefined;
278
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
279
+ };
280
+ } | {
281
+ type: "SOCIAL_MEDIA";
282
+ properties: {
283
+ account_id: string;
284
+ account_handle?: string | undefined;
285
+ };
286
+ };
287
+ country?: string | null | undefined;
288
+ company?: string | null | undefined;
289
+ description?: string | null | undefined;
290
+ }[] | undefined;
291
+ kyc_documents?: {
292
+ type: string;
293
+ country: string;
294
+ expires_at: null;
295
+ sub_type: string;
296
+ document_name: string;
297
+ document_number: string;
298
+ holder_name: string;
299
+ document_images: string[];
300
+ }[] | undefined;
301
+ date_of_registration?: string | null | undefined;
302
+ domicile_of_registration?: string | null | undefined;
303
+ metadata?: {} | null | undefined;
304
+ } | {
305
+ type: "BUSINESS";
306
+ business_detail: {
307
+ business_name: string;
308
+ business_type: string;
309
+ trading_name?: string | undefined;
310
+ };
311
+ reference_id: string;
312
+ id: string;
313
+ created: string;
314
+ updated: string;
315
+ email?: string | undefined;
316
+ mobile_number?: string | undefined;
317
+ phone_number?: string | undefined;
318
+ description?: string | null | undefined;
319
+ individual_detail?: undefined;
320
+ hashed_phone_number?: string | null | undefined;
321
+ addresses?: {
322
+ country: string;
323
+ street_line1?: string | null | undefined;
324
+ street_line2?: string | null | undefined;
325
+ city?: string | null | undefined;
326
+ province_state?: string | null | undefined;
327
+ postal_code?: string | null | undefined;
328
+ category?: string | null | undefined;
329
+ is_primary?: boolean | null | undefined;
330
+ }[] | undefined;
331
+ identity_accounts?: {
332
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
333
+ properties: {
334
+ type: "BANK_ACCOUNT";
335
+ properties: {
336
+ account_number: string;
337
+ account_holder_name: string;
338
+ swift_code?: string | undefined;
339
+ account_type?: string | undefined;
340
+ account_details?: string | undefined;
341
+ currency?: string | undefined;
342
+ };
343
+ } | {
344
+ type: "EWALLET";
345
+ properties: {
346
+ account_number: string;
347
+ account_holder_name: string;
348
+ currency?: string | undefined;
349
+ };
350
+ } | {
351
+ type: "CREDIT_CARD";
352
+ properties: {
353
+ token_id: string;
354
+ };
355
+ } | {
356
+ type: "OTC";
357
+ properties: {
358
+ payment_code: string;
359
+ expires_at?: string | undefined;
360
+ };
361
+ } | {
362
+ type: "QR_CODE";
363
+ properties: {
364
+ qr_string: string;
365
+ };
366
+ } | {
367
+ type: "PAY_LATER";
368
+ properties: {
369
+ account_id: string;
370
+ account_holder_name?: string | undefined;
371
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
372
+ };
373
+ } | {
374
+ type: "SOCIAL_MEDIA";
375
+ properties: {
376
+ account_id: string;
377
+ account_handle?: string | undefined;
378
+ };
379
+ };
380
+ country?: string | null | undefined;
381
+ company?: string | null | undefined;
382
+ description?: string | null | undefined;
383
+ }[] | undefined;
384
+ kyc_documents?: {
385
+ type: string;
386
+ country: string;
387
+ expires_at: null;
388
+ sub_type: string;
389
+ document_name: string;
390
+ document_number: string;
391
+ holder_name: string;
392
+ document_images: string[];
393
+ }[] | undefined;
394
+ date_of_registration?: string | null | undefined;
395
+ domicile_of_registration?: string | null | undefined;
396
+ metadata?: {} | null | undefined;
397
+ }>;
398
+ getById: (data: {
399
+ id: string;
400
+ }) => Promise<{
401
+ type: "INDIVIDUAL";
402
+ individual_detail: {
403
+ given_names: string;
404
+ surname?: string | undefined;
405
+ nationality?: string | undefined;
406
+ place_of_birth?: string | undefined;
407
+ date_of_birth?: string | undefined;
408
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
409
+ employment?: {
410
+ employer_name: string;
411
+ nature_of_business: string;
412
+ role_description: string;
413
+ } | undefined;
414
+ };
415
+ reference_id: string;
416
+ id: string;
417
+ created: string;
418
+ updated: string;
419
+ email?: string | undefined;
420
+ mobile_number?: string | undefined;
421
+ phone_number?: string | undefined;
422
+ description?: string | null | undefined;
423
+ business_detail?: undefined;
424
+ hashed_phone_number?: string | null | undefined;
425
+ addresses?: {
426
+ country: string;
427
+ street_line1?: string | null | undefined;
428
+ street_line2?: string | null | undefined;
429
+ city?: string | null | undefined;
430
+ province_state?: string | null | undefined;
431
+ postal_code?: string | null | undefined;
432
+ category?: string | null | undefined;
433
+ is_primary?: boolean | null | undefined;
434
+ }[] | undefined;
435
+ identity_accounts?: {
436
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
437
+ properties: {
438
+ type: "BANK_ACCOUNT";
439
+ properties: {
440
+ account_number: string;
441
+ account_holder_name: string;
442
+ swift_code?: string | undefined;
443
+ account_type?: string | undefined;
444
+ account_details?: string | undefined;
445
+ currency?: string | undefined;
446
+ };
447
+ } | {
448
+ type: "EWALLET";
449
+ properties: {
450
+ account_number: string;
451
+ account_holder_name: string;
452
+ currency?: string | undefined;
453
+ };
454
+ } | {
455
+ type: "CREDIT_CARD";
456
+ properties: {
457
+ token_id: string;
458
+ };
459
+ } | {
460
+ type: "OTC";
461
+ properties: {
462
+ payment_code: string;
463
+ expires_at?: string | undefined;
464
+ };
465
+ } | {
466
+ type: "QR_CODE";
467
+ properties: {
468
+ qr_string: string;
469
+ };
470
+ } | {
471
+ type: "PAY_LATER";
472
+ properties: {
473
+ account_id: string;
474
+ account_holder_name?: string | undefined;
475
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
476
+ };
477
+ } | {
478
+ type: "SOCIAL_MEDIA";
479
+ properties: {
480
+ account_id: string;
481
+ account_handle?: string | undefined;
482
+ };
483
+ };
484
+ country?: string | null | undefined;
485
+ company?: string | null | undefined;
486
+ description?: string | null | undefined;
487
+ }[] | undefined;
488
+ kyc_documents?: {
489
+ type: string;
490
+ country: string;
491
+ expires_at: null;
492
+ sub_type: string;
493
+ document_name: string;
494
+ document_number: string;
495
+ holder_name: string;
496
+ document_images: string[];
497
+ }[] | undefined;
498
+ date_of_registration?: string | null | undefined;
499
+ domicile_of_registration?: string | null | undefined;
500
+ metadata?: {} | null | undefined;
501
+ } | {
502
+ type: "BUSINESS";
503
+ business_detail: {
504
+ business_name: string;
505
+ business_type: string;
506
+ trading_name?: string | undefined;
507
+ };
508
+ reference_id: string;
509
+ id: string;
510
+ created: string;
511
+ updated: string;
512
+ email?: string | undefined;
513
+ mobile_number?: string | undefined;
514
+ phone_number?: string | undefined;
515
+ description?: string | null | undefined;
516
+ individual_detail?: undefined;
517
+ hashed_phone_number?: string | null | undefined;
518
+ addresses?: {
519
+ country: string;
520
+ street_line1?: string | null | undefined;
521
+ street_line2?: string | null | undefined;
522
+ city?: string | null | undefined;
523
+ province_state?: string | null | undefined;
524
+ postal_code?: string | null | undefined;
525
+ category?: string | null | undefined;
526
+ is_primary?: boolean | null | undefined;
527
+ }[] | undefined;
528
+ identity_accounts?: {
529
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
530
+ properties: {
531
+ type: "BANK_ACCOUNT";
532
+ properties: {
533
+ account_number: string;
534
+ account_holder_name: string;
535
+ swift_code?: string | undefined;
536
+ account_type?: string | undefined;
537
+ account_details?: string | undefined;
538
+ currency?: string | undefined;
539
+ };
540
+ } | {
541
+ type: "EWALLET";
542
+ properties: {
543
+ account_number: string;
544
+ account_holder_name: string;
545
+ currency?: string | undefined;
546
+ };
547
+ } | {
548
+ type: "CREDIT_CARD";
549
+ properties: {
550
+ token_id: string;
551
+ };
552
+ } | {
553
+ type: "OTC";
554
+ properties: {
555
+ payment_code: string;
556
+ expires_at?: string | undefined;
557
+ };
558
+ } | {
559
+ type: "QR_CODE";
560
+ properties: {
561
+ qr_string: string;
562
+ };
563
+ } | {
564
+ type: "PAY_LATER";
565
+ properties: {
566
+ account_id: string;
567
+ account_holder_name?: string | undefined;
568
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
569
+ };
570
+ } | {
571
+ type: "SOCIAL_MEDIA";
572
+ properties: {
573
+ account_id: string;
574
+ account_handle?: string | undefined;
575
+ };
576
+ };
577
+ country?: string | null | undefined;
578
+ company?: string | null | undefined;
579
+ description?: string | null | undefined;
580
+ }[] | undefined;
581
+ kyc_documents?: {
582
+ type: string;
583
+ country: string;
584
+ expires_at: null;
585
+ sub_type: string;
586
+ document_name: string;
587
+ document_number: string;
588
+ holder_name: string;
589
+ document_images: string[];
590
+ }[] | undefined;
591
+ date_of_registration?: string | null | undefined;
592
+ domicile_of_registration?: string | null | undefined;
593
+ metadata?: {} | null | undefined;
594
+ }>;
595
+ getByRefId: (data: {
596
+ reference_id: string;
597
+ }) => Promise<{
598
+ data: ({
599
+ type: "INDIVIDUAL";
600
+ individual_detail: {
601
+ given_names: string;
602
+ surname?: string | undefined;
603
+ nationality?: string | undefined;
604
+ place_of_birth?: string | undefined;
605
+ date_of_birth?: string | undefined;
606
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
607
+ employment?: {
608
+ employer_name: string;
609
+ nature_of_business: string;
610
+ role_description: string;
611
+ } | undefined;
612
+ };
613
+ reference_id: string;
614
+ id: string;
615
+ created: string;
616
+ updated: string;
617
+ email?: string | undefined;
618
+ mobile_number?: string | undefined;
619
+ phone_number?: string | undefined;
620
+ description?: string | null | undefined;
621
+ business_detail?: undefined;
622
+ hashed_phone_number?: string | null | undefined;
623
+ addresses?: {
624
+ country: string;
625
+ street_line1?: string | null | undefined;
626
+ street_line2?: string | null | undefined;
627
+ city?: string | null | undefined;
628
+ province_state?: string | null | undefined;
629
+ postal_code?: string | null | undefined;
630
+ category?: string | null | undefined;
631
+ is_primary?: boolean | null | undefined;
632
+ }[] | undefined;
633
+ identity_accounts?: {
634
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
635
+ properties: {
636
+ type: "BANK_ACCOUNT";
637
+ properties: {
638
+ account_number: string;
639
+ account_holder_name: string;
640
+ swift_code?: string | undefined;
641
+ account_type?: string | undefined;
642
+ account_details?: string | undefined;
643
+ currency?: string | undefined;
644
+ };
645
+ } | {
646
+ type: "EWALLET";
647
+ properties: {
648
+ account_number: string;
649
+ account_holder_name: string;
650
+ currency?: string | undefined;
651
+ };
652
+ } | {
653
+ type: "CREDIT_CARD";
654
+ properties: {
655
+ token_id: string;
656
+ };
657
+ } | {
658
+ type: "OTC";
659
+ properties: {
660
+ payment_code: string;
661
+ expires_at?: string | undefined;
662
+ };
663
+ } | {
664
+ type: "QR_CODE";
665
+ properties: {
666
+ qr_string: string;
667
+ };
668
+ } | {
669
+ type: "PAY_LATER";
670
+ properties: {
671
+ account_id: string;
672
+ account_holder_name?: string | undefined;
673
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
674
+ };
675
+ } | {
676
+ type: "SOCIAL_MEDIA";
677
+ properties: {
678
+ account_id: string;
679
+ account_handle?: string | undefined;
680
+ };
681
+ };
682
+ country?: string | null | undefined;
683
+ company?: string | null | undefined;
684
+ description?: string | null | undefined;
685
+ }[] | undefined;
686
+ kyc_documents?: {
687
+ type: string;
688
+ country: string;
689
+ expires_at: null;
690
+ sub_type: string;
691
+ document_name: string;
692
+ document_number: string;
693
+ holder_name: string;
694
+ document_images: string[];
695
+ }[] | undefined;
696
+ date_of_registration?: string | null | undefined;
697
+ domicile_of_registration?: string | null | undefined;
698
+ metadata?: {} | null | undefined;
699
+ } | {
700
+ type: "BUSINESS";
701
+ business_detail: {
702
+ business_name: string;
703
+ business_type: string;
704
+ trading_name?: string | undefined;
705
+ };
706
+ reference_id: string;
707
+ id: string;
708
+ created: string;
709
+ updated: string;
710
+ email?: string | undefined;
711
+ mobile_number?: string | undefined;
712
+ phone_number?: string | undefined;
713
+ description?: string | null | undefined;
714
+ individual_detail?: undefined;
715
+ hashed_phone_number?: string | null | undefined;
716
+ addresses?: {
717
+ country: string;
718
+ street_line1?: string | null | undefined;
719
+ street_line2?: string | null | undefined;
720
+ city?: string | null | undefined;
721
+ province_state?: string | null | undefined;
722
+ postal_code?: string | null | undefined;
723
+ category?: string | null | undefined;
724
+ is_primary?: boolean | null | undefined;
725
+ }[] | undefined;
726
+ identity_accounts?: {
727
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
728
+ properties: {
729
+ type: "BANK_ACCOUNT";
730
+ properties: {
731
+ account_number: string;
732
+ account_holder_name: string;
733
+ swift_code?: string | undefined;
734
+ account_type?: string | undefined;
735
+ account_details?: string | undefined;
736
+ currency?: string | undefined;
737
+ };
738
+ } | {
739
+ type: "EWALLET";
740
+ properties: {
741
+ account_number: string;
742
+ account_holder_name: string;
743
+ currency?: string | undefined;
744
+ };
745
+ } | {
746
+ type: "CREDIT_CARD";
747
+ properties: {
748
+ token_id: string;
749
+ };
750
+ } | {
751
+ type: "OTC";
752
+ properties: {
753
+ payment_code: string;
754
+ expires_at?: string | undefined;
755
+ };
756
+ } | {
757
+ type: "QR_CODE";
758
+ properties: {
759
+ qr_string: string;
760
+ };
761
+ } | {
762
+ type: "PAY_LATER";
763
+ properties: {
764
+ account_id: string;
765
+ account_holder_name?: string | undefined;
766
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
767
+ };
768
+ } | {
769
+ type: "SOCIAL_MEDIA";
770
+ properties: {
771
+ account_id: string;
772
+ account_handle?: string | undefined;
773
+ };
774
+ };
775
+ country?: string | null | undefined;
776
+ company?: string | null | undefined;
777
+ description?: string | null | undefined;
778
+ }[] | undefined;
779
+ kyc_documents?: {
780
+ type: string;
781
+ country: string;
782
+ expires_at: null;
783
+ sub_type: string;
784
+ document_name: string;
785
+ document_number: string;
786
+ holder_name: string;
787
+ document_images: string[];
788
+ }[] | undefined;
789
+ date_of_registration?: string | null | undefined;
790
+ domicile_of_registration?: string | null | undefined;
791
+ metadata?: {} | null | undefined;
792
+ })[];
793
+ hasMore: boolean;
794
+ }>;
795
+ update: (data: {
796
+ id: string;
797
+ payload: {
798
+ email?: string | undefined;
799
+ mobile_number?: string | undefined;
800
+ phone_number?: string | undefined;
801
+ description?: string | null | undefined;
802
+ individual_detail?: {
803
+ given_names: string;
804
+ surname?: string | undefined;
805
+ nationality?: string | undefined;
806
+ place_of_birth?: string | undefined;
807
+ date_of_birth?: string | undefined;
808
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
809
+ employment?: {
810
+ employer_name: string;
811
+ nature_of_business: string;
812
+ role_description: string;
813
+ } | undefined;
814
+ } | undefined;
815
+ business_detail?: {
816
+ business_name: string;
817
+ business_type: string;
818
+ trading_name?: string | undefined;
819
+ } | undefined;
820
+ hashed_phone_number?: string | null | undefined;
821
+ addresses?: {
822
+ country: string;
823
+ street_line1?: string | null | undefined;
824
+ street_line2?: string | null | undefined;
825
+ city?: string | null | undefined;
826
+ province_state?: string | null | undefined;
827
+ postal_code?: string | null | undefined;
828
+ category?: string | null | undefined;
829
+ is_primary?: boolean | null | undefined;
830
+ }[] | undefined;
831
+ identity_accounts?: {
832
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
833
+ properties: {
834
+ type: "BANK_ACCOUNT";
835
+ properties: {
836
+ account_number: string;
837
+ account_holder_name: string;
838
+ swift_code?: string | undefined;
839
+ account_type?: string | undefined;
840
+ account_details?: string | undefined;
841
+ currency?: string | undefined;
842
+ };
843
+ } | {
844
+ type: "EWALLET";
845
+ properties: {
846
+ account_number: string;
847
+ account_holder_name: string;
848
+ currency?: string | undefined;
849
+ };
850
+ } | {
851
+ type: "CREDIT_CARD";
852
+ properties: {
853
+ token_id: string;
854
+ };
855
+ } | {
856
+ type: "OTC";
857
+ properties: {
858
+ payment_code: string;
859
+ expires_at?: string | undefined;
860
+ };
861
+ } | {
862
+ type: "QR_CODE";
863
+ properties: {
864
+ qr_string: string;
865
+ };
866
+ } | {
867
+ type: "PAY_LATER";
868
+ properties: {
869
+ account_id: string;
870
+ account_holder_name?: string | undefined;
871
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
872
+ };
873
+ } | {
874
+ type: "SOCIAL_MEDIA";
875
+ properties: {
876
+ account_id: string;
877
+ account_handle?: string | undefined;
878
+ };
879
+ };
880
+ country?: string | null | undefined;
881
+ company?: string | null | undefined;
882
+ description?: string | null | undefined;
883
+ }[] | undefined;
884
+ kyc_documents?: {
885
+ type: string;
886
+ country: string;
887
+ expires_at: null;
888
+ sub_type: string;
889
+ document_name: string;
890
+ document_number: string;
891
+ holder_name: string;
892
+ document_images: string[];
893
+ }[] | undefined;
894
+ date_of_registration?: string | null | undefined;
895
+ domicile_of_registration?: string | null | undefined;
896
+ metadata?: {} | null | undefined;
897
+ };
898
+ }) => Promise<{
899
+ type: "INDIVIDUAL";
900
+ individual_detail: {
901
+ given_names: string;
902
+ surname?: string | undefined;
903
+ nationality?: string | undefined;
904
+ place_of_birth?: string | undefined;
905
+ date_of_birth?: string | undefined;
906
+ gender?: "MALE" | "FEMALE" | "OTHER" | undefined;
907
+ employment?: {
908
+ employer_name: string;
909
+ nature_of_business: string;
910
+ role_description: string;
911
+ } | undefined;
912
+ };
913
+ reference_id: string;
914
+ id: string;
915
+ created: string;
916
+ updated: string;
917
+ email?: string | undefined;
918
+ mobile_number?: string | undefined;
919
+ phone_number?: string | undefined;
920
+ description?: string | null | undefined;
921
+ business_detail?: undefined;
922
+ hashed_phone_number?: string | null | undefined;
923
+ addresses?: {
924
+ country: string;
925
+ street_line1?: string | null | undefined;
926
+ street_line2?: string | null | undefined;
927
+ city?: string | null | undefined;
928
+ province_state?: string | null | undefined;
929
+ postal_code?: string | null | undefined;
930
+ category?: string | null | undefined;
931
+ is_primary?: boolean | null | undefined;
932
+ }[] | undefined;
933
+ identity_accounts?: {
934
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
935
+ properties: {
936
+ type: "BANK_ACCOUNT";
937
+ properties: {
938
+ account_number: string;
939
+ account_holder_name: string;
940
+ swift_code?: string | undefined;
941
+ account_type?: string | undefined;
942
+ account_details?: string | undefined;
943
+ currency?: string | undefined;
944
+ };
945
+ } | {
946
+ type: "EWALLET";
947
+ properties: {
948
+ account_number: string;
949
+ account_holder_name: string;
950
+ currency?: string | undefined;
951
+ };
952
+ } | {
953
+ type: "CREDIT_CARD";
954
+ properties: {
955
+ token_id: string;
956
+ };
957
+ } | {
958
+ type: "OTC";
959
+ properties: {
960
+ payment_code: string;
961
+ expires_at?: string | undefined;
962
+ };
963
+ } | {
964
+ type: "QR_CODE";
965
+ properties: {
966
+ qr_string: string;
967
+ };
968
+ } | {
969
+ type: "PAY_LATER";
970
+ properties: {
971
+ account_id: string;
972
+ account_holder_name?: string | undefined;
973
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
974
+ };
975
+ } | {
976
+ type: "SOCIAL_MEDIA";
977
+ properties: {
978
+ account_id: string;
979
+ account_handle?: string | undefined;
980
+ };
981
+ };
982
+ country?: string | null | undefined;
983
+ company?: string | null | undefined;
984
+ description?: string | null | undefined;
985
+ }[] | undefined;
986
+ kyc_documents?: {
987
+ type: string;
988
+ country: string;
989
+ expires_at: null;
990
+ sub_type: string;
991
+ document_name: string;
992
+ document_number: string;
993
+ holder_name: string;
994
+ document_images: string[];
995
+ }[] | undefined;
996
+ date_of_registration?: string | null | undefined;
997
+ domicile_of_registration?: string | null | undefined;
998
+ metadata?: {} | null | undefined;
999
+ } | {
1000
+ type: "BUSINESS";
1001
+ business_detail: {
1002
+ business_name: string;
1003
+ business_type: string;
1004
+ trading_name?: string | undefined;
1005
+ };
1006
+ reference_id: string;
1007
+ id: string;
1008
+ created: string;
1009
+ updated: string;
1010
+ email?: string | undefined;
1011
+ mobile_number?: string | undefined;
1012
+ phone_number?: string | undefined;
1013
+ description?: string | null | undefined;
1014
+ individual_detail?: undefined;
1015
+ hashed_phone_number?: string | null | undefined;
1016
+ addresses?: {
1017
+ country: string;
1018
+ street_line1?: string | null | undefined;
1019
+ street_line2?: string | null | undefined;
1020
+ city?: string | null | undefined;
1021
+ province_state?: string | null | undefined;
1022
+ postal_code?: string | null | undefined;
1023
+ category?: string | null | undefined;
1024
+ is_primary?: boolean | null | undefined;
1025
+ }[] | undefined;
1026
+ identity_accounts?: {
1027
+ type: "BANK_ACCOUNT" | "EWALLET" | "CREDIT_CARD" | "PAY_LATER" | "OTC" | "QR_CODE" | "SOCIAL_MEDIA";
1028
+ properties: {
1029
+ type: "BANK_ACCOUNT";
1030
+ properties: {
1031
+ account_number: string;
1032
+ account_holder_name: string;
1033
+ swift_code?: string | undefined;
1034
+ account_type?: string | undefined;
1035
+ account_details?: string | undefined;
1036
+ currency?: string | undefined;
1037
+ };
1038
+ } | {
1039
+ type: "EWALLET";
1040
+ properties: {
1041
+ account_number: string;
1042
+ account_holder_name: string;
1043
+ currency?: string | undefined;
1044
+ };
1045
+ } | {
1046
+ type: "CREDIT_CARD";
1047
+ properties: {
1048
+ token_id: string;
1049
+ };
1050
+ } | {
1051
+ type: "OTC";
1052
+ properties: {
1053
+ payment_code: string;
1054
+ expires_at?: string | undefined;
1055
+ };
1056
+ } | {
1057
+ type: "QR_CODE";
1058
+ properties: {
1059
+ qr_string: string;
1060
+ };
1061
+ } | {
1062
+ type: "PAY_LATER";
1063
+ properties: {
1064
+ account_id: string;
1065
+ account_holder_name?: string | undefined;
1066
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1067
+ };
1068
+ } | {
1069
+ type: "SOCIAL_MEDIA";
1070
+ properties: {
1071
+ account_id: string;
1072
+ account_handle?: string | undefined;
1073
+ };
1074
+ };
1075
+ country?: string | null | undefined;
1076
+ company?: string | null | undefined;
1077
+ description?: string | null | undefined;
1078
+ }[] | undefined;
1079
+ kyc_documents?: {
1080
+ type: string;
1081
+ country: string;
1082
+ expires_at: null;
1083
+ sub_type: string;
1084
+ document_name: string;
1085
+ document_number: string;
1086
+ holder_name: string;
1087
+ document_images: string[];
1088
+ }[] | undefined;
1089
+ date_of_registration?: string | null | undefined;
1090
+ domicile_of_registration?: string | null | undefined;
1091
+ metadata?: {} | null | undefined;
1092
+ }>;
1093
+ };
1094
+ ewallet: {
1095
+ charge: (data: {
1096
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1097
+ reference_id: string;
1098
+ channel_code: "ID_OVO" | "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_ASTRAPAY" | "ID_JENIUSPAY" | "ID_SAKUKU" | "PH_PAYMAYA" | "PH_GCASH" | "PH_GRABPAY" | "PH_SHOPEEPAY" | "VN_APPOTA" | "VN_MOMO" | "VN_SHOPEEPAY" | "VN_VNPTWALLET" | "VN_VIETTELPAY" | "VN_ZALOPAY" | "TH_WECHATPAY" | "TH_LINEPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "MY_TOUCHNGO" | "MY_SHOPEEPAY" | "MY_GRABPAY";
1099
+ channel_properties: {
1100
+ mobile_number?: string | undefined;
1101
+ cashtag?: string | undefined;
1102
+ success_redirect_url?: string | undefined;
1103
+ failure_redirect_url?: string | undefined;
1104
+ cancel_redirect_url?: string | undefined;
1105
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1106
+ };
1107
+ checkout_method: "ONE_TIME_PAYMENT";
1108
+ amount: number;
1109
+ metadata?: {} | undefined;
1110
+ payment_method_id?: undefined;
1111
+ customer_id?: string | undefined;
1112
+ basket?: {
1113
+ type: "PRODUCT" | "SERVICE";
1114
+ category: string;
1115
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1116
+ reference_id: string;
1117
+ name: string;
1118
+ price: number;
1119
+ quantity: number;
1120
+ url?: string | undefined;
1121
+ description?: string | undefined;
1122
+ metadata?: {} | undefined;
1123
+ subcategory?: string | undefined;
1124
+ }[] | undefined;
1125
+ } | {
1126
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1127
+ reference_id: string;
1128
+ channel_properties: {
1129
+ mobile_number?: string | undefined;
1130
+ cashtag?: string | undefined;
1131
+ success_redirect_url?: string | undefined;
1132
+ failure_redirect_url?: string | undefined;
1133
+ cancel_redirect_url?: string | undefined;
1134
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1135
+ };
1136
+ checkout_method: "TOKENIZED_PAYMENT";
1137
+ amount: number;
1138
+ payment_method_id: string;
1139
+ metadata?: {} | undefined;
1140
+ channel_code?: "ID_OVO" | "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_ASTRAPAY" | "ID_JENIUSPAY" | "ID_SAKUKU" | "PH_PAYMAYA" | "PH_GCASH" | "PH_GRABPAY" | "PH_SHOPEEPAY" | "VN_APPOTA" | "VN_MOMO" | "VN_SHOPEEPAY" | "VN_VNPTWALLET" | "VN_VIETTELPAY" | "VN_ZALOPAY" | "TH_WECHATPAY" | "TH_LINEPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "MY_TOUCHNGO" | "MY_SHOPEEPAY" | "MY_GRABPAY" | undefined;
1141
+ customer_id?: string | undefined;
1142
+ basket?: {
1143
+ type: "PRODUCT" | "SERVICE";
1144
+ category: string;
1145
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1146
+ reference_id: string;
1147
+ name: string;
1148
+ price: number;
1149
+ quantity: number;
1150
+ url?: string | undefined;
1151
+ description?: string | undefined;
1152
+ metadata?: {} | undefined;
1153
+ subcategory?: string | undefined;
1154
+ }[] | undefined;
1155
+ }) => Promise<{
1156
+ status: "SUCCEEDED" | "PENDING" | "FAILED" | "VOIDED" | "REFUNDED";
1157
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1158
+ reference_id: string;
1159
+ id: string;
1160
+ created: string;
1161
+ updated: string;
1162
+ channel_code: "ID_OVO" | "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_ASTRAPAY" | "ID_JENIUSPAY" | "ID_SAKUKU" | "PH_PAYMAYA" | "PH_GCASH" | "PH_GRABPAY" | "PH_SHOPEEPAY" | "VN_APPOTA" | "VN_MOMO" | "VN_SHOPEEPAY" | "VN_VNPTWALLET" | "VN_VIETTELPAY" | "VN_ZALOPAY" | "TH_WECHATPAY" | "TH_LINEPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "MY_TOUCHNGO" | "MY_SHOPEEPAY" | "MY_GRABPAY";
1163
+ channel_properties: {
1164
+ channel_code: "ID_OVO";
1165
+ channel_properties: {
1166
+ mobile_number: string;
1167
+ };
1168
+ } | {
1169
+ properties: {
1170
+ method: "ONE_TIME_PAYMENT";
1171
+ properties: {
1172
+ cashtag: string;
1173
+ };
1174
+ } | {
1175
+ method: "TOKENIZED_PAYMENT";
1176
+ properties: {
1177
+ success_redirect_url: string;
1178
+ failure_redirect_url: string;
1179
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1180
+ };
1181
+ };
1182
+ channel_code: "ID_JENIUSPAY";
1183
+ } | {
1184
+ properties: {
1185
+ method: "ONE_TIME_PAYMENT";
1186
+ properties: {
1187
+ success_redirect_url: string;
1188
+ };
1189
+ } | {
1190
+ method: "TOKENIZED_PAYMENT";
1191
+ properties: {
1192
+ success_redirect_url: string;
1193
+ failure_redirect_url: string;
1194
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1195
+ };
1196
+ };
1197
+ channel_code: "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_SAKUKU" | "PH_SHOPEEPAY" | "TH_WECHATPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "TH_TOUCHNGO";
1198
+ } | {
1199
+ properties: {
1200
+ success_redirect_url: string;
1201
+ failure_redirect_url: string;
1202
+ cancel_redirect_url: string;
1203
+ };
1204
+ channel_code: "PH_PAYMAYA";
1205
+ };
1206
+ checkout_method: "ONE_TIME_PAYMENT" | "TOKENIZED_PAYMENT";
1207
+ payment_method_id: string | null;
1208
+ customer_id: string | null;
1209
+ business_id: string;
1210
+ charge_amount: number;
1211
+ refunded_amount: number | null;
1212
+ is_redirect_required: boolean;
1213
+ callback_url: string;
1214
+ void_status: string | null;
1215
+ voided_at: string | null;
1216
+ capture_now: boolean;
1217
+ failure_code: string | null;
1218
+ metadata?: {} | undefined;
1219
+ basket?: {
1220
+ type: "PRODUCT" | "SERVICE";
1221
+ category: string;
1222
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1223
+ reference_id: string;
1224
+ name: string;
1225
+ price: number;
1226
+ quantity: number;
1227
+ url?: string | undefined;
1228
+ description?: string | undefined;
1229
+ metadata?: {} | undefined;
1230
+ subcategory?: string | undefined;
1231
+ }[] | undefined;
1232
+ capture_amount?: number | undefined;
1233
+ actions?: {
1234
+ desktop_web_checkout_url?: string | undefined;
1235
+ mobile_web_checkout_url?: string | undefined;
1236
+ mobile_deeplink_checkout_url?: string | undefined;
1237
+ qr_checkout_string?: string | undefined;
1238
+ } | undefined;
1239
+ }>;
1240
+ get: (data: {
1241
+ id: string;
1242
+ }) => Promise<{
1243
+ status: "SUCCEEDED" | "PENDING" | "FAILED" | "VOIDED" | "REFUNDED";
1244
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1245
+ reference_id: string;
1246
+ id: string;
1247
+ created: string;
1248
+ updated: string;
1249
+ channel_code: "ID_OVO" | "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_ASTRAPAY" | "ID_JENIUSPAY" | "ID_SAKUKU" | "PH_PAYMAYA" | "PH_GCASH" | "PH_GRABPAY" | "PH_SHOPEEPAY" | "VN_APPOTA" | "VN_MOMO" | "VN_SHOPEEPAY" | "VN_VNPTWALLET" | "VN_VIETTELPAY" | "VN_ZALOPAY" | "TH_WECHATPAY" | "TH_LINEPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "MY_TOUCHNGO" | "MY_SHOPEEPAY" | "MY_GRABPAY";
1250
+ channel_properties: {
1251
+ channel_code: "ID_OVO";
1252
+ channel_properties: {
1253
+ mobile_number: string;
1254
+ };
1255
+ } | {
1256
+ properties: {
1257
+ method: "ONE_TIME_PAYMENT";
1258
+ properties: {
1259
+ cashtag: string;
1260
+ };
1261
+ } | {
1262
+ method: "TOKENIZED_PAYMENT";
1263
+ properties: {
1264
+ success_redirect_url: string;
1265
+ failure_redirect_url: string;
1266
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1267
+ };
1268
+ };
1269
+ channel_code: "ID_JENIUSPAY";
1270
+ } | {
1271
+ properties: {
1272
+ method: "ONE_TIME_PAYMENT";
1273
+ properties: {
1274
+ success_redirect_url: string;
1275
+ };
1276
+ } | {
1277
+ method: "TOKENIZED_PAYMENT";
1278
+ properties: {
1279
+ success_redirect_url: string;
1280
+ failure_redirect_url: string;
1281
+ redeem_points?: "REDEEM_ALL" | "REDEEM_NONE" | undefined;
1282
+ };
1283
+ };
1284
+ channel_code: "ID_DANA" | "ID_LINKAJA" | "ID_SHOPEEPAY" | "ID_SAKUKU" | "PH_SHOPEEPAY" | "TH_WECHATPAY" | "TH_TRUEMONEY" | "TH_SHOPEEPAY" | "TH_TOUCHNGO";
1285
+ } | {
1286
+ properties: {
1287
+ success_redirect_url: string;
1288
+ failure_redirect_url: string;
1289
+ cancel_redirect_url: string;
1290
+ };
1291
+ channel_code: "PH_PAYMAYA";
1292
+ };
1293
+ checkout_method: "ONE_TIME_PAYMENT" | "TOKENIZED_PAYMENT";
1294
+ payment_method_id: string | null;
1295
+ customer_id: string | null;
1296
+ business_id: string;
1297
+ charge_amount: number;
1298
+ refunded_amount: number | null;
1299
+ is_redirect_required: boolean;
1300
+ callback_url: string;
1301
+ void_status: string | null;
1302
+ voided_at: string | null;
1303
+ capture_now: boolean;
1304
+ failure_code: string | null;
1305
+ metadata?: {} | undefined;
1306
+ basket?: {
1307
+ type: "PRODUCT" | "SERVICE";
1308
+ category: string;
1309
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1310
+ reference_id: string;
1311
+ name: string;
1312
+ price: number;
1313
+ quantity: number;
1314
+ url?: string | undefined;
1315
+ description?: string | undefined;
1316
+ metadata?: {} | undefined;
1317
+ subcategory?: string | undefined;
1318
+ }[] | undefined;
1319
+ capture_amount?: number | undefined;
1320
+ actions?: {
1321
+ desktop_web_checkout_url?: string | undefined;
1322
+ mobile_web_checkout_url?: string | undefined;
1323
+ mobile_deeplink_checkout_url?: string | undefined;
1324
+ qr_checkout_string?: string | undefined;
1325
+ } | undefined;
1326
+ }>;
1327
+ };
1328
+ paymentMethod: {
1329
+ create: (data: {
1330
+ type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
1331
+ reusability: "ONE_TIME_USE" | "MULTIPLE_USE";
1332
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1333
+ description?: string | undefined;
1334
+ metadata?: Record<string, unknown> | undefined;
1335
+ reference_id?: string | undefined;
1336
+ card?: {
1337
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1338
+ channel_properties?: {
1339
+ success_return_url?: string | undefined;
1340
+ failure_return_url?: string | undefined;
1341
+ } | undefined;
1342
+ } | undefined;
1343
+ bank_account?: {
1344
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1345
+ channel_properties?: {
1346
+ card_last_four?: string | undefined;
1347
+ card_expiry_month?: string | undefined;
1348
+ card_expiry_year?: string | undefined;
1349
+ account_mobile_number?: string | undefined;
1350
+ account_email?: string | undefined;
1351
+ } | undefined;
1352
+ } | undefined;
1353
+ ewallet?: {
1354
+ channel_code: string;
1355
+ channel_properties?: {
1356
+ success_return_url?: string | undefined;
1357
+ failure_return_url?: string | undefined;
1358
+ cancel_return_url?: string | undefined;
1359
+ } | undefined;
1360
+ } | undefined;
1361
+ }) => Promise<{
1362
+ status: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED";
1363
+ type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
1364
+ id: string;
1365
+ created: string;
1366
+ updated: string;
1367
+ business_id: string;
1368
+ reusability: "ONE_TIME_USE" | "MULTIPLE_USE";
1369
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1370
+ description?: string | undefined;
1371
+ metadata?: Record<string, unknown> | undefined;
1372
+ reference_id?: string | undefined;
1373
+ customer_id?: string | undefined;
1374
+ actions?: {
1375
+ action: string;
1376
+ url?: string | undefined;
1377
+ method?: string | undefined;
1378
+ url_type?: string | undefined;
1379
+ }[] | undefined;
1380
+ failure_code?: string | null | undefined;
1381
+ card?: {
1382
+ card_last_four: string;
1383
+ card_expiry_month: string;
1384
+ card_expiry_year: string;
1385
+ network: string;
1386
+ type?: "CREDIT" | "DEBIT" | undefined;
1387
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1388
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1389
+ issuer?: string | undefined;
1390
+ } | undefined;
1391
+ bank_account?: {
1392
+ account_number: string;
1393
+ account_holder_name: string;
1394
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1395
+ bank_code: string;
1396
+ account_type?: string | undefined;
1397
+ } | undefined;
1398
+ ewallet?: {
1399
+ account_details: string;
1400
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1401
+ } | undefined;
1402
+ billing_information?: {
1403
+ street_line1?: string | undefined;
1404
+ street_line2?: string | undefined;
1405
+ city?: string | undefined;
1406
+ province_state?: string | undefined;
1407
+ postal_code?: string | undefined;
1408
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1409
+ } | undefined;
1410
+ }>;
1411
+ get: (data: {
1412
+ id: string;
1413
+ }) => Promise<{
1414
+ status: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED";
1415
+ type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
1416
+ id: string;
1417
+ created: string;
1418
+ updated: string;
1419
+ business_id: string;
1420
+ reusability: "ONE_TIME_USE" | "MULTIPLE_USE";
1421
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1422
+ description?: string | undefined;
1423
+ metadata?: Record<string, unknown> | undefined;
1424
+ reference_id?: string | undefined;
1425
+ customer_id?: string | undefined;
1426
+ actions?: {
1427
+ action: string;
1428
+ url?: string | undefined;
1429
+ method?: string | undefined;
1430
+ url_type?: string | undefined;
1431
+ }[] | undefined;
1432
+ failure_code?: string | null | undefined;
1433
+ card?: {
1434
+ card_last_four: string;
1435
+ card_expiry_month: string;
1436
+ card_expiry_year: string;
1437
+ network: string;
1438
+ type?: "CREDIT" | "DEBIT" | undefined;
1439
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1440
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1441
+ issuer?: string | undefined;
1442
+ } | undefined;
1443
+ bank_account?: {
1444
+ account_number: string;
1445
+ account_holder_name: string;
1446
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1447
+ bank_code: string;
1448
+ account_type?: string | undefined;
1449
+ } | undefined;
1450
+ ewallet?: {
1451
+ account_details: string;
1452
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1453
+ } | undefined;
1454
+ billing_information?: {
1455
+ street_line1?: string | undefined;
1456
+ street_line2?: string | undefined;
1457
+ city?: string | undefined;
1458
+ province_state?: string | undefined;
1459
+ postal_code?: string | undefined;
1460
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1461
+ } | undefined;
1462
+ }>;
1463
+ list: (params?: any) => Promise<{
1464
+ data: {
1465
+ status: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED";
1466
+ type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
1467
+ id: string;
1468
+ created: string;
1469
+ updated: string;
1470
+ business_id: string;
1471
+ reusability: "ONE_TIME_USE" | "MULTIPLE_USE";
1472
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1473
+ description?: string | undefined;
1474
+ metadata?: Record<string, unknown> | undefined;
1475
+ reference_id?: string | undefined;
1476
+ customer_id?: string | undefined;
1477
+ actions?: {
1478
+ action: string;
1479
+ url?: string | undefined;
1480
+ method?: string | undefined;
1481
+ url_type?: string | undefined;
1482
+ }[] | undefined;
1483
+ failure_code?: string | null | undefined;
1484
+ card?: {
1485
+ card_last_four: string;
1486
+ card_expiry_month: string;
1487
+ card_expiry_year: string;
1488
+ network: string;
1489
+ type?: "CREDIT" | "DEBIT" | undefined;
1490
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1491
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1492
+ issuer?: string | undefined;
1493
+ } | undefined;
1494
+ bank_account?: {
1495
+ account_number: string;
1496
+ account_holder_name: string;
1497
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1498
+ bank_code: string;
1499
+ account_type?: string | undefined;
1500
+ } | undefined;
1501
+ ewallet?: {
1502
+ account_details: string;
1503
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1504
+ } | undefined;
1505
+ billing_information?: {
1506
+ street_line1?: string | undefined;
1507
+ street_line2?: string | undefined;
1508
+ city?: string | undefined;
1509
+ province_state?: string | undefined;
1510
+ postal_code?: string | undefined;
1511
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1512
+ } | undefined;
1513
+ }[];
1514
+ has_more: boolean;
1515
+ links: {
1516
+ method: string;
1517
+ href: string;
1518
+ rel: string;
1519
+ }[];
1520
+ }>;
1521
+ update: (data: {
1522
+ id: string;
1523
+ payload: {
1524
+ status?: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED" | undefined;
1525
+ description?: string | undefined;
1526
+ metadata?: Record<string, unknown> | undefined;
1527
+ reference_id?: string | undefined;
1528
+ };
1529
+ }) => Promise<{
1530
+ status: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED";
1531
+ type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
1532
+ id: string;
1533
+ created: string;
1534
+ updated: string;
1535
+ business_id: string;
1536
+ reusability: "ONE_TIME_USE" | "MULTIPLE_USE";
1537
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1538
+ description?: string | undefined;
1539
+ metadata?: Record<string, unknown> | undefined;
1540
+ reference_id?: string | undefined;
1541
+ customer_id?: string | undefined;
1542
+ actions?: {
1543
+ action: string;
1544
+ url?: string | undefined;
1545
+ method?: string | undefined;
1546
+ url_type?: string | undefined;
1547
+ }[] | undefined;
1548
+ failure_code?: string | null | undefined;
1549
+ card?: {
1550
+ card_last_four: string;
1551
+ card_expiry_month: string;
1552
+ card_expiry_year: string;
1553
+ network: string;
1554
+ type?: "CREDIT" | "DEBIT" | undefined;
1555
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1556
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1557
+ issuer?: string | undefined;
1558
+ } | undefined;
1559
+ bank_account?: {
1560
+ account_number: string;
1561
+ account_holder_name: string;
1562
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1563
+ bank_code: string;
1564
+ account_type?: string | undefined;
1565
+ } | undefined;
1566
+ ewallet?: {
1567
+ account_details: string;
1568
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1569
+ } | undefined;
1570
+ billing_information?: {
1571
+ street_line1?: string | undefined;
1572
+ street_line2?: string | undefined;
1573
+ city?: string | undefined;
1574
+ province_state?: string | undefined;
1575
+ postal_code?: string | undefined;
1576
+ country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1577
+ } | undefined;
1578
+ }>;
1579
+ };
1580
+ invoice: {
1581
+ create: (data: {
1582
+ description: string;
1583
+ amount: number;
1584
+ external_id: string;
1585
+ payer_email: string;
1586
+ currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
1587
+ metadata?: Record<string, unknown> | undefined;
1588
+ success_redirect_url?: string | undefined;
1589
+ failure_redirect_url?: string | undefined;
1590
+ customer_name?: string | undefined;
1591
+ customer_email?: string | undefined;
1592
+ customer_phone?: string | undefined;
1593
+ invoice_duration?: number | undefined;
1594
+ callback_virtual_account_id?: string | undefined;
1595
+ should_exclude_credit_card?: boolean | undefined;
1596
+ should_send_email?: boolean | undefined;
1597
+ customer?: {
1598
+ customer_name?: string | undefined;
1599
+ customer_email?: string | undefined;
1600
+ customer_phone?: string | undefined;
1601
+ billing_address?: {
1602
+ city?: string | undefined;
1603
+ postal_code?: string | undefined;
1604
+ first_name?: string | undefined;
1605
+ last_name?: string | undefined;
1606
+ address?: string | undefined;
1607
+ phone?: string | undefined;
1608
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1609
+ } | undefined;
1610
+ shipping_address?: {
1611
+ city?: string | undefined;
1612
+ postal_code?: string | undefined;
1613
+ first_name?: string | undefined;
1614
+ last_name?: string | undefined;
1615
+ address?: string | undefined;
1616
+ phone?: string | undefined;
1617
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1618
+ } | undefined;
1619
+ } | undefined;
1620
+ customer_notification_preference?: {
1621
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
1622
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
1623
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
1624
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
1625
+ } | undefined;
1626
+ payment_methods?: string[] | undefined;
1627
+ mid_label?: string | undefined;
1628
+ should_authenticate_credit_card?: boolean | undefined;
1629
+ items?: {
1630
+ name: string;
1631
+ price: number;
1632
+ quantity: number;
1633
+ url?: string | undefined;
1634
+ category?: string | undefined;
1635
+ }[] | undefined;
1636
+ fixed_va?: boolean | undefined;
1637
+ reminder_time_unit?: "days" | "hours" | "minutes" | undefined;
1638
+ reminder_time?: number | undefined;
1639
+ locale?: string | undefined;
1640
+ fees?: {
1641
+ value: number;
1642
+ type: string;
1643
+ }[] | undefined;
1644
+ }) => Promise<{
1645
+ status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
1646
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1647
+ description: string;
1648
+ id: string;
1649
+ created: string;
1650
+ updated: string;
1651
+ amount: number;
1652
+ external_id: string;
1653
+ payer_email: string;
1654
+ should_exclude_credit_card: boolean;
1655
+ should_send_email: boolean;
1656
+ user_id: string;
1657
+ merchant_name: string;
1658
+ merchant_profile_picture_url: string;
1659
+ expiry_date: string;
1660
+ invoice_url: string;
1661
+ metadata?: Record<string, unknown> | undefined;
1662
+ success_redirect_url?: string | undefined;
1663
+ failure_redirect_url?: string | undefined;
1664
+ bank_code?: string | undefined;
1665
+ customer_name?: string | undefined;
1666
+ customer_email?: string | undefined;
1667
+ customer_phone?: string | undefined;
1668
+ ewallet_type?: string | undefined;
1669
+ customer?: {
1670
+ customer_name?: string | undefined;
1671
+ customer_email?: string | undefined;
1672
+ customer_phone?: string | undefined;
1673
+ billing_address?: {
1674
+ city?: string | undefined;
1675
+ postal_code?: string | undefined;
1676
+ first_name?: string | undefined;
1677
+ last_name?: string | undefined;
1678
+ address?: string | undefined;
1679
+ phone?: string | undefined;
1680
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1681
+ } | undefined;
1682
+ shipping_address?: {
1683
+ city?: string | undefined;
1684
+ postal_code?: string | undefined;
1685
+ first_name?: string | undefined;
1686
+ last_name?: string | undefined;
1687
+ address?: string | undefined;
1688
+ phone?: string | undefined;
1689
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1690
+ } | undefined;
1691
+ } | undefined;
1692
+ customer_notification_preference?: {
1693
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
1694
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
1695
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
1696
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
1697
+ } | undefined;
1698
+ should_authenticate_credit_card?: boolean | undefined;
1699
+ items?: {
1700
+ name: string;
1701
+ price: number;
1702
+ quantity: number;
1703
+ url?: string | undefined;
1704
+ category?: string | undefined;
1705
+ }[] | undefined;
1706
+ fees?: {
1707
+ value: number;
1708
+ type: string;
1709
+ }[] | undefined;
1710
+ paid_amount?: number | undefined;
1711
+ credit_card_charge_id?: string | undefined;
1712
+ payment_method?: string | undefined;
1713
+ payment_channel?: string | undefined;
1714
+ payment_destination?: string | undefined;
1715
+ payment_id?: string | undefined;
1716
+ paid_at?: string | undefined;
1717
+ on_demand_link?: string | undefined;
1718
+ recurring_payment_id?: string | undefined;
1719
+ available_banks?: {
1720
+ account_holder_name: string;
1721
+ bank_code: string;
1722
+ collection_type: string;
1723
+ bank_branch: string;
1724
+ transfer_amount: number;
1725
+ bank_account_number: string;
1726
+ identity_amount?: number | undefined;
1727
+ }[] | undefined;
1728
+ available_ewallets?: {
1729
+ ewallet_type: string;
1730
+ }[] | undefined;
1731
+ available_retail_outlets?: {
1732
+ retail_outlet_name: string;
1733
+ }[] | undefined;
1734
+ available_paylaters?: {
1735
+ paylater_type: string;
1736
+ }[] | undefined;
1737
+ available_qr_codes?: {
1738
+ qr_code_type: string;
1739
+ }[] | undefined;
1740
+ available_direct_debits?: {
1741
+ direct_debit_type: string;
1742
+ }[] | undefined;
1743
+ }>;
1744
+ get: (data: {
1745
+ invoice_id: string;
1746
+ }) => Promise<{
1747
+ status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
1748
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1749
+ description: string;
1750
+ id: string;
1751
+ created: string;
1752
+ updated: string;
1753
+ amount: number;
1754
+ external_id: string;
1755
+ payer_email: string;
1756
+ should_exclude_credit_card: boolean;
1757
+ should_send_email: boolean;
1758
+ user_id: string;
1759
+ merchant_name: string;
1760
+ merchant_profile_picture_url: string;
1761
+ expiry_date: string;
1762
+ invoice_url: string;
1763
+ metadata?: Record<string, unknown> | undefined;
1764
+ success_redirect_url?: string | undefined;
1765
+ failure_redirect_url?: string | undefined;
1766
+ bank_code?: string | undefined;
1767
+ customer_name?: string | undefined;
1768
+ customer_email?: string | undefined;
1769
+ customer_phone?: string | undefined;
1770
+ ewallet_type?: string | undefined;
1771
+ customer?: {
1772
+ customer_name?: string | undefined;
1773
+ customer_email?: string | undefined;
1774
+ customer_phone?: string | undefined;
1775
+ billing_address?: {
1776
+ city?: string | undefined;
1777
+ postal_code?: string | undefined;
1778
+ first_name?: string | undefined;
1779
+ last_name?: string | undefined;
1780
+ address?: string | undefined;
1781
+ phone?: string | undefined;
1782
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1783
+ } | undefined;
1784
+ shipping_address?: {
1785
+ city?: string | undefined;
1786
+ postal_code?: string | undefined;
1787
+ first_name?: string | undefined;
1788
+ last_name?: string | undefined;
1789
+ address?: string | undefined;
1790
+ phone?: string | undefined;
1791
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1792
+ } | undefined;
1793
+ } | undefined;
1794
+ customer_notification_preference?: {
1795
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
1796
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
1797
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
1798
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
1799
+ } | undefined;
1800
+ should_authenticate_credit_card?: boolean | undefined;
1801
+ items?: {
1802
+ name: string;
1803
+ price: number;
1804
+ quantity: number;
1805
+ url?: string | undefined;
1806
+ category?: string | undefined;
1807
+ }[] | undefined;
1808
+ fees?: {
1809
+ value: number;
1810
+ type: string;
1811
+ }[] | undefined;
1812
+ paid_amount?: number | undefined;
1813
+ credit_card_charge_id?: string | undefined;
1814
+ payment_method?: string | undefined;
1815
+ payment_channel?: string | undefined;
1816
+ payment_destination?: string | undefined;
1817
+ payment_id?: string | undefined;
1818
+ paid_at?: string | undefined;
1819
+ on_demand_link?: string | undefined;
1820
+ recurring_payment_id?: string | undefined;
1821
+ available_banks?: {
1822
+ account_holder_name: string;
1823
+ bank_code: string;
1824
+ collection_type: string;
1825
+ bank_branch: string;
1826
+ transfer_amount: number;
1827
+ bank_account_number: string;
1828
+ identity_amount?: number | undefined;
1829
+ }[] | undefined;
1830
+ available_ewallets?: {
1831
+ ewallet_type: string;
1832
+ }[] | undefined;
1833
+ available_retail_outlets?: {
1834
+ retail_outlet_name: string;
1835
+ }[] | undefined;
1836
+ available_paylaters?: {
1837
+ paylater_type: string;
1838
+ }[] | undefined;
1839
+ available_qr_codes?: {
1840
+ qr_code_type: string;
1841
+ }[] | undefined;
1842
+ available_direct_debits?: {
1843
+ direct_debit_type: string;
1844
+ }[] | undefined;
1845
+ }>;
1846
+ list: (params?: any) => Promise<{
1847
+ data: {
1848
+ status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
1849
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1850
+ description: string;
1851
+ id: string;
1852
+ created: string;
1853
+ updated: string;
1854
+ amount: number;
1855
+ external_id: string;
1856
+ payer_email: string;
1857
+ should_exclude_credit_card: boolean;
1858
+ should_send_email: boolean;
1859
+ user_id: string;
1860
+ merchant_name: string;
1861
+ merchant_profile_picture_url: string;
1862
+ expiry_date: string;
1863
+ invoice_url: string;
1864
+ metadata?: Record<string, unknown> | undefined;
1865
+ success_redirect_url?: string | undefined;
1866
+ failure_redirect_url?: string | undefined;
1867
+ bank_code?: string | undefined;
1868
+ customer_name?: string | undefined;
1869
+ customer_email?: string | undefined;
1870
+ customer_phone?: string | undefined;
1871
+ ewallet_type?: string | undefined;
1872
+ customer?: {
1873
+ customer_name?: string | undefined;
1874
+ customer_email?: string | undefined;
1875
+ customer_phone?: string | undefined;
1876
+ billing_address?: {
1877
+ city?: string | undefined;
1878
+ postal_code?: string | undefined;
1879
+ first_name?: string | undefined;
1880
+ last_name?: string | undefined;
1881
+ address?: string | undefined;
1882
+ phone?: string | undefined;
1883
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1884
+ } | undefined;
1885
+ shipping_address?: {
1886
+ city?: string | undefined;
1887
+ postal_code?: string | undefined;
1888
+ first_name?: string | undefined;
1889
+ last_name?: string | undefined;
1890
+ address?: string | undefined;
1891
+ phone?: string | undefined;
1892
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1893
+ } | undefined;
1894
+ } | undefined;
1895
+ customer_notification_preference?: {
1896
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
1897
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
1898
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
1899
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
1900
+ } | undefined;
1901
+ should_authenticate_credit_card?: boolean | undefined;
1902
+ items?: {
1903
+ name: string;
1904
+ price: number;
1905
+ quantity: number;
1906
+ url?: string | undefined;
1907
+ category?: string | undefined;
1908
+ }[] | undefined;
1909
+ fees?: {
1910
+ value: number;
1911
+ type: string;
1912
+ }[] | undefined;
1913
+ paid_amount?: number | undefined;
1914
+ credit_card_charge_id?: string | undefined;
1915
+ payment_method?: string | undefined;
1916
+ payment_channel?: string | undefined;
1917
+ payment_destination?: string | undefined;
1918
+ payment_id?: string | undefined;
1919
+ paid_at?: string | undefined;
1920
+ on_demand_link?: string | undefined;
1921
+ recurring_payment_id?: string | undefined;
1922
+ available_banks?: {
1923
+ account_holder_name: string;
1924
+ bank_code: string;
1925
+ collection_type: string;
1926
+ bank_branch: string;
1927
+ transfer_amount: number;
1928
+ bank_account_number: string;
1929
+ identity_amount?: number | undefined;
1930
+ }[] | undefined;
1931
+ available_ewallets?: {
1932
+ ewallet_type: string;
1933
+ }[] | undefined;
1934
+ available_retail_outlets?: {
1935
+ retail_outlet_name: string;
1936
+ }[] | undefined;
1937
+ available_paylaters?: {
1938
+ paylater_type: string;
1939
+ }[] | undefined;
1940
+ available_qr_codes?: {
1941
+ qr_code_type: string;
1942
+ }[] | undefined;
1943
+ available_direct_debits?: {
1944
+ direct_debit_type: string;
1945
+ }[] | undefined;
1946
+ }[];
1947
+ has_more: boolean;
1948
+ }>;
1949
+ update: (data: {
1950
+ payload: {
1951
+ metadata?: Record<string, unknown> | undefined;
1952
+ success_redirect_url?: string | undefined;
1953
+ failure_redirect_url?: string | undefined;
1954
+ customer_name?: string | undefined;
1955
+ customer_email?: string | undefined;
1956
+ customer_phone?: string | undefined;
1957
+ should_send_email?: boolean | undefined;
1958
+ customer?: {
1959
+ customer_name?: string | undefined;
1960
+ customer_email?: string | undefined;
1961
+ customer_phone?: string | undefined;
1962
+ billing_address?: {
1963
+ city?: string | undefined;
1964
+ postal_code?: string | undefined;
1965
+ first_name?: string | undefined;
1966
+ last_name?: string | undefined;
1967
+ address?: string | undefined;
1968
+ phone?: string | undefined;
1969
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1970
+ } | undefined;
1971
+ shipping_address?: {
1972
+ city?: string | undefined;
1973
+ postal_code?: string | undefined;
1974
+ first_name?: string | undefined;
1975
+ last_name?: string | undefined;
1976
+ address?: string | undefined;
1977
+ phone?: string | undefined;
1978
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
1979
+ } | undefined;
1980
+ } | undefined;
1981
+ customer_notification_preference?: {
1982
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
1983
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
1984
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
1985
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
1986
+ } | undefined;
1987
+ items?: {
1988
+ name: string;
1989
+ price: number;
1990
+ quantity: number;
1991
+ url?: string | undefined;
1992
+ category?: string | undefined;
1993
+ }[] | undefined;
1994
+ };
1995
+ invoice_id: string;
1996
+ }) => Promise<{
1997
+ status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
1998
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
1999
+ description: string;
2000
+ id: string;
2001
+ created: string;
2002
+ updated: string;
2003
+ amount: number;
2004
+ external_id: string;
2005
+ payer_email: string;
2006
+ should_exclude_credit_card: boolean;
2007
+ should_send_email: boolean;
2008
+ user_id: string;
2009
+ merchant_name: string;
2010
+ merchant_profile_picture_url: string;
2011
+ expiry_date: string;
2012
+ invoice_url: string;
2013
+ metadata?: Record<string, unknown> | undefined;
2014
+ success_redirect_url?: string | undefined;
2015
+ failure_redirect_url?: string | undefined;
2016
+ bank_code?: string | undefined;
2017
+ customer_name?: string | undefined;
2018
+ customer_email?: string | undefined;
2019
+ customer_phone?: string | undefined;
2020
+ ewallet_type?: string | undefined;
2021
+ customer?: {
2022
+ customer_name?: string | undefined;
2023
+ customer_email?: string | undefined;
2024
+ customer_phone?: string | undefined;
2025
+ billing_address?: {
2026
+ city?: string | undefined;
2027
+ postal_code?: string | undefined;
2028
+ first_name?: string | undefined;
2029
+ last_name?: string | undefined;
2030
+ address?: string | undefined;
2031
+ phone?: string | undefined;
2032
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
2033
+ } | undefined;
2034
+ shipping_address?: {
2035
+ city?: string | undefined;
2036
+ postal_code?: string | undefined;
2037
+ first_name?: string | undefined;
2038
+ last_name?: string | undefined;
2039
+ address?: string | undefined;
2040
+ phone?: string | undefined;
2041
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
2042
+ } | undefined;
2043
+ } | undefined;
2044
+ customer_notification_preference?: {
2045
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
2046
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
2047
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
2048
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
2049
+ } | undefined;
2050
+ should_authenticate_credit_card?: boolean | undefined;
2051
+ items?: {
2052
+ name: string;
2053
+ price: number;
2054
+ quantity: number;
2055
+ url?: string | undefined;
2056
+ category?: string | undefined;
2057
+ }[] | undefined;
2058
+ fees?: {
2059
+ value: number;
2060
+ type: string;
2061
+ }[] | undefined;
2062
+ paid_amount?: number | undefined;
2063
+ credit_card_charge_id?: string | undefined;
2064
+ payment_method?: string | undefined;
2065
+ payment_channel?: string | undefined;
2066
+ payment_destination?: string | undefined;
2067
+ payment_id?: string | undefined;
2068
+ paid_at?: string | undefined;
2069
+ on_demand_link?: string | undefined;
2070
+ recurring_payment_id?: string | undefined;
2071
+ available_banks?: {
2072
+ account_holder_name: string;
2073
+ bank_code: string;
2074
+ collection_type: string;
2075
+ bank_branch: string;
2076
+ transfer_amount: number;
2077
+ bank_account_number: string;
2078
+ identity_amount?: number | undefined;
2079
+ }[] | undefined;
2080
+ available_ewallets?: {
2081
+ ewallet_type: string;
2082
+ }[] | undefined;
2083
+ available_retail_outlets?: {
2084
+ retail_outlet_name: string;
2085
+ }[] | undefined;
2086
+ available_paylaters?: {
2087
+ paylater_type: string;
2088
+ }[] | undefined;
2089
+ available_qr_codes?: {
2090
+ qr_code_type: string;
2091
+ }[] | undefined;
2092
+ available_direct_debits?: {
2093
+ direct_debit_type: string;
2094
+ }[] | undefined;
2095
+ }>;
2096
+ expire: (data: {
2097
+ invoice_id: string;
2098
+ }) => Promise<{
2099
+ status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
2100
+ currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
2101
+ description: string;
2102
+ id: string;
2103
+ created: string;
2104
+ updated: string;
2105
+ amount: number;
2106
+ external_id: string;
2107
+ payer_email: string;
2108
+ should_exclude_credit_card: boolean;
2109
+ should_send_email: boolean;
2110
+ user_id: string;
2111
+ merchant_name: string;
2112
+ merchant_profile_picture_url: string;
2113
+ expiry_date: string;
2114
+ invoice_url: string;
2115
+ metadata?: Record<string, unknown> | undefined;
2116
+ success_redirect_url?: string | undefined;
2117
+ failure_redirect_url?: string | undefined;
2118
+ bank_code?: string | undefined;
2119
+ customer_name?: string | undefined;
2120
+ customer_email?: string | undefined;
2121
+ customer_phone?: string | undefined;
2122
+ ewallet_type?: string | undefined;
2123
+ customer?: {
2124
+ customer_name?: string | undefined;
2125
+ customer_email?: string | undefined;
2126
+ customer_phone?: string | undefined;
2127
+ billing_address?: {
2128
+ city?: string | undefined;
2129
+ postal_code?: string | undefined;
2130
+ first_name?: string | undefined;
2131
+ last_name?: string | undefined;
2132
+ address?: string | undefined;
2133
+ phone?: string | undefined;
2134
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
2135
+ } | undefined;
2136
+ shipping_address?: {
2137
+ city?: string | undefined;
2138
+ postal_code?: string | undefined;
2139
+ first_name?: string | undefined;
2140
+ last_name?: string | undefined;
2141
+ address?: string | undefined;
2142
+ phone?: string | undefined;
2143
+ country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
2144
+ } | undefined;
2145
+ } | undefined;
2146
+ customer_notification_preference?: {
2147
+ invoice_created?: ("email" | "whatsapp" | "sms")[] | undefined;
2148
+ invoice_reminder?: ("email" | "whatsapp" | "sms")[] | undefined;
2149
+ invoice_paid?: ("email" | "whatsapp" | "sms")[] | undefined;
2150
+ invoice_expired?: ("email" | "whatsapp" | "sms")[] | undefined;
2151
+ } | undefined;
2152
+ should_authenticate_credit_card?: boolean | undefined;
2153
+ items?: {
2154
+ name: string;
2155
+ price: number;
2156
+ quantity: number;
2157
+ url?: string | undefined;
2158
+ category?: string | undefined;
2159
+ }[] | undefined;
2160
+ fees?: {
2161
+ value: number;
2162
+ type: string;
2163
+ }[] | undefined;
2164
+ paid_amount?: number | undefined;
2165
+ credit_card_charge_id?: string | undefined;
2166
+ payment_method?: string | undefined;
2167
+ payment_channel?: string | undefined;
2168
+ payment_destination?: string | undefined;
2169
+ payment_id?: string | undefined;
2170
+ paid_at?: string | undefined;
2171
+ on_demand_link?: string | undefined;
2172
+ recurring_payment_id?: string | undefined;
2173
+ available_banks?: {
2174
+ account_holder_name: string;
2175
+ bank_code: string;
2176
+ collection_type: string;
2177
+ bank_branch: string;
2178
+ transfer_amount: number;
2179
+ bank_account_number: string;
2180
+ identity_amount?: number | undefined;
2181
+ }[] | undefined;
2182
+ available_ewallets?: {
2183
+ ewallet_type: string;
2184
+ }[] | undefined;
2185
+ available_retail_outlets?: {
2186
+ retail_outlet_name: string;
2187
+ }[] | undefined;
2188
+ available_paylaters?: {
2189
+ paylater_type: string;
2190
+ }[] | undefined;
2191
+ available_qr_codes?: {
2192
+ qr_code_type: string;
2193
+ }[] | undefined;
2194
+ available_direct_debits?: {
2195
+ direct_debit_type: string;
2196
+ }[] | undefined;
2197
+ }>;
2198
+ };
2199
+ };
2200
+ export { Xendit };
2201
+ //# sourceMappingURL=index.d.ts.map