@vexpay/node 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -21
- package/dist/index.cjs +6 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -117
- package/dist/index.d.ts +75 -117
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -527,6 +527,14 @@ interface components {
|
|
|
527
527
|
expiresAt: string;
|
|
528
528
|
/** Format: uuid */
|
|
529
529
|
accountId: string;
|
|
530
|
+
/**
|
|
531
|
+
* @description Test mode only: the two sandbox micro-deposit amounts to confirm (no money is sent in Test). Never present in live mode.
|
|
532
|
+
* @example [
|
|
533
|
+
* "0.13",
|
|
534
|
+
* "0.27"
|
|
535
|
+
* ]
|
|
536
|
+
*/
|
|
537
|
+
testAmounts?: string[];
|
|
530
538
|
};
|
|
531
539
|
TenantPayoutAccountVerifyConfirmResponseDto: {
|
|
532
540
|
/**
|
|
@@ -1356,13 +1364,13 @@ interface components {
|
|
|
1356
1364
|
};
|
|
1357
1365
|
CopChannelDto: {
|
|
1358
1366
|
/**
|
|
1359
|
-
* @example
|
|
1367
|
+
* @example nequi
|
|
1360
1368
|
* @enum {string}
|
|
1361
1369
|
*/
|
|
1362
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
1370
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
1363
1371
|
/**
|
|
1364
1372
|
* @description Buyer-facing name (Spanish).
|
|
1365
|
-
* @example
|
|
1373
|
+
* @example Nequi
|
|
1366
1374
|
*/
|
|
1367
1375
|
label: string;
|
|
1368
1376
|
/**
|
|
@@ -1370,37 +1378,11 @@ interface components {
|
|
|
1370
1378
|
* @example true
|
|
1371
1379
|
*/
|
|
1372
1380
|
needsBuyer: boolean;
|
|
1373
|
-
/**
|
|
1374
|
-
* @description Show the buyer the `terms` links and send `buyer.termsAccepted: true`.
|
|
1375
|
-
* @example true
|
|
1376
|
-
*/
|
|
1377
|
-
needsTermsAcceptance: boolean;
|
|
1378
|
-
/**
|
|
1379
|
-
* @description Only through the hosted checkout (checkout sessions or payment links), never `POST /v1/cop/payments`.
|
|
1380
|
-
* @example false
|
|
1381
|
-
*/
|
|
1382
|
-
checkoutOnly: boolean;
|
|
1383
1381
|
/** @example 20000 */
|
|
1384
1382
|
minAmountCop: number;
|
|
1385
1383
|
};
|
|
1386
|
-
CopPseBankDto: {
|
|
1387
|
-
/** @example 1007 */
|
|
1388
|
-
code: string;
|
|
1389
|
-
/** @example Bancolombia */
|
|
1390
|
-
name: string;
|
|
1391
|
-
};
|
|
1392
|
-
CopTermsDto: {
|
|
1393
|
-
/** @description Terms and conditions the buyer accepts. */
|
|
1394
|
-
termsUrl: string;
|
|
1395
|
-
/** @description Personal data processing authorization the buyer accepts. */
|
|
1396
|
-
personalDataUrl: string;
|
|
1397
|
-
};
|
|
1398
1384
|
CopChannelsDto: {
|
|
1399
1385
|
channels: components["schemas"]["CopChannelDto"][];
|
|
1400
|
-
/** @description Present when `pse` is listed: banks for `pse.bankCode`. */
|
|
1401
|
-
pseBanks?: components["schemas"]["CopPseBankDto"][];
|
|
1402
|
-
/** @description Present when a listed channel needs terms acceptance. */
|
|
1403
|
-
terms?: components["schemas"]["CopTermsDto"];
|
|
1404
1386
|
};
|
|
1405
1387
|
CopBuyerDto: {
|
|
1406
1388
|
/** @example Juan */
|
|
@@ -1428,24 +1410,6 @@ interface components {
|
|
|
1428
1410
|
* @example 1234567890
|
|
1429
1411
|
*/
|
|
1430
1412
|
documentNumber?: string;
|
|
1431
|
-
/**
|
|
1432
|
-
* @description PSE only (required): `natural` person or `juridica` (company).
|
|
1433
|
-
* @example natural
|
|
1434
|
-
* @enum {string}
|
|
1435
|
-
*/
|
|
1436
|
-
personType?: "natural" | "juridica";
|
|
1437
|
-
/**
|
|
1438
|
-
* @description Required (`true`) for channels the channel catalog marks `needsTermsAcceptance`: confirms you showed the buyer the catalog `terms` links.
|
|
1439
|
-
* @example true
|
|
1440
|
-
*/
|
|
1441
|
-
termsAccepted?: boolean;
|
|
1442
|
-
};
|
|
1443
|
-
CopPseDto: {
|
|
1444
|
-
/**
|
|
1445
|
-
* @description Bank code from `GET /v1/cop/channels` → `pseBanks`.
|
|
1446
|
-
* @example 1007
|
|
1447
|
-
*/
|
|
1448
|
-
bankCode: string;
|
|
1449
1413
|
};
|
|
1450
1414
|
CreateCopPaymentDto: {
|
|
1451
1415
|
/**
|
|
@@ -1454,11 +1418,11 @@ interface components {
|
|
|
1454
1418
|
*/
|
|
1455
1419
|
amountCop: number;
|
|
1456
1420
|
/**
|
|
1457
|
-
* @description `breb`: QR code / transfer key the buyer pays from any Colombian bank app. `nequi`: push to the buyer's Nequi app. `daviplata`: SMS code the buyer reads to you
|
|
1421
|
+
* @description `breb`: QR code / transfer key the buyer pays from any Colombian bank app. `nequi`: push to the buyer's Nequi app. `daviplata`: SMS code the buyer reads to you.
|
|
1458
1422
|
* @example breb
|
|
1459
1423
|
* @enum {string}
|
|
1460
1424
|
*/
|
|
1461
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
1425
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
1462
1426
|
/**
|
|
1463
1427
|
* @description Shown to the buyer.
|
|
1464
1428
|
* @example Order 1042
|
|
@@ -1480,24 +1444,15 @@ interface components {
|
|
|
1480
1444
|
};
|
|
1481
1445
|
/** @description Required for every channel except `breb`. */
|
|
1482
1446
|
buyer?: components["schemas"]["CopBuyerDto"];
|
|
1483
|
-
/** @description Required for `pse`. */
|
|
1484
|
-
pse?: components["schemas"]["CopPseDto"];
|
|
1485
1447
|
};
|
|
1486
1448
|
CopNextActionDto: {
|
|
1487
1449
|
/**
|
|
1488
|
-
* @description `
|
|
1450
|
+
* @description `show_qr`: Bre-B QR / transfer key. `approve_in_app`: the buyer approves the Nequi push. `submit_otp`: send the Daviplata SMS code.
|
|
1489
1451
|
* @enum {string}
|
|
1490
1452
|
*/
|
|
1491
|
-
type: "show_qr" | "approve_in_app" | "submit_otp"
|
|
1453
|
+
type: "show_qr" | "approve_in_app" | "submit_otp";
|
|
1492
1454
|
/** @description Bre-B: base64 PNG of the payment QR. Returned only when the payment is created. */
|
|
1493
1455
|
qrPngBase64?: string;
|
|
1494
|
-
/** @description Bancolombia QR: base64 SVG of the payment QR. */
|
|
1495
|
-
qrSvgBase64?: string;
|
|
1496
|
-
/**
|
|
1497
|
-
* @description `redirect`: where the buyer authorizes the payment.
|
|
1498
|
-
* @example https://…
|
|
1499
|
-
*/
|
|
1500
|
-
url?: string;
|
|
1501
1456
|
/** @description Bre-B: transfer key the buyer can enter instead of scanning. */
|
|
1502
1457
|
transferKey?: string;
|
|
1503
1458
|
/**
|
|
@@ -1514,7 +1469,7 @@ interface components {
|
|
|
1514
1469
|
/** @enum {string} */
|
|
1515
1470
|
method: "COP";
|
|
1516
1471
|
/** @enum {string} */
|
|
1517
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
1472
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
1518
1473
|
/** @example 100000 */
|
|
1519
1474
|
amountCop: number;
|
|
1520
1475
|
/**
|
|
@@ -1537,27 +1492,16 @@ interface components {
|
|
|
1537
1492
|
metadata: {
|
|
1538
1493
|
[key: string]: string;
|
|
1539
1494
|
};
|
|
1540
|
-
/**
|
|
1541
|
-
|
|
1542
|
-
* @enum {string}
|
|
1543
|
-
*/
|
|
1544
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
|
|
1495
|
+
/** @enum {string} */
|
|
1496
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
1545
1497
|
/** Format: date-time */
|
|
1546
1498
|
expiresAt?: string;
|
|
1547
1499
|
/** Format: date-time */
|
|
1548
1500
|
createdAt: string;
|
|
1549
1501
|
/** Format: date-time */
|
|
1550
1502
|
completedAt?: string;
|
|
1551
|
-
/** @description What the buyer must do next. Returned when the payment is created
|
|
1503
|
+
/** @description What the buyer must do next. Returned when the payment is created. */
|
|
1552
1504
|
next?: components["schemas"]["CopNextActionDto"];
|
|
1553
|
-
/**
|
|
1554
|
-
* @description Card payments: brand and last 4 digits, once known.
|
|
1555
|
-
* @example {
|
|
1556
|
-
* "brand": "VISA",
|
|
1557
|
-
* "last4": "4242"
|
|
1558
|
-
* }
|
|
1559
|
-
*/
|
|
1560
|
-
card?: Record<string, never>;
|
|
1561
1505
|
};
|
|
1562
1506
|
SubmitCopOtpDto: {
|
|
1563
1507
|
/**
|
|
@@ -2511,6 +2455,14 @@ interface components {
|
|
|
2511
2455
|
expiresAt: string;
|
|
2512
2456
|
/** Format: uuid */
|
|
2513
2457
|
payoutMethodId?: string;
|
|
2458
|
+
/**
|
|
2459
|
+
* @description Test mode only: the two sandbox micro-deposit amounts to confirm (no money is sent in Test). Never present in live mode.
|
|
2460
|
+
* @example [
|
|
2461
|
+
* "0.13",
|
|
2462
|
+
* "0.27"
|
|
2463
|
+
* ]
|
|
2464
|
+
*/
|
|
2465
|
+
testAmounts?: string[];
|
|
2514
2466
|
};
|
|
2515
2467
|
VerifyConfirmResponseDto: {
|
|
2516
2468
|
/** @example verified */
|
|
@@ -2813,10 +2765,15 @@ interface components {
|
|
|
2813
2765
|
};
|
|
2814
2766
|
CreateCheckoutSessionDto: {
|
|
2815
2767
|
/**
|
|
2816
|
-
* @description USD amount, up to 2 decimals.
|
|
2768
|
+
* @description USD amount, up to 2 decimals. Send exactly one of `amountUsd` or `amountVes`.
|
|
2817
2769
|
* @example 25
|
|
2818
2770
|
*/
|
|
2819
|
-
amountUsd
|
|
2771
|
+
amountUsd?: number;
|
|
2772
|
+
/**
|
|
2773
|
+
* @description Exact bolívar amount, up to 2 decimals: Pago Móvil, Débito Inmediato and card charge exactly this, whatever the rate. `amountUsd` is then derived at your Bolívar rate. Send exactly one of `amountUsd` or `amountVes`; `cop` is not offered.
|
|
2774
|
+
* @example 2000
|
|
2775
|
+
*/
|
|
2776
|
+
amountVes?: number;
|
|
2820
2777
|
/**
|
|
2821
2778
|
* @description Buyer-facing label on the checkout.
|
|
2822
2779
|
* @example Pedido #1042
|
|
@@ -2888,8 +2845,16 @@ interface components {
|
|
|
2888
2845
|
clientSecret?: string;
|
|
2889
2846
|
/** @example https://pay.vexpay.app/pay/cs-9f2a4b7c1d3e */
|
|
2890
2847
|
url: string;
|
|
2891
|
-
/**
|
|
2848
|
+
/**
|
|
2849
|
+
* @description USD amount; for a bolívar-priced session, `amountVes` at your Bolívar rate when it was created.
|
|
2850
|
+
* @example 25.00
|
|
2851
|
+
*/
|
|
2892
2852
|
amountUsd: string;
|
|
2853
|
+
/**
|
|
2854
|
+
* @description Exact bolívar amount charged, for a session created with `amountVes`; null otherwise.
|
|
2855
|
+
* @example 2000.00
|
|
2856
|
+
*/
|
|
2857
|
+
amountVes?: string | null;
|
|
2893
2858
|
description?: string | null;
|
|
2894
2859
|
reference?: string | null;
|
|
2895
2860
|
metadata: {
|
|
@@ -6175,7 +6140,7 @@ interface operations {
|
|
|
6175
6140
|
"application/json": components["schemas"]["CopPaymentDto"];
|
|
6176
6141
|
};
|
|
6177
6142
|
};
|
|
6178
|
-
/** @description `invalid_data` (names the field), `amount_below_minimum
|
|
6143
|
+
/** @description `invalid_data` (names the field), `amount_below_minimum` or `amount_out_of_range`. */
|
|
6179
6144
|
400: {
|
|
6180
6145
|
headers: {
|
|
6181
6146
|
[name: string]: unknown;
|
|
@@ -13395,6 +13360,7 @@ declare class TenantPayoutAccount extends APIResource {
|
|
|
13395
13360
|
status: "verifying";
|
|
13396
13361
|
expiresAt: string;
|
|
13397
13362
|
accountId: string;
|
|
13363
|
+
testAmounts?: string[];
|
|
13398
13364
|
}>;
|
|
13399
13365
|
confirmVerification(params: RequestBody<'TenantPayoutAccount_confirmVerify'>, options?: RequestOptions): Promise<{
|
|
13400
13366
|
status: "eligible" | "cooling";
|
|
@@ -14007,6 +13973,7 @@ declare class CheckoutSessions extends APIResource {
|
|
|
14007
13973
|
clientSecret?: string;
|
|
14008
13974
|
url: string;
|
|
14009
13975
|
amountUsd: string;
|
|
13976
|
+
amountVes?: string | null;
|
|
14010
13977
|
description?: string | null;
|
|
14011
13978
|
reference?: string | null;
|
|
14012
13979
|
metadata: {
|
|
@@ -14030,6 +13997,7 @@ declare class CheckoutSessions extends APIResource {
|
|
|
14030
13997
|
clientSecret?: string;
|
|
14031
13998
|
url: string;
|
|
14032
13999
|
amountUsd: string;
|
|
14000
|
+
amountVes?: string | null;
|
|
14033
14001
|
description?: string | null;
|
|
14034
14002
|
reference?: string | null;
|
|
14035
14003
|
metadata: {
|
|
@@ -14283,24 +14251,21 @@ declare class Conversions extends APIResource {
|
|
|
14283
14251
|
}
|
|
14284
14252
|
|
|
14285
14253
|
/**
|
|
14286
|
-
* Colombian peso payments:
|
|
14287
|
-
*
|
|
14288
|
-
* the hosted checkout. Payments complete asynchronously — listen for `payment.completed` /
|
|
14254
|
+
* Colombian peso payments: Bre-B (QR / transfer key), Nequi (push approval) or Daviplata (SMS
|
|
14255
|
+
* code). Payments complete asynchronously — listen for `payment.completed` /
|
|
14289
14256
|
* `payment.failed`. COP must be enabled on your account (403 `method_not_allowed` otherwise).
|
|
14290
14257
|
*/
|
|
14291
14258
|
declare class CopPayments extends APIResource {
|
|
14292
14259
|
/**
|
|
14293
|
-
* Create a payment in whole pesos. `buyer` is required for every channel except `breb
|
|
14294
|
-
*
|
|
14295
|
-
* `pse.bankCode`. The response `next` says what the buyer does: `show_qr`, `approve_in_app`,
|
|
14296
|
-
* `submit_otp`, `redirect` (send them to `next.url`) or `redirect_pending` (retrieve again shortly).
|
|
14260
|
+
* Create a payment in whole pesos. `buyer` is required for every channel except `breb`. The
|
|
14261
|
+
* response `next` says what the buyer does: `show_qr`, `approve_in_app` or `submit_otp`.
|
|
14297
14262
|
* Pass `idempotencyKey` in options to retry safely.
|
|
14298
14263
|
*/
|
|
14299
14264
|
create(params: RequestBody<'CopPayments_create'>, options?: RequestOptions): Promise<{
|
|
14300
14265
|
id: string;
|
|
14301
14266
|
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
14302
14267
|
method: "COP";
|
|
14303
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
14268
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
14304
14269
|
amountCop: number;
|
|
14305
14270
|
feeCop?: number;
|
|
14306
14271
|
amountUsd?: string;
|
|
@@ -14309,18 +14274,17 @@ declare class CopPayments extends APIResource {
|
|
|
14309
14274
|
metadata: {
|
|
14310
14275
|
[key: string]: string;
|
|
14311
14276
|
};
|
|
14312
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown"
|
|
14277
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
14313
14278
|
expiresAt?: string;
|
|
14314
14279
|
createdAt: string;
|
|
14315
14280
|
completedAt?: string;
|
|
14316
14281
|
next?: components["schemas"]["CopNextActionDto"];
|
|
14317
|
-
card?: Record<string, never>;
|
|
14318
14282
|
}>;
|
|
14319
14283
|
retrieve(id: string, options?: RequestOptions): Promise<{
|
|
14320
14284
|
id: string;
|
|
14321
14285
|
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
14322
14286
|
method: "COP";
|
|
14323
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
14287
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
14324
14288
|
amountCop: number;
|
|
14325
14289
|
feeCop?: number;
|
|
14326
14290
|
amountUsd?: string;
|
|
@@ -14329,19 +14293,18 @@ declare class CopPayments extends APIResource {
|
|
|
14329
14293
|
metadata: {
|
|
14330
14294
|
[key: string]: string;
|
|
14331
14295
|
};
|
|
14332
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown"
|
|
14296
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
14333
14297
|
expiresAt?: string;
|
|
14334
14298
|
createdAt: string;
|
|
14335
14299
|
completedAt?: string;
|
|
14336
14300
|
next?: components["schemas"]["CopNextActionDto"];
|
|
14337
|
-
card?: Record<string, never>;
|
|
14338
14301
|
}>;
|
|
14339
14302
|
/** Daviplata with `next.type: "submit_otp"`: submit the code the buyer received by SMS. A wrong code fails with `invalid_otp`. */
|
|
14340
14303
|
submitOtp(id: string, params: RequestBody<'CopPayments_submitOtp'>, options?: RequestOptions): Promise<{
|
|
14341
14304
|
id: string;
|
|
14342
14305
|
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
14343
14306
|
method: "COP";
|
|
14344
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
14307
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
14345
14308
|
amountCop: number;
|
|
14346
14309
|
feeCop?: number;
|
|
14347
14310
|
amountUsd?: string;
|
|
@@ -14350,19 +14313,18 @@ declare class CopPayments extends APIResource {
|
|
|
14350
14313
|
metadata: {
|
|
14351
14314
|
[key: string]: string;
|
|
14352
14315
|
};
|
|
14353
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown"
|
|
14316
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
14354
14317
|
expiresAt?: string;
|
|
14355
14318
|
createdAt: string;
|
|
14356
14319
|
completedAt?: string;
|
|
14357
14320
|
next?: components["schemas"]["CopNextActionDto"];
|
|
14358
|
-
card?: Record<string, never>;
|
|
14359
14321
|
}>;
|
|
14360
14322
|
/** Cancel a pending payment. */
|
|
14361
14323
|
cancel(id: string, options?: RequestOptions): Promise<{
|
|
14362
14324
|
id: string;
|
|
14363
14325
|
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
14364
14326
|
method: "COP";
|
|
14365
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
14327
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
14366
14328
|
amountCop: number;
|
|
14367
14329
|
feeCop?: number;
|
|
14368
14330
|
amountUsd?: string;
|
|
@@ -14371,22 +14333,21 @@ declare class CopPayments extends APIResource {
|
|
|
14371
14333
|
metadata: {
|
|
14372
14334
|
[key: string]: string;
|
|
14373
14335
|
};
|
|
14374
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown"
|
|
14336
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
14375
14337
|
expiresAt?: string;
|
|
14376
14338
|
createdAt: string;
|
|
14377
14339
|
completedAt?: string;
|
|
14378
14340
|
next?: components["schemas"]["CopNextActionDto"];
|
|
14379
|
-
card?: Record<string, never>;
|
|
14380
14341
|
}>;
|
|
14381
14342
|
/**
|
|
14382
|
-
* Full refund of a completed payment, within
|
|
14383
|
-
*
|
|
14343
|
+
* Full refund of a completed payment, within 96 hours of completion. A payment that can no
|
|
14344
|
+
* longer be refunded through the API fails with `refund_not_supported`.
|
|
14384
14345
|
*/
|
|
14385
14346
|
refund(id: string, options?: RequestOptions): Promise<{
|
|
14386
14347
|
id: string;
|
|
14387
14348
|
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
14388
14349
|
method: "COP";
|
|
14389
|
-
channel: "breb" | "nequi" | "daviplata"
|
|
14350
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
14390
14351
|
amountCop: number;
|
|
14391
14352
|
feeCop?: number;
|
|
14392
14353
|
amountUsd?: string;
|
|
@@ -14395,12 +14356,11 @@ declare class CopPayments extends APIResource {
|
|
|
14395
14356
|
metadata: {
|
|
14396
14357
|
[key: string]: string;
|
|
14397
14358
|
};
|
|
14398
|
-
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown"
|
|
14359
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
14399
14360
|
expiresAt?: string;
|
|
14400
14361
|
createdAt: string;
|
|
14401
14362
|
completedAt?: string;
|
|
14402
14363
|
next?: components["schemas"]["CopNextActionDto"];
|
|
14403
|
-
card?: Record<string, never>;
|
|
14404
14364
|
}>;
|
|
14405
14365
|
}
|
|
14406
14366
|
/** Your COP balance, in whole pesos. Kept apart from VES and stablecoins. */
|
|
@@ -14413,15 +14373,13 @@ declare class CopBalance extends APIResource {
|
|
|
14413
14373
|
asOf: string;
|
|
14414
14374
|
}>;
|
|
14415
14375
|
}
|
|
14416
|
-
/** Collect Colombian pesos (
|
|
14376
|
+
/** Collect Colombian pesos (Bre-B, Nequi, Daviplata). */
|
|
14417
14377
|
declare class Cop extends APIResource {
|
|
14418
14378
|
readonly payments: CopPayments;
|
|
14419
14379
|
readonly balance: CopBalance;
|
|
14420
|
-
/** Channels you can use right now, with what each needs
|
|
14380
|
+
/** Channels you can use right now, with what each needs. */
|
|
14421
14381
|
channels(options?: RequestOptions): Promise<{
|
|
14422
14382
|
channels: components["schemas"]["CopChannelDto"][];
|
|
14423
|
-
pseBanks?: components["schemas"]["CopPseBankDto"][];
|
|
14424
|
-
terms?: components["schemas"]["CopTermsDto"];
|
|
14425
14383
|
}>;
|
|
14426
14384
|
}
|
|
14427
14385
|
|
|
@@ -14585,6 +14543,7 @@ declare class PayoutMethods extends APIResource {
|
|
|
14585
14543
|
status: string;
|
|
14586
14544
|
expiresAt: string;
|
|
14587
14545
|
payoutMethodId?: string;
|
|
14546
|
+
testAmounts?: string[];
|
|
14588
14547
|
}>;
|
|
14589
14548
|
/** Confirm the micro-deposit amounts the merchant saw. */
|
|
14590
14549
|
confirmVerification(merchantId: string, methodId: string, params: RequestBody<'Merchants_confirmVerifyMethod'>, options?: RequestOptions): Promise<{
|
|
@@ -14801,6 +14760,7 @@ declare class Merchants extends APIResource {
|
|
|
14801
14760
|
status: string;
|
|
14802
14761
|
expiresAt: string;
|
|
14803
14762
|
payoutMethodId?: string;
|
|
14763
|
+
testAmounts?: string[];
|
|
14804
14764
|
}>;
|
|
14805
14765
|
confirmVerification(id: string, params: RequestBody<'Merchants_confirmVerify'>, options?: RequestOptions): Promise<{
|
|
14806
14766
|
status: string;
|
|
@@ -15191,6 +15151,11 @@ interface PaymentWebhookData {
|
|
|
15191
15151
|
method: 'C2P' | 'VPOS' | 'PAGO_MOVIL' | 'DEBITO_INMEDIATO' | 'COP';
|
|
15192
15152
|
usdAmount: number;
|
|
15193
15153
|
vesAmount: number;
|
|
15154
|
+
/**
|
|
15155
|
+
* Pago Móvil only, present when the payer sent more than asked (up to Bs 500 more is accepted):
|
|
15156
|
+
* the bolívar amount originally asked. `vesAmount` and `usdAmount` are then what arrived.
|
|
15157
|
+
*/
|
|
15158
|
+
requestedVesAmount?: number;
|
|
15194
15159
|
/** Official BCV rate (Bs per $1) when the payment was created. */
|
|
15195
15160
|
bcvRate: number;
|
|
15196
15161
|
/** Rate the payment was priced at: `bcvRate` for BCV accounts, the market rate for MARKET accounts. */
|
|
@@ -15235,22 +15200,15 @@ interface CopPaymentWebhookData {
|
|
|
15235
15200
|
method: 'COP';
|
|
15236
15201
|
currency: 'COP';
|
|
15237
15202
|
status: 'pending' | 'completed' | 'failed' | 'canceled' | 'refunded';
|
|
15238
|
-
channel: 'breb' | 'nequi' | 'daviplata'
|
|
15203
|
+
channel: 'breb' | 'nequi' | 'daviplata';
|
|
15239
15204
|
amountCop: number;
|
|
15240
|
-
/** Card payments: brand and last 4 digits. */
|
|
15241
|
-
card?: {
|
|
15242
|
-
brand: string;
|
|
15243
|
-
last4: string;
|
|
15244
|
-
};
|
|
15245
15205
|
feeCop?: number;
|
|
15246
15206
|
amountUsd?: string;
|
|
15247
15207
|
copRate?: string;
|
|
15248
15208
|
reference?: string;
|
|
15249
15209
|
externalRef?: string;
|
|
15250
15210
|
metadata: Record<string, string>;
|
|
15251
|
-
failureCode?: 'expired' | 'rejected' | 'processor_error' | 'processor_unknown'
|
|
15252
|
-
/** `payment.reversed` from a card dispute: `"chargeback"` (the amount was debited from your COP balance). */
|
|
15253
|
-
reason?: 'chargeback';
|
|
15211
|
+
failureCode?: 'expired' | 'rejected' | 'processor_error' | 'processor_unknown';
|
|
15254
15212
|
expiresAt?: string;
|
|
15255
15213
|
createdAt: string;
|
|
15256
15214
|
completedAt?: string;
|
|
@@ -15392,6 +15350,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
|
|
|
15392
15350
|
declare class VexPaySignatureVerificationError extends VexPayError {
|
|
15393
15351
|
}
|
|
15394
15352
|
|
|
15395
|
-
declare const VERSION = "0.
|
|
15353
|
+
declare const VERSION = "0.18.0";
|
|
15396
15354
|
|
|
15397
15355
|
export { type CopPaymentWebhookData, type CursorPage, DEFAULT_BASE_URL, DEFAULT_TOLERANCE_SECONDS, type OperationId, PagePromise, type PathParams, type PaymentWebhookData, type QueryParams, type RequestBody, type RequestOptions, type ResponseBody, SIGNATURE_HEADER, type Schemas, VERSION, VexPay, VexPayAPIError, VexPayAuthenticationError, VexPayConfigurationError, VexPayConflictError, VexPayConnectionError, VexPayError, VexPayInvalidRequestError, VexPayNotFoundError, type VexPayOptions, VexPayRateLimitError, VexPaySignatureVerificationError, VexPayTimeoutError, WEBHOOK_EVENT_NAMES, type WebhookEvent, type WebhookEventName, Webhooks, VexPay as default };
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ function errorFromResponse(status, body, requestId) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// src/version.ts
|
|
65
|
-
var VERSION = "0.
|
|
65
|
+
var VERSION = "0.18.0";
|
|
66
66
|
|
|
67
67
|
// src/core.ts
|
|
68
68
|
var INITIAL_RETRY_DELAY_MS = 500;
|
|
@@ -721,10 +721,8 @@ var Conversions = class extends APIResource {
|
|
|
721
721
|
// src/resources/cop.ts
|
|
722
722
|
var CopPayments = class extends APIResource {
|
|
723
723
|
/**
|
|
724
|
-
* Create a payment in whole pesos. `buyer` is required for every channel except `breb
|
|
725
|
-
*
|
|
726
|
-
* `pse.bankCode`. The response `next` says what the buyer does: `show_qr`, `approve_in_app`,
|
|
727
|
-
* `submit_otp`, `redirect` (send them to `next.url`) or `redirect_pending` (retrieve again shortly).
|
|
724
|
+
* Create a payment in whole pesos. `buyer` is required for every channel except `breb`. The
|
|
725
|
+
* response `next` says what the buyer does: `show_qr`, `approve_in_app` or `submit_otp`.
|
|
728
726
|
* Pass `idempotencyKey` in options to retry safely.
|
|
729
727
|
*/
|
|
730
728
|
create(params, options) {
|
|
@@ -742,8 +740,8 @@ var CopPayments = class extends APIResource {
|
|
|
742
740
|
return this.call("CopPayments_cancel", { path: { id } }, options);
|
|
743
741
|
}
|
|
744
742
|
/**
|
|
745
|
-
* Full refund of a completed payment, within
|
|
746
|
-
*
|
|
743
|
+
* Full refund of a completed payment, within 96 hours of completion. A payment that can no
|
|
744
|
+
* longer be refunded through the API fails with `refund_not_supported`.
|
|
747
745
|
*/
|
|
748
746
|
refund(id, options) {
|
|
749
747
|
return this.call("CopPayments_refund", { path: { id } }, options);
|
|
@@ -757,7 +755,7 @@ var CopBalance = class extends APIResource {
|
|
|
757
755
|
var Cop = class extends APIResource {
|
|
758
756
|
payments = new CopPayments(this.http);
|
|
759
757
|
balance = new CopBalance(this.http);
|
|
760
|
-
/** Channels you can use right now, with what each needs
|
|
758
|
+
/** Channels you can use right now, with what each needs. */
|
|
761
759
|
channels(options) {
|
|
762
760
|
return this.call("CopPayments_channels", {}, options);
|
|
763
761
|
}
|