@vexpay/node 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -251,10 +251,10 @@ interface components {
251
251
  */
252
252
  status: "completed" | "pending" | "failed" | "awaiting_approval";
253
253
  /**
254
- * @description Why the payout was held for review. `NEW_ACCOUNT_LIMIT`: the tenant or merchant is new (first 30 days) and this payout would take its rolling 24h money-out above the new-account cap (default US$300 equivalent). `BANK_UNFUNDED`: VEX Pay could not send the transfer right away on its side; it is sent once reviewed, or rejected with `rejected_bank_unfunded` and the funds returned.
254
+ * @description Why the payout was held for review. `NEW_ACCOUNT_LIMIT`: the tenant or merchant is new (first 30 days) and this payout would take its rolling 24h money-out above the new-account cap (default US$300 equivalent). `FIRST_PAYOUTS`: the first payout of a seller, or one in its first days of sales, when VEX Pay has turned that review on; rejected with `rejected_first_payouts` and the funds returned. `BANK_UNFUNDED`: VEX Pay could not send the transfer right away on its side; it is sent once reviewed, or rejected with `rejected_bank_unfunded` and the funds returned.
255
255
  * @enum {string}
256
256
  */
257
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
257
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
258
258
  /** @description Bank reference when available. */
259
259
  reference?: string | null;
260
260
  /** @description Machine-readable failure when status is failed (e.g. merchant_inactive, payout_method_not_verified). */
@@ -329,10 +329,10 @@ interface components {
329
329
  */
330
330
  status: "completed" | "pending" | "failed" | "awaiting_approval";
331
331
  /**
332
- * @description Why the payout was held for review. `NEW_ACCOUNT_LIMIT`: the tenant or merchant is new (first 30 days) and this payout would take its rolling 24h money-out above the new-account cap (default US$300 equivalent). `BANK_UNFUNDED`: VEX Pay could not send the transfer right away on its side; it is sent once reviewed, or rejected with `rejected_bank_unfunded` and the funds returned.
332
+ * @description Why the payout was held for review. `NEW_ACCOUNT_LIMIT`: the tenant or merchant is new (first 30 days) and this payout would take its rolling 24h money-out above the new-account cap (default US$300 equivalent). `FIRST_PAYOUTS`: the first payout of a seller, or one in its first days of sales, when VEX Pay has turned that review on; rejected with `rejected_first_payouts` and the funds returned. `BANK_UNFUNDED`: VEX Pay could not send the transfer right away on its side; it is sent once reviewed, or rejected with `rejected_bank_unfunded` and the funds returned.
333
333
  * @enum {string}
334
334
  */
335
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
335
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
336
336
  /** @description Bank reference when available. */
337
337
  reference?: string | null;
338
338
  /** @description Machine-readable failure when status is failed (e.g. merchant_inactive, payout_method_not_verified). */
@@ -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
  /**
@@ -558,7 +566,7 @@ interface components {
558
566
  cedula: string;
559
567
  /**
560
568
  * @description Beneficiary Pago Móvil phone (58… or 0…). Required for `pago_movil`.
561
- * @example 584121234567
569
+ * @example 584121873562
562
570
  */
563
571
  telefono?: string;
564
572
  /**
@@ -704,7 +712,7 @@ interface components {
704
712
  referencia: string;
705
713
  /** @description Per-recipient credit results in request order. */
706
714
  credits: {
707
- /** @example 584121234567 */
715
+ /** @example 584121873562 */
708
716
  telefono: string;
709
717
  /** @example ACCP */
710
718
  code: string;
@@ -795,7 +803,7 @@ interface components {
795
803
  monto: number;
796
804
  /**
797
805
  * @description Payer mobile: 58 + 10 digits, or 0 + 10 digits local form.
798
- * @example 584121234567
806
+ * @example 584121873562
799
807
  */
800
808
  telefono: string;
801
809
  /**
@@ -844,7 +852,7 @@ interface components {
844
852
  monto: number;
845
853
  /**
846
854
  * @description Payer mobile: 58 + 10 digits, or 0 + 10 digits local form.
847
- * @example 584121234567
855
+ * @example 584121873562
848
856
  */
849
857
  telefono: string;
850
858
  /**
@@ -914,7 +922,7 @@ interface components {
914
922
  cedula: string;
915
923
  /**
916
924
  * @description Beneficiary Pago Móvil phone (58… or 0…).
917
- * @example 584121234567
925
+ * @example 584121873562
918
926
  */
919
927
  telefono: string;
920
928
  /**
@@ -963,7 +971,7 @@ interface components {
963
971
  cedula: string;
964
972
  /**
965
973
  * @description Recipient Pago Móvil phone.
966
- * @example 584121234567
974
+ * @example 584121873562
967
975
  */
968
976
  telefono: string;
969
977
  /**
@@ -1035,7 +1043,7 @@ interface components {
1035
1043
  ChangePaymentDto: {
1036
1044
  /**
1037
1045
  * @description Customer phone that receives the change (vuelto).
1038
- * @example 584121234567
1046
+ * @example 584121873562
1039
1047
  */
1040
1048
  telefonoDestino: string;
1041
1049
  /**
@@ -1356,13 +1364,13 @@ interface components {
1356
1364
  };
1357
1365
  CopChannelDto: {
1358
1366
  /**
1359
- * @example pse
1367
+ * @example nequi
1360
1368
  * @enum {string}
1361
1369
  */
1362
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
1370
+ channel: "breb" | "nequi" | "daviplata";
1363
1371
  /**
1364
1372
  * @description Buyer-facing name (Spanish).
1365
- * @example PSE
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, or a redirect. `pse` and `bancolombia_transfer`: redirect to the buyer's bank. `bancolombia_qr`: QR the buyer scans in the Bancolombia app. `card`: hosted checkout only (`channel_requires_checkout`).
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" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
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 `redirect`: send the buyer to `url` to authorize at their bank. `redirect_pending`: the URL is not ready yet — read the payment again. `processing`: nothing to do, the outcome follows.
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" | "redirect" | "redirect_pending" | "processing";
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" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
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
- * @description `chargeback`: a refunded card payment the buyer disputed with their bank.
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, and on reads while a bank redirect or QR is pending. */
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
  /**
@@ -1875,7 +1819,7 @@ interface components {
1875
1819
  debtorId: string;
1876
1820
  /**
1877
1821
  * @description Country code 58 followed by 10 digits.
1878
- * @example 584121234567
1822
+ * @example 584121873562
1879
1823
  */
1880
1824
  debtorCellPhone: string;
1881
1825
  /**
@@ -2043,7 +1987,7 @@ interface components {
2043
1987
  bankTxId?: number;
2044
1988
  /** @example V12345678 */
2045
1989
  debtorId?: string;
2046
- /** @example 584121234567 */
1990
+ /** @example 584121873562 */
2047
1991
  debtorPhone?: string;
2048
1992
  /** @example 102 */
2049
1993
  debtorBankCode?: number;
@@ -2104,7 +2048,7 @@ interface components {
2104
2048
  vesAmount?: number;
2105
2049
  /** @example V12345678 */
2106
2050
  debtorId: string;
2107
- /** @example 584121234567 */
2051
+ /** @example 584121873562 */
2108
2052
  debtorCellPhone: string;
2109
2053
  /**
2110
2054
  * @description Venezuelan bank institution code (e.g. 102, 105, 134). Must match a bank from GET /v1/banks.
@@ -2197,7 +2141,7 @@ interface components {
2197
2141
  bankTxId?: number;
2198
2142
  /** @example V12345678 */
2199
2143
  debtorId?: string;
2200
- /** @example 584121234567 */
2144
+ /** @example 584121873562 */
2201
2145
  debtorPhone?: string;
2202
2146
  /** @example 102 */
2203
2147
  debtorBankCode?: number;
@@ -2336,7 +2280,7 @@ interface components {
2336
2280
  bankName: string;
2337
2281
  /**
2338
2282
  * @description Phone the customer sends the Pago Móvil to (11 digits). Null when not configured.
2339
- * @example 04125555555
2283
+ * @example 04125550193
2340
2284
  */
2341
2285
  phone: string | null;
2342
2286
  /**
@@ -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 */
@@ -2575,7 +2527,7 @@ interface components {
2575
2527
  identification: string;
2576
2528
  /** @example maria@mail.com */
2577
2529
  contactEmail: string;
2578
- /** @example 04141234567 */
2530
+ /** @example 04141873562 */
2579
2531
  contactPhone: string;
2580
2532
  /**
2581
2533
  * @description Optional 4-digit SIMF bank code for the first Pago Móvil payout method. Provide together with phone, or omit both to create a merchant shell with no payout method.
@@ -2584,7 +2536,7 @@ interface components {
2584
2536
  bankCode?: string;
2585
2537
  /**
2586
2538
  * @description Optional 11-digit local Pago Móvil phone for the first payout method. Provide together with bankCode, or omit both.
2587
- * @example 04145555555
2539
+ * @example 04145550193
2588
2540
  */
2589
2541
  phone?: string;
2590
2542
  /** @description Pay this merchant's available balance automatically every 15 minutes. Omit it to use your account's `merchantAutoPayoutDefault` (GET /v1/marketplace/settings). Used only when the merchant is created; change it later with PATCH /v1/merchants/{id}. */
@@ -2598,7 +2550,7 @@ interface components {
2598
2550
  bankCode: string;
2599
2551
  /**
2600
2552
  * @description 11-digit local Pago Móvil phone
2601
- * @example 04145555555
2553
+ * @example 04145550193
2602
2554
  */
2603
2555
  phone: string;
2604
2556
  };
@@ -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: number;
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
@@ -2842,6 +2799,11 @@ interface components {
2842
2799
  * @example https://shop.example/carrito
2843
2800
  */
2844
2801
  cancelUrl?: string;
2802
+ /**
2803
+ * @description Text of the button that takes the buyer to successUrl after paying (default «Continuar»). Plain text, 1–40 characters after trimming, one line. Requires successUrl.
2804
+ * @example Continuar para obtener tu voucher
2805
+ */
2806
+ successButtonLabel?: string;
2845
2807
  /**
2846
2808
  * @description Origins allowed to embed this checkout with @vexpay/js. https only; http://localhost:* allowed for test tenants. Omit to allow the hosted URL only.
2847
2809
  * @example [
@@ -2888,8 +2850,16 @@ interface components {
2888
2850
  clientSecret?: string;
2889
2851
  /** @example https://pay.vexpay.app/pay/cs-9f2a4b7c1d3e */
2890
2852
  url: string;
2891
- /** @example 25.00 */
2853
+ /**
2854
+ * @description USD amount; for a bolívar-priced session, `amountVes` at your Bolívar rate when it was created.
2855
+ * @example 25.00
2856
+ */
2892
2857
  amountUsd: string;
2858
+ /**
2859
+ * @description Exact bolívar amount charged, for a session created with `amountVes`; null otherwise.
2860
+ * @example 2000.00
2861
+ */
2862
+ amountVes?: string | null;
2893
2863
  description?: string | null;
2894
2864
  reference?: string | null;
2895
2865
  metadata: {
@@ -2899,6 +2869,8 @@ interface components {
2899
2869
  methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
2900
2870
  successUrl?: string | null;
2901
2871
  cancelUrl?: string | null;
2872
+ /** @description Text of the success button; null = default «Continuar». */
2873
+ successButtonLabel?: string | null;
2902
2874
  /** @description Latest payment for this session, once one exists. */
2903
2875
  paymentId?: string | null;
2904
2876
  /** Format: date-time */
@@ -3010,7 +2982,7 @@ interface components {
3010
2982
  amountVes: string;
3011
2983
  /**
3012
2984
  * @description Phone the Pago Móvil is sent from (Venezuelan mobile, 04XXXXXXXXX).
3013
- * @example 04121234567
2985
+ * @example 04121873562
3014
2986
  */
3015
2987
  payerPhone: string;
3016
2988
  /**
@@ -3030,7 +3002,7 @@ interface components {
3030
3002
  * @example 0169
3031
3003
  */
3032
3004
  bankCode: string;
3033
- /** @example 04140000000 */
3005
+ /** @example 04142093715 */
3034
3006
  phone: string;
3035
3007
  /** @example J-000000000 */
3036
3008
  identification: string;
@@ -3107,7 +3079,7 @@ interface components {
3107
3079
  email?: string | null;
3108
3080
  /**
3109
3081
  * @description Venezuelan mobile; stored as 11 digits starting with 04.
3110
- * @example 04141234567
3082
+ * @example 04141873562
3111
3083
  */
3112
3084
  phone?: string | null;
3113
3085
  /**
@@ -3161,7 +3133,7 @@ interface components {
3161
3133
  email?: string | null;
3162
3134
  /**
3163
3135
  * @description Venezuelan mobile; stored as 11 digits starting with 04.
3164
- * @example 04141234567
3136
+ * @example 04141873562
3165
3137
  */
3166
3138
  phone?: string | null;
3167
3139
  /**
@@ -6175,7 +6147,7 @@ interface operations {
6175
6147
  "application/json": components["schemas"]["CopPaymentDto"];
6176
6148
  };
6177
6149
  };
6178
- /** @description `invalid_data` (names the field), `amount_below_minimum`, `amount_out_of_range`, or `channel_requires_checkout` (card). */
6150
+ /** @description `invalid_data` (names the field), `amount_below_minimum` or `amount_out_of_range`. */
6179
6151
  400: {
6180
6152
  headers: {
6181
6153
  [name: string]: unknown;
@@ -13218,7 +13190,7 @@ declare class Payouts extends APIResource {
13218
13190
  create(params: RequestBody<'Payouts_create'>, options?: RequestOptions): Promise<{
13219
13191
  payoutId: string;
13220
13192
  status: "completed" | "pending" | "failed" | "awaiting_approval";
13221
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
13193
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
13222
13194
  reference?: string | null;
13223
13195
  failureCode?: string | null;
13224
13196
  externalRef?: string;
@@ -13242,7 +13214,7 @@ declare class Payouts extends APIResource {
13242
13214
  createInstant(params: RequestBody<'Payouts_createInstant'>, options?: RequestOptions): Promise<{
13243
13215
  payoutId: string;
13244
13216
  status: "completed" | "pending" | "failed" | "awaiting_approval";
13245
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
13217
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
13246
13218
  reference?: string | null;
13247
13219
  failureCode?: string | null;
13248
13220
  externalRef?: string;
@@ -13275,7 +13247,7 @@ declare class Payouts extends APIResource {
13275
13247
  }, {
13276
13248
  payoutId: string;
13277
13249
  status: "completed" | "pending" | "failed" | "awaiting_approval";
13278
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
13250
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
13279
13251
  reference?: string | null;
13280
13252
  failureCode?: string | null;
13281
13253
  externalRef?: string;
@@ -13298,7 +13270,7 @@ declare class Payouts extends APIResource {
13298
13270
  retrieve(id: string, options?: RequestOptions): Promise<{
13299
13271
  payoutId: string;
13300
13272
  status: "completed" | "pending" | "failed" | "awaiting_approval";
13301
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
13273
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
13302
13274
  reference?: string | null;
13303
13275
  failureCode?: string | null;
13304
13276
  externalRef?: string;
@@ -13321,7 +13293,7 @@ declare class Payouts extends APIResource {
13321
13293
  retrieveByRef(externalRef: string, options?: RequestOptions): Promise<{
13322
13294
  payoutId: string;
13323
13295
  status: "completed" | "pending" | "failed" | "awaiting_approval";
13324
- holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
13296
+ holdReason?: "NEW_ACCOUNT_LIMIT" | "FIRST_PAYOUTS" | "BANK_UNFUNDED";
13325
13297
  reference?: string | null;
13326
13298
  failureCode?: string | null;
13327
13299
  externalRef?: string;
@@ -13395,6 +13367,7 @@ declare class TenantPayoutAccount extends APIResource {
13395
13367
  status: "verifying";
13396
13368
  expiresAt: string;
13397
13369
  accountId: string;
13370
+ testAmounts?: string[];
13398
13371
  }>;
13399
13372
  confirmVerification(params: RequestBody<'TenantPayoutAccount_confirmVerify'>, options?: RequestOptions): Promise<{
13400
13373
  status: "eligible" | "cooling";
@@ -14007,6 +13980,7 @@ declare class CheckoutSessions extends APIResource {
14007
13980
  clientSecret?: string;
14008
13981
  url: string;
14009
13982
  amountUsd: string;
13983
+ amountVes?: string | null;
14010
13984
  description?: string | null;
14011
13985
  reference?: string | null;
14012
13986
  metadata: {
@@ -14016,6 +13990,7 @@ declare class CheckoutSessions extends APIResource {
14016
13990
  methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
14017
13991
  successUrl?: string | null;
14018
13992
  cancelUrl?: string | null;
13993
+ successButtonLabel?: string | null;
14019
13994
  paymentId?: string | null;
14020
13995
  expiresAt: string;
14021
13996
  createdAt: string;
@@ -14030,6 +14005,7 @@ declare class CheckoutSessions extends APIResource {
14030
14005
  clientSecret?: string;
14031
14006
  url: string;
14032
14007
  amountUsd: string;
14008
+ amountVes?: string | null;
14033
14009
  description?: string | null;
14034
14010
  reference?: string | null;
14035
14011
  metadata: {
@@ -14039,6 +14015,7 @@ declare class CheckoutSessions extends APIResource {
14039
14015
  methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
14040
14016
  successUrl?: string | null;
14041
14017
  cancelUrl?: string | null;
14018
+ successButtonLabel?: string | null;
14042
14019
  paymentId?: string | null;
14043
14020
  expiresAt: string;
14044
14021
  createdAt: string;
@@ -14283,24 +14260,21 @@ declare class Conversions extends APIResource {
14283
14260
  }
14284
14261
 
14285
14262
  /**
14286
- * Colombian peso payments: PSE and Bancolombia (bank redirect), Bancolombia QR, Bre-B (QR /
14287
- * transfer key), Nequi (push approval) or Daviplata (SMS code or redirect). Cards are taken only on
14288
- * the hosted checkout. Payments complete asynchronously — listen for `payment.completed` /
14263
+ * Colombian peso payments: Bre-B (QR / transfer key), Nequi (push approval) or Daviplata (SMS
14264
+ * code). Payments complete asynchronously — listen for `payment.completed` /
14289
14265
  * `payment.failed`. COP must be enabled on your account (403 `method_not_allowed` otherwise).
14290
14266
  */
14291
14267
  declare class CopPayments extends APIResource {
14292
14268
  /**
14293
- * Create a payment in whole pesos. `buyer` is required for every channel except `breb`, with
14294
- * `termsAccepted: true` when {@link Cop.channels} says `needsTermsAcceptance`; `pse` also needs
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).
14269
+ * Create a payment in whole pesos. `buyer` is required for every channel except `breb`. The
14270
+ * response `next` says what the buyer does: `show_qr`, `approve_in_app` or `submit_otp`.
14297
14271
  * Pass `idempotencyKey` in options to retry safely.
14298
14272
  */
14299
14273
  create(params: RequestBody<'CopPayments_create'>, options?: RequestOptions): Promise<{
14300
14274
  id: string;
14301
14275
  status: "pending" | "completed" | "failed" | "canceled" | "refunded";
14302
14276
  method: "COP";
14303
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
14277
+ channel: "breb" | "nequi" | "daviplata";
14304
14278
  amountCop: number;
14305
14279
  feeCop?: number;
14306
14280
  amountUsd?: string;
@@ -14309,18 +14283,17 @@ declare class CopPayments extends APIResource {
14309
14283
  metadata: {
14310
14284
  [key: string]: string;
14311
14285
  };
14312
- failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
14286
+ failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
14313
14287
  expiresAt?: string;
14314
14288
  createdAt: string;
14315
14289
  completedAt?: string;
14316
14290
  next?: components["schemas"]["CopNextActionDto"];
14317
- card?: Record<string, never>;
14318
14291
  }>;
14319
14292
  retrieve(id: string, options?: RequestOptions): Promise<{
14320
14293
  id: string;
14321
14294
  status: "pending" | "completed" | "failed" | "canceled" | "refunded";
14322
14295
  method: "COP";
14323
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
14296
+ channel: "breb" | "nequi" | "daviplata";
14324
14297
  amountCop: number;
14325
14298
  feeCop?: number;
14326
14299
  amountUsd?: string;
@@ -14329,19 +14302,18 @@ declare class CopPayments extends APIResource {
14329
14302
  metadata: {
14330
14303
  [key: string]: string;
14331
14304
  };
14332
- failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
14305
+ failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
14333
14306
  expiresAt?: string;
14334
14307
  createdAt: string;
14335
14308
  completedAt?: string;
14336
14309
  next?: components["schemas"]["CopNextActionDto"];
14337
- card?: Record<string, never>;
14338
14310
  }>;
14339
14311
  /** Daviplata with `next.type: "submit_otp"`: submit the code the buyer received by SMS. A wrong code fails with `invalid_otp`. */
14340
14312
  submitOtp(id: string, params: RequestBody<'CopPayments_submitOtp'>, options?: RequestOptions): Promise<{
14341
14313
  id: string;
14342
14314
  status: "pending" | "completed" | "failed" | "canceled" | "refunded";
14343
14315
  method: "COP";
14344
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
14316
+ channel: "breb" | "nequi" | "daviplata";
14345
14317
  amountCop: number;
14346
14318
  feeCop?: number;
14347
14319
  amountUsd?: string;
@@ -14350,19 +14322,18 @@ declare class CopPayments extends APIResource {
14350
14322
  metadata: {
14351
14323
  [key: string]: string;
14352
14324
  };
14353
- failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
14325
+ failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
14354
14326
  expiresAt?: string;
14355
14327
  createdAt: string;
14356
14328
  completedAt?: string;
14357
14329
  next?: components["schemas"]["CopNextActionDto"];
14358
- card?: Record<string, never>;
14359
14330
  }>;
14360
14331
  /** Cancel a pending payment. */
14361
14332
  cancel(id: string, options?: RequestOptions): Promise<{
14362
14333
  id: string;
14363
14334
  status: "pending" | "completed" | "failed" | "canceled" | "refunded";
14364
14335
  method: "COP";
14365
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
14336
+ channel: "breb" | "nequi" | "daviplata";
14366
14337
  amountCop: number;
14367
14338
  feeCop?: number;
14368
14339
  amountUsd?: string;
@@ -14371,22 +14342,21 @@ declare class CopPayments extends APIResource {
14371
14342
  metadata: {
14372
14343
  [key: string]: string;
14373
14344
  };
14374
- failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
14345
+ failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
14375
14346
  expiresAt?: string;
14376
14347
  createdAt: string;
14377
14348
  completedAt?: string;
14378
14349
  next?: components["schemas"]["CopNextActionDto"];
14379
- card?: Record<string, never>;
14380
14350
  }>;
14381
14351
  /**
14382
- * Full refund of a completed payment, within the channel's window (card 24 h, Bre-B 96 h).
14383
- * Channels that cannot be refunded through the API fail with `refund_not_supported`.
14352
+ * Full refund of a completed payment, within 96 hours of completion. A payment that can no
14353
+ * longer be refunded through the API fails with `refund_not_supported`.
14384
14354
  */
14385
14355
  refund(id: string, options?: RequestOptions): Promise<{
14386
14356
  id: string;
14387
14357
  status: "pending" | "completed" | "failed" | "canceled" | "refunded";
14388
14358
  method: "COP";
14389
- channel: "breb" | "nequi" | "daviplata" | "card" | "pse" | "bancolombia_transfer" | "bancolombia_qr";
14359
+ channel: "breb" | "nequi" | "daviplata";
14390
14360
  amountCop: number;
14391
14361
  feeCop?: number;
14392
14362
  amountUsd?: string;
@@ -14395,12 +14365,11 @@ declare class CopPayments extends APIResource {
14395
14365
  metadata: {
14396
14366
  [key: string]: string;
14397
14367
  };
14398
- failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown" | "chargeback";
14368
+ failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
14399
14369
  expiresAt?: string;
14400
14370
  createdAt: string;
14401
14371
  completedAt?: string;
14402
14372
  next?: components["schemas"]["CopNextActionDto"];
14403
- card?: Record<string, never>;
14404
14373
  }>;
14405
14374
  }
14406
14375
  /** Your COP balance, in whole pesos. Kept apart from VES and stablecoins. */
@@ -14413,15 +14382,13 @@ declare class CopBalance extends APIResource {
14413
14382
  asOf: string;
14414
14383
  }>;
14415
14384
  }
14416
- /** Collect Colombian pesos (PSE, Bancolombia, Bre-B, Nequi, Daviplata; cards via the hosted checkout). */
14385
+ /** Collect Colombian pesos (Bre-B, Nequi, Daviplata). */
14417
14386
  declare class Cop extends APIResource {
14418
14387
  readonly payments: CopPayments;
14419
14388
  readonly balance: CopBalance;
14420
- /** Channels you can use right now, with what each needs, plus the PSE banks and terms links. */
14389
+ /** Channels you can use right now, with what each needs. */
14421
14390
  channels(options?: RequestOptions): Promise<{
14422
14391
  channels: components["schemas"]["CopChannelDto"][];
14423
- pseBanks?: components["schemas"]["CopPseBankDto"][];
14424
- terms?: components["schemas"]["CopTermsDto"];
14425
14392
  }>;
14426
14393
  }
14427
14394
 
@@ -14585,6 +14552,7 @@ declare class PayoutMethods extends APIResource {
14585
14552
  status: string;
14586
14553
  expiresAt: string;
14587
14554
  payoutMethodId?: string;
14555
+ testAmounts?: string[];
14588
14556
  }>;
14589
14557
  /** Confirm the micro-deposit amounts the merchant saw. */
14590
14558
  confirmVerification(merchantId: string, methodId: string, params: RequestBody<'Merchants_confirmVerifyMethod'>, options?: RequestOptions): Promise<{
@@ -14801,6 +14769,7 @@ declare class Merchants extends APIResource {
14801
14769
  status: string;
14802
14770
  expiresAt: string;
14803
14771
  payoutMethodId?: string;
14772
+ testAmounts?: string[];
14804
14773
  }>;
14805
14774
  confirmVerification(id: string, params: RequestBody<'Merchants_confirmVerify'>, options?: RequestOptions): Promise<{
14806
14775
  status: string;
@@ -15191,6 +15160,11 @@ interface PaymentWebhookData {
15191
15160
  method: 'C2P' | 'VPOS' | 'PAGO_MOVIL' | 'DEBITO_INMEDIATO' | 'COP';
15192
15161
  usdAmount: number;
15193
15162
  vesAmount: number;
15163
+ /**
15164
+ * Pago Móvil only, present when the payer sent more than asked (up to Bs 500 more is accepted):
15165
+ * the bolívar amount originally asked. `vesAmount` and `usdAmount` are then what arrived.
15166
+ */
15167
+ requestedVesAmount?: number;
15194
15168
  /** Official BCV rate (Bs per $1) when the payment was created. */
15195
15169
  bcvRate: number;
15196
15170
  /** Rate the payment was priced at: `bcvRate` for BCV accounts, the market rate for MARKET accounts. */
@@ -15235,22 +15209,15 @@ interface CopPaymentWebhookData {
15235
15209
  method: 'COP';
15236
15210
  currency: 'COP';
15237
15211
  status: 'pending' | 'completed' | 'failed' | 'canceled' | 'refunded';
15238
- channel: 'breb' | 'nequi' | 'daviplata' | 'card' | 'pse' | 'bancolombia_transfer' | 'bancolombia_qr';
15212
+ channel: 'breb' | 'nequi' | 'daviplata';
15239
15213
  amountCop: number;
15240
- /** Card payments: brand and last 4 digits. */
15241
- card?: {
15242
- brand: string;
15243
- last4: string;
15244
- };
15245
15214
  feeCop?: number;
15246
15215
  amountUsd?: string;
15247
15216
  copRate?: string;
15248
15217
  reference?: string;
15249
15218
  externalRef?: string;
15250
15219
  metadata: Record<string, string>;
15251
- failureCode?: 'expired' | 'rejected' | 'processor_error' | 'processor_unknown' | 'chargeback';
15252
- /** `payment.reversed` from a card dispute: `"chargeback"` (the amount was debited from your COP balance). */
15253
- reason?: 'chargeback';
15220
+ failureCode?: 'expired' | 'rejected' | 'processor_error' | 'processor_unknown';
15254
15221
  expiresAt?: string;
15255
15222
  createdAt: string;
15256
15223
  completedAt?: string;
@@ -15392,6 +15359,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
15392
15359
  declare class VexPaySignatureVerificationError extends VexPayError {
15393
15360
  }
15394
15361
 
15395
- declare const VERSION = "0.17.0";
15362
+ declare const VERSION = "0.19.0";
15396
15363
 
15397
15364
  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 };