xendit-fn 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +515 -114
- package/lib/index.cjs +1273 -43
- package/lib/index.d.cts +9180 -6479
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.esm.d.ts +9180 -6479
- package/lib/index.esm.js +1273 -43
- package/lib/sdk/balance/index.d.ts +5 -0
- package/lib/sdk/balance/index.d.ts.map +1 -0
- package/lib/sdk/balance/schema.d.ts +170 -0
- package/lib/sdk/balance/schema.d.ts.map +1 -0
- package/lib/sdk/card/index.d.ts +14 -1
- package/lib/sdk/card/index.d.ts.map +1 -1
- package/lib/sdk/card/schema.d.ts +9 -8
- package/lib/sdk/card/schema.d.ts.map +1 -1
- package/lib/sdk/common.d.ts.map +1 -1
- package/lib/sdk/customer/index.d.ts.map +1 -1
- package/lib/sdk/ewallet/create.d.ts +3 -171
- package/lib/sdk/ewallet/create.d.ts.map +1 -1
- package/lib/sdk/index.d.ts +872 -2
- package/lib/sdk/index.d.ts.map +1 -1
- package/lib/sdk/invoice/index.d.ts.map +1 -1
- package/lib/sdk/payment-method/index.d.ts.map +1 -1
- package/lib/sdk/payment-request/index.d.ts +6 -0
- package/lib/sdk/payment-request/index.d.ts.map +1 -0
- package/lib/sdk/payment-request/schema.d.ts +1341 -0
- package/lib/sdk/payment-request/schema.d.ts.map +1 -0
- package/lib/sdk/payout/index.d.ts +7 -0
- package/lib/sdk/payout/index.d.ts.map +1 -0
- package/lib/sdk/payout/schema.d.ts +853 -0
- package/lib/sdk/payout/schema.d.ts.map +1 -0
- package/lib/sdk/refund/index.d.ts +6 -0
- package/lib/sdk/refund/index.d.ts.map +1 -0
- package/lib/sdk/refund/schema.d.ts +178 -0
- package/lib/sdk/refund/schema.d.ts.map +1 -0
- package/lib/utils/pagination.d.ts +1 -1
- package/lib/utils/pagination.d.ts.map +1 -1
- package/lib/utils/rate-limit.d.ts +3 -3
- package/lib/utils/rate-limit.d.ts.map +1 -1
- package/package.json +3 -2
package/lib/sdk/index.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { type RateLimitConfig } from "../utils/rate-limit";
|
|
2
|
+
import type { ListPaymentMethods } from "./payment-method/schema";
|
|
3
|
+
import type { ListInvoices } from "./invoice/schema";
|
|
4
|
+
import type { ListPaymentRequests } from "./payment-request/schema";
|
|
5
|
+
import type { ListRefunds } from "./refund/schema";
|
|
6
|
+
import type { ListPayouts } from "./payout/schema";
|
|
7
|
+
import type { ListTransactions } from "./balance/schema";
|
|
2
8
|
export type { Customer, CustomerResource, GetCustomer, GetCustomerByRefId, GetCustomerByRefIdResource, UpdateParams, } from "./customer/schema";
|
|
3
9
|
export type { EWalletChargeParams, EWalletChargeResource, GetEWalletChargeParams, } from "./ewallet/schema";
|
|
4
10
|
export type { CreatePaymentMethod, GetPaymentMethod, ListPaymentMethods, UpdatePaymentMethod, PaymentMethodResource, } from "./payment-method/schema";
|
|
5
11
|
export type { CreateInvoice, GetInvoice, ListInvoices, UpdateInvoice, ExpireInvoice, InvoiceResource, } from "./invoice/schema";
|
|
12
|
+
export type { CreatePaymentRequest, GetPaymentRequest, ListPaymentRequests, PaymentRequestResource, PaymentRequestType, PaymentRequestStatus, } from "./payment-request/schema";
|
|
13
|
+
export type { CreateRefund, GetRefund, ListRefunds, RefundResource, RefundReason, RefundStatus, } from "./refund/schema";
|
|
14
|
+
export type { CreatePayout, GetPayout, ListPayouts, CancelPayout, PayoutResource, PayoutStatus, PayoutChannelCode, } from "./payout/schema";
|
|
15
|
+
export type { BalanceResource, ListTransactions, TransactionResource, TransactionType, TransactionStatus, } from "./balance/schema";
|
|
16
|
+
export type { TokenParams, TokenResource, TokenAuthentication, TokenAuthenticationResource, TokenAuthorization, ZeroAuthorization, ReverseAuthorizationParams, CreateCharge, ChargeResource, CardInfo, TokenStatus, CardType, CardBrand, } from "./card/schema";
|
|
6
17
|
export type { RateLimitConfig };
|
|
7
18
|
interface XenditOptions {
|
|
8
19
|
/**
|
|
@@ -1460,7 +1471,7 @@ declare const Xendit: (key: string, options?: XenditOptions) => {
|
|
|
1460
1471
|
country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
1461
1472
|
} | undefined;
|
|
1462
1473
|
}>;
|
|
1463
|
-
list: (params?:
|
|
1474
|
+
list: (params?: ListPaymentMethods) => Promise<{
|
|
1464
1475
|
data: {
|
|
1465
1476
|
status: "PENDING" | "FAILED" | "ACTIVE" | "INACTIVE" | "EXPIRED";
|
|
1466
1477
|
type: "BANK_ACCOUNT" | "EWALLET" | "QR_CODE" | "CARD" | "OVER_THE_COUNTER" | "VIRTUAL_ACCOUNT";
|
|
@@ -1843,7 +1854,7 @@ declare const Xendit: (key: string, options?: XenditOptions) => {
|
|
|
1843
1854
|
direct_debit_type: string;
|
|
1844
1855
|
}[] | undefined;
|
|
1845
1856
|
}>;
|
|
1846
|
-
list: (params?:
|
|
1857
|
+
list: (params?: ListInvoices) => Promise<{
|
|
1847
1858
|
data: {
|
|
1848
1859
|
status: "PENDING" | "EXPIRED" | "PAID" | "SETTLED";
|
|
1849
1860
|
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
@@ -2196,6 +2207,865 @@ declare const Xendit: (key: string, options?: XenditOptions) => {
|
|
|
2196
2207
|
}[] | undefined;
|
|
2197
2208
|
}>;
|
|
2198
2209
|
};
|
|
2210
|
+
paymentRequest: {
|
|
2211
|
+
create: (data: {
|
|
2212
|
+
type: "PAY" | "PAY_AND_SAVE" | "REUSABLE_PAYMENT_CODE";
|
|
2213
|
+
country: "PH" | "ID" | "MY" | "TH" | "VN";
|
|
2214
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2215
|
+
reference_id: string;
|
|
2216
|
+
payment_method: {
|
|
2217
|
+
type: string;
|
|
2218
|
+
ewallet?: {
|
|
2219
|
+
channel_code: string;
|
|
2220
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2221
|
+
} | undefined;
|
|
2222
|
+
card_information?: {
|
|
2223
|
+
token_id: string;
|
|
2224
|
+
} | undefined;
|
|
2225
|
+
direct_debit?: {
|
|
2226
|
+
channel_code: string;
|
|
2227
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2228
|
+
} | undefined;
|
|
2229
|
+
over_the_counter?: {
|
|
2230
|
+
channel_code: string;
|
|
2231
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2232
|
+
} | undefined;
|
|
2233
|
+
qr_code?: {
|
|
2234
|
+
channel_code: string;
|
|
2235
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2236
|
+
} | undefined;
|
|
2237
|
+
virtual_account?: {
|
|
2238
|
+
channel_code: string;
|
|
2239
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2240
|
+
} | undefined;
|
|
2241
|
+
};
|
|
2242
|
+
request_amount: number;
|
|
2243
|
+
description?: string | undefined;
|
|
2244
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2245
|
+
success_redirect_url?: string | undefined;
|
|
2246
|
+
failure_redirect_url?: string | undefined;
|
|
2247
|
+
customer_id?: string | undefined;
|
|
2248
|
+
customer?: {
|
|
2249
|
+
given_names: string;
|
|
2250
|
+
surname?: string | undefined;
|
|
2251
|
+
email?: string | undefined;
|
|
2252
|
+
mobile_number?: string | undefined;
|
|
2253
|
+
} | undefined;
|
|
2254
|
+
items?: {
|
|
2255
|
+
name: string;
|
|
2256
|
+
price: number;
|
|
2257
|
+
quantity: number;
|
|
2258
|
+
url?: string | undefined;
|
|
2259
|
+
category?: string | undefined;
|
|
2260
|
+
reference_id?: string | undefined;
|
|
2261
|
+
}[] | undefined;
|
|
2262
|
+
shipping_information?: {
|
|
2263
|
+
name: string;
|
|
2264
|
+
phone_number?: string | undefined;
|
|
2265
|
+
city?: string | undefined;
|
|
2266
|
+
postal_code?: string | undefined;
|
|
2267
|
+
address?: string | undefined;
|
|
2268
|
+
country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2269
|
+
province?: string | undefined;
|
|
2270
|
+
} | undefined;
|
|
2271
|
+
capture_method?: "AUTOMATIC" | "MANUAL" | undefined;
|
|
2272
|
+
}) => Promise<{
|
|
2273
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED" | "VOIDED" | "REQUIRES_ACTION" | "CANCELED";
|
|
2274
|
+
type: "PAY" | "PAY_AND_SAVE" | "REUSABLE_PAYMENT_CODE";
|
|
2275
|
+
country: "PH" | "ID" | "MY" | "TH" | "VN";
|
|
2276
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2277
|
+
reference_id: string;
|
|
2278
|
+
id: string;
|
|
2279
|
+
created: string;
|
|
2280
|
+
updated: string;
|
|
2281
|
+
payment_method: {
|
|
2282
|
+
type: string;
|
|
2283
|
+
ewallet?: {
|
|
2284
|
+
channel_code: string;
|
|
2285
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2286
|
+
} | undefined;
|
|
2287
|
+
card_information?: {
|
|
2288
|
+
token_id: string;
|
|
2289
|
+
} | undefined;
|
|
2290
|
+
direct_debit?: {
|
|
2291
|
+
channel_code: string;
|
|
2292
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2293
|
+
} | undefined;
|
|
2294
|
+
over_the_counter?: {
|
|
2295
|
+
channel_code: string;
|
|
2296
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2297
|
+
} | undefined;
|
|
2298
|
+
qr_code?: {
|
|
2299
|
+
channel_code: string;
|
|
2300
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2301
|
+
} | undefined;
|
|
2302
|
+
virtual_account?: {
|
|
2303
|
+
channel_code: string;
|
|
2304
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2305
|
+
} | undefined;
|
|
2306
|
+
};
|
|
2307
|
+
request_amount: number;
|
|
2308
|
+
description?: string | undefined;
|
|
2309
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2310
|
+
customer_id?: string | undefined;
|
|
2311
|
+
actions?: {
|
|
2312
|
+
desktop_web_checkout_url?: string | undefined;
|
|
2313
|
+
mobile_web_checkout_url?: string | undefined;
|
|
2314
|
+
mobile_deeplink_checkout_url?: string | undefined;
|
|
2315
|
+
qr_checkout_string?: string | undefined;
|
|
2316
|
+
} | undefined;
|
|
2317
|
+
customer?: {
|
|
2318
|
+
given_names: string;
|
|
2319
|
+
surname?: string | undefined;
|
|
2320
|
+
email?: string | undefined;
|
|
2321
|
+
mobile_number?: string | undefined;
|
|
2322
|
+
} | undefined;
|
|
2323
|
+
items?: {
|
|
2324
|
+
name: string;
|
|
2325
|
+
price: number;
|
|
2326
|
+
quantity: number;
|
|
2327
|
+
url?: string | undefined;
|
|
2328
|
+
category?: string | undefined;
|
|
2329
|
+
reference_id?: string | undefined;
|
|
2330
|
+
}[] | undefined;
|
|
2331
|
+
paid_amount?: number | undefined;
|
|
2332
|
+
shipping_information?: {
|
|
2333
|
+
name: string;
|
|
2334
|
+
phone_number?: string | undefined;
|
|
2335
|
+
city?: string | undefined;
|
|
2336
|
+
postal_code?: string | undefined;
|
|
2337
|
+
address?: string | undefined;
|
|
2338
|
+
country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2339
|
+
province?: string | undefined;
|
|
2340
|
+
} | undefined;
|
|
2341
|
+
failure_reason?: string | undefined;
|
|
2342
|
+
payment_request_id?: string | undefined;
|
|
2343
|
+
}>;
|
|
2344
|
+
get: (data: {
|
|
2345
|
+
id: string;
|
|
2346
|
+
}) => Promise<{
|
|
2347
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED" | "VOIDED" | "REQUIRES_ACTION" | "CANCELED";
|
|
2348
|
+
type: "PAY" | "PAY_AND_SAVE" | "REUSABLE_PAYMENT_CODE";
|
|
2349
|
+
country: "PH" | "ID" | "MY" | "TH" | "VN";
|
|
2350
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2351
|
+
reference_id: string;
|
|
2352
|
+
id: string;
|
|
2353
|
+
created: string;
|
|
2354
|
+
updated: string;
|
|
2355
|
+
payment_method: {
|
|
2356
|
+
type: string;
|
|
2357
|
+
ewallet?: {
|
|
2358
|
+
channel_code: string;
|
|
2359
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2360
|
+
} | undefined;
|
|
2361
|
+
card_information?: {
|
|
2362
|
+
token_id: string;
|
|
2363
|
+
} | undefined;
|
|
2364
|
+
direct_debit?: {
|
|
2365
|
+
channel_code: string;
|
|
2366
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2367
|
+
} | undefined;
|
|
2368
|
+
over_the_counter?: {
|
|
2369
|
+
channel_code: string;
|
|
2370
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2371
|
+
} | undefined;
|
|
2372
|
+
qr_code?: {
|
|
2373
|
+
channel_code: string;
|
|
2374
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2375
|
+
} | undefined;
|
|
2376
|
+
virtual_account?: {
|
|
2377
|
+
channel_code: string;
|
|
2378
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2379
|
+
} | undefined;
|
|
2380
|
+
};
|
|
2381
|
+
request_amount: number;
|
|
2382
|
+
description?: string | undefined;
|
|
2383
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2384
|
+
customer_id?: string | undefined;
|
|
2385
|
+
actions?: {
|
|
2386
|
+
desktop_web_checkout_url?: string | undefined;
|
|
2387
|
+
mobile_web_checkout_url?: string | undefined;
|
|
2388
|
+
mobile_deeplink_checkout_url?: string | undefined;
|
|
2389
|
+
qr_checkout_string?: string | undefined;
|
|
2390
|
+
} | undefined;
|
|
2391
|
+
customer?: {
|
|
2392
|
+
given_names: string;
|
|
2393
|
+
surname?: string | undefined;
|
|
2394
|
+
email?: string | undefined;
|
|
2395
|
+
mobile_number?: string | undefined;
|
|
2396
|
+
} | undefined;
|
|
2397
|
+
items?: {
|
|
2398
|
+
name: string;
|
|
2399
|
+
price: number;
|
|
2400
|
+
quantity: number;
|
|
2401
|
+
url?: string | undefined;
|
|
2402
|
+
category?: string | undefined;
|
|
2403
|
+
reference_id?: string | undefined;
|
|
2404
|
+
}[] | undefined;
|
|
2405
|
+
paid_amount?: number | undefined;
|
|
2406
|
+
shipping_information?: {
|
|
2407
|
+
name: string;
|
|
2408
|
+
phone_number?: string | undefined;
|
|
2409
|
+
city?: string | undefined;
|
|
2410
|
+
postal_code?: string | undefined;
|
|
2411
|
+
address?: string | undefined;
|
|
2412
|
+
country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2413
|
+
province?: string | undefined;
|
|
2414
|
+
} | undefined;
|
|
2415
|
+
failure_reason?: string | undefined;
|
|
2416
|
+
payment_request_id?: string | undefined;
|
|
2417
|
+
}>;
|
|
2418
|
+
list: (params?: ListPaymentRequests) => Promise<{
|
|
2419
|
+
data: {
|
|
2420
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED" | "VOIDED" | "REQUIRES_ACTION" | "CANCELED";
|
|
2421
|
+
type: "PAY" | "PAY_AND_SAVE" | "REUSABLE_PAYMENT_CODE";
|
|
2422
|
+
country: "PH" | "ID" | "MY" | "TH" | "VN";
|
|
2423
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2424
|
+
reference_id: string;
|
|
2425
|
+
id: string;
|
|
2426
|
+
created: string;
|
|
2427
|
+
updated: string;
|
|
2428
|
+
payment_method: {
|
|
2429
|
+
type: string;
|
|
2430
|
+
ewallet?: {
|
|
2431
|
+
channel_code: string;
|
|
2432
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2433
|
+
} | undefined;
|
|
2434
|
+
card_information?: {
|
|
2435
|
+
token_id: string;
|
|
2436
|
+
} | undefined;
|
|
2437
|
+
direct_debit?: {
|
|
2438
|
+
channel_code: string;
|
|
2439
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2440
|
+
} | undefined;
|
|
2441
|
+
over_the_counter?: {
|
|
2442
|
+
channel_code: string;
|
|
2443
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2444
|
+
} | undefined;
|
|
2445
|
+
qr_code?: {
|
|
2446
|
+
channel_code: string;
|
|
2447
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2448
|
+
} | undefined;
|
|
2449
|
+
virtual_account?: {
|
|
2450
|
+
channel_code: string;
|
|
2451
|
+
channel_properties?: Record<string, unknown> | undefined;
|
|
2452
|
+
} | undefined;
|
|
2453
|
+
};
|
|
2454
|
+
request_amount: number;
|
|
2455
|
+
description?: string | undefined;
|
|
2456
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2457
|
+
customer_id?: string | undefined;
|
|
2458
|
+
actions?: {
|
|
2459
|
+
desktop_web_checkout_url?: string | undefined;
|
|
2460
|
+
mobile_web_checkout_url?: string | undefined;
|
|
2461
|
+
mobile_deeplink_checkout_url?: string | undefined;
|
|
2462
|
+
qr_checkout_string?: string | undefined;
|
|
2463
|
+
} | undefined;
|
|
2464
|
+
customer?: {
|
|
2465
|
+
given_names: string;
|
|
2466
|
+
surname?: string | undefined;
|
|
2467
|
+
email?: string | undefined;
|
|
2468
|
+
mobile_number?: string | undefined;
|
|
2469
|
+
} | undefined;
|
|
2470
|
+
items?: {
|
|
2471
|
+
name: string;
|
|
2472
|
+
price: number;
|
|
2473
|
+
quantity: number;
|
|
2474
|
+
url?: string | undefined;
|
|
2475
|
+
category?: string | undefined;
|
|
2476
|
+
reference_id?: string | undefined;
|
|
2477
|
+
}[] | undefined;
|
|
2478
|
+
paid_amount?: number | undefined;
|
|
2479
|
+
shipping_information?: {
|
|
2480
|
+
name: string;
|
|
2481
|
+
phone_number?: string | undefined;
|
|
2482
|
+
city?: string | undefined;
|
|
2483
|
+
postal_code?: string | undefined;
|
|
2484
|
+
address?: string | undefined;
|
|
2485
|
+
country_code?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2486
|
+
province?: string | undefined;
|
|
2487
|
+
} | undefined;
|
|
2488
|
+
failure_reason?: string | undefined;
|
|
2489
|
+
payment_request_id?: string | undefined;
|
|
2490
|
+
}[];
|
|
2491
|
+
has_more: boolean;
|
|
2492
|
+
links?: {
|
|
2493
|
+
method: string;
|
|
2494
|
+
href: string;
|
|
2495
|
+
rel: string;
|
|
2496
|
+
}[] | undefined;
|
|
2497
|
+
}>;
|
|
2498
|
+
};
|
|
2499
|
+
refund: {
|
|
2500
|
+
create: (data: {
|
|
2501
|
+
payment_request_id: string;
|
|
2502
|
+
reason: "REQUESTED_BY_CUSTOMER" | "FRAUDULENT" | "DUPLICATE" | "CANCELLATION" | "OTHERS";
|
|
2503
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2504
|
+
amount?: number | undefined;
|
|
2505
|
+
}) => Promise<{
|
|
2506
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED";
|
|
2507
|
+
currency: string;
|
|
2508
|
+
id: string;
|
|
2509
|
+
created: string;
|
|
2510
|
+
updated: string;
|
|
2511
|
+
amount: number;
|
|
2512
|
+
payment_request_id: string;
|
|
2513
|
+
reason: "REQUESTED_BY_CUSTOMER" | "FRAUDULENT" | "DUPLICATE" | "CANCELLATION" | "OTHERS";
|
|
2514
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2515
|
+
failure_reason?: string | undefined;
|
|
2516
|
+
}>;
|
|
2517
|
+
get: (data: {
|
|
2518
|
+
id: string;
|
|
2519
|
+
}) => Promise<{
|
|
2520
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED";
|
|
2521
|
+
currency: string;
|
|
2522
|
+
id: string;
|
|
2523
|
+
created: string;
|
|
2524
|
+
updated: string;
|
|
2525
|
+
amount: number;
|
|
2526
|
+
payment_request_id: string;
|
|
2527
|
+
reason: "REQUESTED_BY_CUSTOMER" | "FRAUDULENT" | "DUPLICATE" | "CANCELLATION" | "OTHERS";
|
|
2528
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2529
|
+
failure_reason?: string | undefined;
|
|
2530
|
+
}>;
|
|
2531
|
+
list: (params?: ListRefunds) => Promise<{
|
|
2532
|
+
data: {
|
|
2533
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED";
|
|
2534
|
+
currency: string;
|
|
2535
|
+
id: string;
|
|
2536
|
+
created: string;
|
|
2537
|
+
updated: string;
|
|
2538
|
+
amount: number;
|
|
2539
|
+
payment_request_id: string;
|
|
2540
|
+
reason: "REQUESTED_BY_CUSTOMER" | "FRAUDULENT" | "DUPLICATE" | "CANCELLATION" | "OTHERS";
|
|
2541
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2542
|
+
failure_reason?: string | undefined;
|
|
2543
|
+
}[];
|
|
2544
|
+
has_more: boolean;
|
|
2545
|
+
links?: {
|
|
2546
|
+
method: string;
|
|
2547
|
+
href: string;
|
|
2548
|
+
rel: string;
|
|
2549
|
+
}[] | undefined;
|
|
2550
|
+
}>;
|
|
2551
|
+
};
|
|
2552
|
+
payout: {
|
|
2553
|
+
create: (data: {
|
|
2554
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2555
|
+
reference_id: string;
|
|
2556
|
+
channel_code: "EWALLET" | "BANK" | "CASH";
|
|
2557
|
+
channel_properties: {
|
|
2558
|
+
channel_code: "BANK";
|
|
2559
|
+
bank_account: {
|
|
2560
|
+
account_number: string;
|
|
2561
|
+
account_holder_name: string;
|
|
2562
|
+
bank_code: string;
|
|
2563
|
+
account_type?: string | undefined;
|
|
2564
|
+
};
|
|
2565
|
+
} | {
|
|
2566
|
+
channel_code: "EWALLET";
|
|
2567
|
+
ewallet: {
|
|
2568
|
+
account_number: string;
|
|
2569
|
+
account_holder_name: string;
|
|
2570
|
+
ewallet_type: string;
|
|
2571
|
+
};
|
|
2572
|
+
} | {
|
|
2573
|
+
channel_code: "CASH";
|
|
2574
|
+
cash: {
|
|
2575
|
+
account_number: string;
|
|
2576
|
+
account_holder_name: string;
|
|
2577
|
+
};
|
|
2578
|
+
};
|
|
2579
|
+
amount: number;
|
|
2580
|
+
description?: string | undefined;
|
|
2581
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2582
|
+
receipt_notification?: {
|
|
2583
|
+
email_to?: string[] | undefined;
|
|
2584
|
+
email_cc?: string[] | undefined;
|
|
2585
|
+
email_bcc?: string[] | undefined;
|
|
2586
|
+
} | undefined;
|
|
2587
|
+
}) => Promise<{
|
|
2588
|
+
status: "PENDING" | "FAILED" | "ACCEPTED" | "PROCESSING" | "COMPLETED" | "CANCELLED" | "REVERSED";
|
|
2589
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2590
|
+
reference_id: string;
|
|
2591
|
+
id: string;
|
|
2592
|
+
created: string;
|
|
2593
|
+
updated: string;
|
|
2594
|
+
channel_code: "EWALLET" | "BANK" | "CASH";
|
|
2595
|
+
channel_properties: {
|
|
2596
|
+
channel_code: "BANK";
|
|
2597
|
+
bank_account: {
|
|
2598
|
+
account_number: string;
|
|
2599
|
+
account_holder_name: string;
|
|
2600
|
+
bank_code: string;
|
|
2601
|
+
account_type?: string | undefined;
|
|
2602
|
+
};
|
|
2603
|
+
} | {
|
|
2604
|
+
channel_code: "EWALLET";
|
|
2605
|
+
ewallet: {
|
|
2606
|
+
account_number: string;
|
|
2607
|
+
account_holder_name: string;
|
|
2608
|
+
ewallet_type: string;
|
|
2609
|
+
};
|
|
2610
|
+
} | {
|
|
2611
|
+
channel_code: "CASH";
|
|
2612
|
+
cash: {
|
|
2613
|
+
account_number: string;
|
|
2614
|
+
account_holder_name: string;
|
|
2615
|
+
};
|
|
2616
|
+
};
|
|
2617
|
+
amount: number;
|
|
2618
|
+
description?: string | undefined;
|
|
2619
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2620
|
+
failure_reason?: string | undefined;
|
|
2621
|
+
receipt_notification?: {
|
|
2622
|
+
email_to?: string[] | undefined;
|
|
2623
|
+
email_cc?: string[] | undefined;
|
|
2624
|
+
email_bcc?: string[] | undefined;
|
|
2625
|
+
} | undefined;
|
|
2626
|
+
estimated_arrival_time?: string | undefined;
|
|
2627
|
+
}>;
|
|
2628
|
+
get: (data: {
|
|
2629
|
+
id: string;
|
|
2630
|
+
}) => Promise<{
|
|
2631
|
+
status: "PENDING" | "FAILED" | "ACCEPTED" | "PROCESSING" | "COMPLETED" | "CANCELLED" | "REVERSED";
|
|
2632
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2633
|
+
reference_id: string;
|
|
2634
|
+
id: string;
|
|
2635
|
+
created: string;
|
|
2636
|
+
updated: string;
|
|
2637
|
+
channel_code: "EWALLET" | "BANK" | "CASH";
|
|
2638
|
+
channel_properties: {
|
|
2639
|
+
channel_code: "BANK";
|
|
2640
|
+
bank_account: {
|
|
2641
|
+
account_number: string;
|
|
2642
|
+
account_holder_name: string;
|
|
2643
|
+
bank_code: string;
|
|
2644
|
+
account_type?: string | undefined;
|
|
2645
|
+
};
|
|
2646
|
+
} | {
|
|
2647
|
+
channel_code: "EWALLET";
|
|
2648
|
+
ewallet: {
|
|
2649
|
+
account_number: string;
|
|
2650
|
+
account_holder_name: string;
|
|
2651
|
+
ewallet_type: string;
|
|
2652
|
+
};
|
|
2653
|
+
} | {
|
|
2654
|
+
channel_code: "CASH";
|
|
2655
|
+
cash: {
|
|
2656
|
+
account_number: string;
|
|
2657
|
+
account_holder_name: string;
|
|
2658
|
+
};
|
|
2659
|
+
};
|
|
2660
|
+
amount: number;
|
|
2661
|
+
description?: string | undefined;
|
|
2662
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2663
|
+
failure_reason?: string | undefined;
|
|
2664
|
+
receipt_notification?: {
|
|
2665
|
+
email_to?: string[] | undefined;
|
|
2666
|
+
email_cc?: string[] | undefined;
|
|
2667
|
+
email_bcc?: string[] | undefined;
|
|
2668
|
+
} | undefined;
|
|
2669
|
+
estimated_arrival_time?: string | undefined;
|
|
2670
|
+
}>;
|
|
2671
|
+
list: (params?: ListPayouts) => Promise<{
|
|
2672
|
+
data: {
|
|
2673
|
+
status: "PENDING" | "FAILED" | "ACCEPTED" | "PROCESSING" | "COMPLETED" | "CANCELLED" | "REVERSED";
|
|
2674
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2675
|
+
reference_id: string;
|
|
2676
|
+
id: string;
|
|
2677
|
+
created: string;
|
|
2678
|
+
updated: string;
|
|
2679
|
+
channel_code: "EWALLET" | "BANK" | "CASH";
|
|
2680
|
+
channel_properties: {
|
|
2681
|
+
channel_code: "BANK";
|
|
2682
|
+
bank_account: {
|
|
2683
|
+
account_number: string;
|
|
2684
|
+
account_holder_name: string;
|
|
2685
|
+
bank_code: string;
|
|
2686
|
+
account_type?: string | undefined;
|
|
2687
|
+
};
|
|
2688
|
+
} | {
|
|
2689
|
+
channel_code: "EWALLET";
|
|
2690
|
+
ewallet: {
|
|
2691
|
+
account_number: string;
|
|
2692
|
+
account_holder_name: string;
|
|
2693
|
+
ewallet_type: string;
|
|
2694
|
+
};
|
|
2695
|
+
} | {
|
|
2696
|
+
channel_code: "CASH";
|
|
2697
|
+
cash: {
|
|
2698
|
+
account_number: string;
|
|
2699
|
+
account_holder_name: string;
|
|
2700
|
+
};
|
|
2701
|
+
};
|
|
2702
|
+
amount: number;
|
|
2703
|
+
description?: string | undefined;
|
|
2704
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2705
|
+
failure_reason?: string | undefined;
|
|
2706
|
+
receipt_notification?: {
|
|
2707
|
+
email_to?: string[] | undefined;
|
|
2708
|
+
email_cc?: string[] | undefined;
|
|
2709
|
+
email_bcc?: string[] | undefined;
|
|
2710
|
+
} | undefined;
|
|
2711
|
+
estimated_arrival_time?: string | undefined;
|
|
2712
|
+
}[];
|
|
2713
|
+
has_more: boolean;
|
|
2714
|
+
links?: {
|
|
2715
|
+
method: string;
|
|
2716
|
+
href: string;
|
|
2717
|
+
rel: string;
|
|
2718
|
+
}[] | undefined;
|
|
2719
|
+
}>;
|
|
2720
|
+
cancel: (data: {
|
|
2721
|
+
id: string;
|
|
2722
|
+
}) => Promise<{
|
|
2723
|
+
status: "PENDING" | "FAILED" | "ACCEPTED" | "PROCESSING" | "COMPLETED" | "CANCELLED" | "REVERSED";
|
|
2724
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2725
|
+
reference_id: string;
|
|
2726
|
+
id: string;
|
|
2727
|
+
created: string;
|
|
2728
|
+
updated: string;
|
|
2729
|
+
channel_code: "EWALLET" | "BANK" | "CASH";
|
|
2730
|
+
channel_properties: {
|
|
2731
|
+
channel_code: "BANK";
|
|
2732
|
+
bank_account: {
|
|
2733
|
+
account_number: string;
|
|
2734
|
+
account_holder_name: string;
|
|
2735
|
+
bank_code: string;
|
|
2736
|
+
account_type?: string | undefined;
|
|
2737
|
+
};
|
|
2738
|
+
} | {
|
|
2739
|
+
channel_code: "EWALLET";
|
|
2740
|
+
ewallet: {
|
|
2741
|
+
account_number: string;
|
|
2742
|
+
account_holder_name: string;
|
|
2743
|
+
ewallet_type: string;
|
|
2744
|
+
};
|
|
2745
|
+
} | {
|
|
2746
|
+
channel_code: "CASH";
|
|
2747
|
+
cash: {
|
|
2748
|
+
account_number: string;
|
|
2749
|
+
account_holder_name: string;
|
|
2750
|
+
};
|
|
2751
|
+
};
|
|
2752
|
+
amount: number;
|
|
2753
|
+
description?: string | undefined;
|
|
2754
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2755
|
+
failure_reason?: string | undefined;
|
|
2756
|
+
receipt_notification?: {
|
|
2757
|
+
email_to?: string[] | undefined;
|
|
2758
|
+
email_cc?: string[] | undefined;
|
|
2759
|
+
email_bcc?: string[] | undefined;
|
|
2760
|
+
} | undefined;
|
|
2761
|
+
estimated_arrival_time?: string | undefined;
|
|
2762
|
+
}>;
|
|
2763
|
+
};
|
|
2764
|
+
balance: {
|
|
2765
|
+
get: () => Promise<{
|
|
2766
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2767
|
+
balance: number;
|
|
2768
|
+
account_type?: string | undefined;
|
|
2769
|
+
}>;
|
|
2770
|
+
listTransactions: (params?: ListTransactions) => Promise<{
|
|
2771
|
+
data: {
|
|
2772
|
+
status: "SUCCEEDED" | "PENDING" | "FAILED" | "CANCELLED";
|
|
2773
|
+
type: "PAYMENT" | "PAYOUT" | "REFUND" | "FEE" | "ADJUSTMENT";
|
|
2774
|
+
currency: "PHP" | "IDR" | "MYR" | "THB" | "VND";
|
|
2775
|
+
id: string;
|
|
2776
|
+
created: string;
|
|
2777
|
+
updated: string;
|
|
2778
|
+
amount: number;
|
|
2779
|
+
description?: string | undefined;
|
|
2780
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2781
|
+
reference_id?: string | undefined;
|
|
2782
|
+
}[];
|
|
2783
|
+
has_more: boolean;
|
|
2784
|
+
links?: {
|
|
2785
|
+
method: string;
|
|
2786
|
+
href: string;
|
|
2787
|
+
rel: string;
|
|
2788
|
+
}[] | undefined;
|
|
2789
|
+
}>;
|
|
2790
|
+
};
|
|
2791
|
+
card: {
|
|
2792
|
+
createToken: (data: {
|
|
2793
|
+
mid_label: string;
|
|
2794
|
+
is_multiple_use: boolean;
|
|
2795
|
+
should_authenticate: boolean;
|
|
2796
|
+
currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
|
|
2797
|
+
amount?: string | undefined;
|
|
2798
|
+
external_id?: string | undefined;
|
|
2799
|
+
card_data?: {
|
|
2800
|
+
account_number: string;
|
|
2801
|
+
exp_month: string;
|
|
2802
|
+
exp_year: string;
|
|
2803
|
+
card_holder_first_name: string;
|
|
2804
|
+
card_holder_last_name: string;
|
|
2805
|
+
card_holder_email: string;
|
|
2806
|
+
card_holder_phone_number: string;
|
|
2807
|
+
} | undefined;
|
|
2808
|
+
card_cvn?: string | undefined;
|
|
2809
|
+
billing_details?: {
|
|
2810
|
+
country: string;
|
|
2811
|
+
street_line1?: string | null | undefined;
|
|
2812
|
+
street_line2?: string | null | undefined;
|
|
2813
|
+
city?: string | null | undefined;
|
|
2814
|
+
province_state?: string | null | undefined;
|
|
2815
|
+
postal_code?: string | null | undefined;
|
|
2816
|
+
category?: string | null | undefined;
|
|
2817
|
+
is_primary?: boolean | null | undefined;
|
|
2818
|
+
} | undefined;
|
|
2819
|
+
}) => Promise<{
|
|
2820
|
+
status: string;
|
|
2821
|
+
id: string;
|
|
2822
|
+
created: string;
|
|
2823
|
+
external_id: string;
|
|
2824
|
+
authentication_id: string;
|
|
2825
|
+
masked_card_number: string;
|
|
2826
|
+
business_id?: string | undefined;
|
|
2827
|
+
failure_reason?: string | undefined;
|
|
2828
|
+
payer_authentication_url?: string | undefined;
|
|
2829
|
+
card_info?: {
|
|
2830
|
+
type?: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN" | undefined;
|
|
2831
|
+
country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2832
|
+
bank?: string | undefined;
|
|
2833
|
+
brand?: "VISA" | "MASTERCARD" | "JCB" | "AMEX" | undefined;
|
|
2834
|
+
fingerprint?: string | undefined;
|
|
2835
|
+
card_art_url?: string | undefined;
|
|
2836
|
+
} | undefined;
|
|
2837
|
+
}>;
|
|
2838
|
+
getToken: (data: {
|
|
2839
|
+
credit_card_token_id: string;
|
|
2840
|
+
}) => Promise<{
|
|
2841
|
+
status: string;
|
|
2842
|
+
id: string;
|
|
2843
|
+
created: string;
|
|
2844
|
+
external_id: string;
|
|
2845
|
+
authentication_id: string;
|
|
2846
|
+
masked_card_number: string;
|
|
2847
|
+
business_id?: string | undefined;
|
|
2848
|
+
failure_reason?: string | undefined;
|
|
2849
|
+
payer_authentication_url?: string | undefined;
|
|
2850
|
+
card_info?: {
|
|
2851
|
+
type?: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN" | undefined;
|
|
2852
|
+
country?: "PH" | "ID" | "MY" | "TH" | "VN" | undefined;
|
|
2853
|
+
bank?: string | undefined;
|
|
2854
|
+
brand?: "VISA" | "MASTERCARD" | "JCB" | "AMEX" | undefined;
|
|
2855
|
+
fingerprint?: string | undefined;
|
|
2856
|
+
card_art_url?: string | undefined;
|
|
2857
|
+
} | undefined;
|
|
2858
|
+
}>;
|
|
2859
|
+
authenticateToken: (data: {
|
|
2860
|
+
currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
|
|
2861
|
+
token_id?: string | undefined;
|
|
2862
|
+
amount?: string | undefined;
|
|
2863
|
+
external_id?: string | undefined;
|
|
2864
|
+
mid_label?: string | undefined;
|
|
2865
|
+
card_data?: {
|
|
2866
|
+
account_number: string;
|
|
2867
|
+
exp_month: string;
|
|
2868
|
+
exp_year: string;
|
|
2869
|
+
card_holder_first_name: string;
|
|
2870
|
+
card_holder_last_name: string;
|
|
2871
|
+
card_holder_email: string;
|
|
2872
|
+
card_holder_phone_number: string;
|
|
2873
|
+
} | undefined;
|
|
2874
|
+
}) => Promise<{
|
|
2875
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
2876
|
+
id: string;
|
|
2877
|
+
external_id?: string | undefined;
|
|
2878
|
+
mid_label?: string | undefined;
|
|
2879
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "REVERSE_AUTHORIZATION_REJECTED_BY_BANK" | "PROCESSOR_ERROR" | undefined;
|
|
2880
|
+
payer_authentication_url?: string | undefined;
|
|
2881
|
+
}>;
|
|
2882
|
+
authorizeToken: (data: {
|
|
2883
|
+
capture: boolean;
|
|
2884
|
+
token_id?: string | undefined;
|
|
2885
|
+
amount?: string | undefined;
|
|
2886
|
+
external_id?: string | undefined;
|
|
2887
|
+
authentication_id?: string | undefined;
|
|
2888
|
+
}) => Promise<{
|
|
2889
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
2890
|
+
id: string;
|
|
2891
|
+
created: string;
|
|
2892
|
+
business_id: string;
|
|
2893
|
+
external_id: string;
|
|
2894
|
+
masked_card_number: string;
|
|
2895
|
+
authorized_amount: number;
|
|
2896
|
+
merchant_id: string;
|
|
2897
|
+
merchant_reference_code: string;
|
|
2898
|
+
card_type: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN";
|
|
2899
|
+
charge_type: "SINGLE_USE_TOKEN" | "MULTIPLE_USE_TOKEN" | "RECURRING";
|
|
2900
|
+
card_brand: "VISA" | "MASTERCARD" | "JCB" | "AMEX";
|
|
2901
|
+
bank_reconciliation_id: string;
|
|
2902
|
+
capture_amount?: number | undefined;
|
|
2903
|
+
mid_label?: string | undefined;
|
|
2904
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "PROCESSOR_ERROR" | "DECLINED_BY_ISSUER" | "DECLINED_BY_PROCESSOR" | "EXPIRED_CARD" | "ISSUER_SUSPECT_FRAUD" | "INACTIVE_OR_UNAUTHORIZED_CARD" | "INSUFFICIENT_BALANCE" | "INVALID_CARD" | "INVALID_CVV" | "ISSUER_UNAVAILABLE" | "STOLEN_CARD" | "PROCESSOR_TIMEOUT" | "FRAUD_RISK_BLOCKED" | undefined;
|
|
2905
|
+
descriptor?: string | undefined;
|
|
2906
|
+
promotion?: {
|
|
2907
|
+
reference_id: string;
|
|
2908
|
+
original_amount: number;
|
|
2909
|
+
} | undefined;
|
|
2910
|
+
installment?: {
|
|
2911
|
+
count?: number | undefined;
|
|
2912
|
+
interval?: "month" | undefined;
|
|
2913
|
+
} | undefined;
|
|
2914
|
+
eci?: "0" | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
2915
|
+
cvn_code?: "M" | "N" | "P" | undefined;
|
|
2916
|
+
}>;
|
|
2917
|
+
zeroAuthorization: (data: {
|
|
2918
|
+
amount: string;
|
|
2919
|
+
capture: boolean;
|
|
2920
|
+
token_id?: string | undefined;
|
|
2921
|
+
external_id?: string | undefined;
|
|
2922
|
+
authentication_id?: string | undefined;
|
|
2923
|
+
}) => Promise<{
|
|
2924
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
2925
|
+
id: string;
|
|
2926
|
+
created: string;
|
|
2927
|
+
business_id: string;
|
|
2928
|
+
external_id: string;
|
|
2929
|
+
masked_card_number: string;
|
|
2930
|
+
authorized_amount: number;
|
|
2931
|
+
merchant_id: string;
|
|
2932
|
+
merchant_reference_code: string;
|
|
2933
|
+
card_type: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN";
|
|
2934
|
+
charge_type: "SINGLE_USE_TOKEN" | "MULTIPLE_USE_TOKEN" | "RECURRING";
|
|
2935
|
+
card_brand: "VISA" | "MASTERCARD" | "JCB" | "AMEX";
|
|
2936
|
+
bank_reconciliation_id: string;
|
|
2937
|
+
capture_amount?: number | undefined;
|
|
2938
|
+
mid_label?: string | undefined;
|
|
2939
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "PROCESSOR_ERROR" | "DECLINED_BY_ISSUER" | "DECLINED_BY_PROCESSOR" | "EXPIRED_CARD" | "ISSUER_SUSPECT_FRAUD" | "INACTIVE_OR_UNAUTHORIZED_CARD" | "INSUFFICIENT_BALANCE" | "INVALID_CARD" | "INVALID_CVV" | "ISSUER_UNAVAILABLE" | "STOLEN_CARD" | "PROCESSOR_TIMEOUT" | "FRAUD_RISK_BLOCKED" | undefined;
|
|
2940
|
+
descriptor?: string | undefined;
|
|
2941
|
+
promotion?: {
|
|
2942
|
+
reference_id: string;
|
|
2943
|
+
original_amount: number;
|
|
2944
|
+
} | undefined;
|
|
2945
|
+
installment?: {
|
|
2946
|
+
count?: number | undefined;
|
|
2947
|
+
interval?: "month" | undefined;
|
|
2948
|
+
} | undefined;
|
|
2949
|
+
eci?: "0" | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
2950
|
+
cvn_code?: "M" | "N" | "P" | undefined;
|
|
2951
|
+
}>;
|
|
2952
|
+
reverseAuthorization: (data: {
|
|
2953
|
+
external_id: string;
|
|
2954
|
+
}) => Promise<{
|
|
2955
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
2956
|
+
id: string;
|
|
2957
|
+
created: string;
|
|
2958
|
+
business_id: string;
|
|
2959
|
+
external_id: string;
|
|
2960
|
+
masked_card_number: string;
|
|
2961
|
+
authorized_amount: number;
|
|
2962
|
+
merchant_id: string;
|
|
2963
|
+
merchant_reference_code: string;
|
|
2964
|
+
card_type: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN";
|
|
2965
|
+
charge_type: "SINGLE_USE_TOKEN" | "MULTIPLE_USE_TOKEN" | "RECURRING";
|
|
2966
|
+
card_brand: "VISA" | "MASTERCARD" | "JCB" | "AMEX";
|
|
2967
|
+
bank_reconciliation_id: string;
|
|
2968
|
+
capture_amount?: number | undefined;
|
|
2969
|
+
mid_label?: string | undefined;
|
|
2970
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "PROCESSOR_ERROR" | "DECLINED_BY_ISSUER" | "DECLINED_BY_PROCESSOR" | "EXPIRED_CARD" | "ISSUER_SUSPECT_FRAUD" | "INACTIVE_OR_UNAUTHORIZED_CARD" | "INSUFFICIENT_BALANCE" | "INVALID_CARD" | "INVALID_CVV" | "ISSUER_UNAVAILABLE" | "STOLEN_CARD" | "PROCESSOR_TIMEOUT" | "FRAUD_RISK_BLOCKED" | undefined;
|
|
2971
|
+
descriptor?: string | undefined;
|
|
2972
|
+
promotion?: {
|
|
2973
|
+
reference_id: string;
|
|
2974
|
+
original_amount: number;
|
|
2975
|
+
} | undefined;
|
|
2976
|
+
installment?: {
|
|
2977
|
+
count?: number | undefined;
|
|
2978
|
+
interval?: "month" | undefined;
|
|
2979
|
+
} | undefined;
|
|
2980
|
+
eci?: "0" | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
2981
|
+
cvn_code?: "M" | "N" | "P" | undefined;
|
|
2982
|
+
}>;
|
|
2983
|
+
createCharge: (data: {
|
|
2984
|
+
token_id: string;
|
|
2985
|
+
amount: number;
|
|
2986
|
+
external_id: string;
|
|
2987
|
+
capture: boolean;
|
|
2988
|
+
currency?: "PHP" | "IDR" | "MYR" | "THB" | "VND" | undefined;
|
|
2989
|
+
metadata?: {} | undefined;
|
|
2990
|
+
mid_label?: string | undefined;
|
|
2991
|
+
billing_details?: {
|
|
2992
|
+
given_names: string;
|
|
2993
|
+
surname?: string | undefined;
|
|
2994
|
+
email?: string | undefined;
|
|
2995
|
+
mobile_number?: string | undefined;
|
|
2996
|
+
phone_number?: string | undefined;
|
|
2997
|
+
} | undefined;
|
|
2998
|
+
authentication_id?: string | undefined;
|
|
2999
|
+
descriptor?: string | undefined;
|
|
3000
|
+
promotion?: {
|
|
3001
|
+
reference_id: string;
|
|
3002
|
+
original_amount: number;
|
|
3003
|
+
} | undefined;
|
|
3004
|
+
installment?: {
|
|
3005
|
+
count?: number | undefined;
|
|
3006
|
+
interval?: "month" | undefined;
|
|
3007
|
+
} | undefined;
|
|
3008
|
+
}) => Promise<{
|
|
3009
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
3010
|
+
id: string;
|
|
3011
|
+
created: string;
|
|
3012
|
+
business_id: string;
|
|
3013
|
+
external_id: string;
|
|
3014
|
+
masked_card_number: string;
|
|
3015
|
+
authorized_amount: number;
|
|
3016
|
+
merchant_id: string;
|
|
3017
|
+
merchant_reference_code: string;
|
|
3018
|
+
card_type: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN";
|
|
3019
|
+
charge_type: "SINGLE_USE_TOKEN" | "MULTIPLE_USE_TOKEN" | "RECURRING";
|
|
3020
|
+
card_brand: "VISA" | "MASTERCARD" | "JCB" | "AMEX";
|
|
3021
|
+
bank_reconciliation_id: string;
|
|
3022
|
+
capture_amount?: number | undefined;
|
|
3023
|
+
mid_label?: string | undefined;
|
|
3024
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "PROCESSOR_ERROR" | "DECLINED_BY_ISSUER" | "DECLINED_BY_PROCESSOR" | "EXPIRED_CARD" | "ISSUER_SUSPECT_FRAUD" | "INACTIVE_OR_UNAUTHORIZED_CARD" | "INSUFFICIENT_BALANCE" | "INVALID_CARD" | "INVALID_CVV" | "ISSUER_UNAVAILABLE" | "STOLEN_CARD" | "PROCESSOR_TIMEOUT" | "FRAUD_RISK_BLOCKED" | undefined;
|
|
3025
|
+
descriptor?: string | undefined;
|
|
3026
|
+
promotion?: {
|
|
3027
|
+
reference_id: string;
|
|
3028
|
+
original_amount: number;
|
|
3029
|
+
} | undefined;
|
|
3030
|
+
installment?: {
|
|
3031
|
+
count?: number | undefined;
|
|
3032
|
+
interval?: "month" | undefined;
|
|
3033
|
+
} | undefined;
|
|
3034
|
+
eci?: "0" | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
3035
|
+
cvn_code?: "M" | "N" | "P" | undefined;
|
|
3036
|
+
}>;
|
|
3037
|
+
getCharge: (data: {
|
|
3038
|
+
id: string;
|
|
3039
|
+
}) => Promise<{
|
|
3040
|
+
status: "SUCCEEDED" | "FAILED" | "REVERSED" | "IN_REVIEW" | "VERIFIED" | "CAPTURED" | "AUTHORISED";
|
|
3041
|
+
id: string;
|
|
3042
|
+
created: string;
|
|
3043
|
+
business_id: string;
|
|
3044
|
+
external_id: string;
|
|
3045
|
+
masked_card_number: string;
|
|
3046
|
+
authorized_amount: number;
|
|
3047
|
+
merchant_id: string;
|
|
3048
|
+
merchant_reference_code: string;
|
|
3049
|
+
card_type: "CREDIT" | "DEBIT" | "PREPAID" | "UNKNOWN";
|
|
3050
|
+
charge_type: "SINGLE_USE_TOKEN" | "MULTIPLE_USE_TOKEN" | "RECURRING";
|
|
3051
|
+
card_brand: "VISA" | "MASTERCARD" | "JCB" | "AMEX";
|
|
3052
|
+
bank_reconciliation_id: string;
|
|
3053
|
+
capture_amount?: number | undefined;
|
|
3054
|
+
mid_label?: string | undefined;
|
|
3055
|
+
failure_reason?: "AUTHENTICATION_FAILED" | "PROCESSOR_ERROR" | "DECLINED_BY_ISSUER" | "DECLINED_BY_PROCESSOR" | "EXPIRED_CARD" | "ISSUER_SUSPECT_FRAUD" | "INACTIVE_OR_UNAUTHORIZED_CARD" | "INSUFFICIENT_BALANCE" | "INVALID_CARD" | "INVALID_CVV" | "ISSUER_UNAVAILABLE" | "STOLEN_CARD" | "PROCESSOR_TIMEOUT" | "FRAUD_RISK_BLOCKED" | undefined;
|
|
3056
|
+
descriptor?: string | undefined;
|
|
3057
|
+
promotion?: {
|
|
3058
|
+
reference_id: string;
|
|
3059
|
+
original_amount: number;
|
|
3060
|
+
} | undefined;
|
|
3061
|
+
installment?: {
|
|
3062
|
+
count?: number | undefined;
|
|
3063
|
+
interval?: "month" | undefined;
|
|
3064
|
+
} | undefined;
|
|
3065
|
+
eci?: "0" | "1" | "2" | "3" | "4" | "5" | undefined;
|
|
3066
|
+
cvn_code?: "M" | "N" | "P" | undefined;
|
|
3067
|
+
}>;
|
|
3068
|
+
};
|
|
2199
3069
|
};
|
|
2200
3070
|
export { Xendit };
|
|
2201
3071
|
//# sourceMappingURL=index.d.ts.map
|