@vexpay/node 0.7.0 → 0.9.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
@@ -155,7 +155,7 @@ interface components {
155
155
  * "payment.failed"
156
156
  * ]
157
157
  */
158
- events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
158
+ events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
159
159
  };
160
160
  WebhookEndpointDto: {
161
161
  /** Format: uuid */
@@ -164,7 +164,7 @@ interface components {
164
164
  tenantId: string;
165
165
  /** Format: uri */
166
166
  url: string;
167
- events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
167
+ events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
168
168
  isActive: boolean;
169
169
  /** Format: date-time */
170
170
  createdAt: string;
@@ -185,7 +185,7 @@ interface components {
185
185
  * "payout.completed"
186
186
  * ]
187
187
  */
188
- events?: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
188
+ events?: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
189
189
  /** @example true */
190
190
  isActive?: boolean;
191
191
  };
@@ -1482,11 +1482,25 @@ interface components {
1482
1482
  /** @example 25 */
1483
1483
  usdAmount: number;
1484
1484
  /**
1485
- * @description Authoritative VEX FX BCV rate used for payment settlement
1485
+ * @description Official VEX FX BCV rate (Bs per $1).
1486
1486
  * @example 36.5
1487
1487
  */
1488
1488
  bcvRate: number;
1489
- /** @example 912.5 */
1489
+ /**
1490
+ * @description Rate your payments are priced at (Bs per $1): `bcvRate` for BCV accounts, the market rate for MARKET accounts.
1491
+ * @example 36.5
1492
+ */
1493
+ rate?: number;
1494
+ /**
1495
+ * @description Your account's Bolívar rate setting.
1496
+ * @example BCV
1497
+ * @enum {string}
1498
+ */
1499
+ rateSource?: "BCV" | "MARKET";
1500
+ /**
1501
+ * @description usdAmount × rate, rounded to the cent: what a payment created now would charge.
1502
+ * @example 912.5
1503
+ */
1490
1504
  vesAmount: number;
1491
1505
  /**
1492
1506
  * @description Median of available BCV sources (VEX FX + bank)
@@ -1519,9 +1533,31 @@ interface components {
1519
1533
  [key: string]: unknown;
1520
1534
  };
1521
1535
  };
1536
+ OnwardPayoutDto: {
1537
+ /**
1538
+ * @description USDT payout network (see GET /v1/crypto/networks).
1539
+ * @example BEP20
1540
+ */
1541
+ network: string;
1542
+ /**
1543
+ * @description Destination wallet address. Only its format is checked: a wrong but valid address cannot be recovered.
1544
+ * @example 0x2f5c…
1545
+ */
1546
+ address: string;
1547
+ /** @description Destination tag / memo, for networks that need one (e.g. TON). */
1548
+ tag?: string;
1549
+ };
1522
1550
  C2pRequestDto: {
1523
- /** @example 25 */
1524
- usdAmount: number;
1551
+ /**
1552
+ * @description USD amount. Required unless vesAmount is set. When only usdAmount is set, VES is derived at your Bolívar rate (live BCV, or market if you chose it).
1553
+ * @example 25
1554
+ */
1555
+ usdAmount?: number;
1556
+ /**
1557
+ * @description VES amount debited at the bank. When set, locks the bolívar charge and derives USD at your Bolívar rate (it wins over usdAmount). The intent keeps this amount until it is executed.
1558
+ * @example 50
1559
+ */
1560
+ vesAmount?: number;
1525
1561
  /** @example V12345678 */
1526
1562
  debtorId: string;
1527
1563
  /**
@@ -1551,6 +1587,49 @@ interface components {
1551
1587
  * @example 10
1552
1588
  */
1553
1589
  applicationFeePercent?: number;
1590
+ /** @description Convert this payment's net VES to USDT once it completes and send it to this wallet. Needs USDT and conversions enabled; not allowed with merchantId. See the "Pay in bolívars, receive USDT" guide. */
1591
+ onwardPayout?: components["schemas"]["OnwardPayoutDto"];
1592
+ };
1593
+ OnwardPayoutStatusDto: {
1594
+ /**
1595
+ * @example completed
1596
+ * @enum {string}
1597
+ */
1598
+ status: "pending" | "converting" | "sending" | "completed" | "held" | "failed" | "canceled";
1599
+ /** @example BEP20 */
1600
+ network: string;
1601
+ /** @example 0x2f5c0000000000000000000000000000000000aa */
1602
+ address: string;
1603
+ tag?: string;
1604
+ /**
1605
+ * Format: uuid
1606
+ * @description The VES → USDT conversion, once created.
1607
+ */
1608
+ conversionId?: string;
1609
+ /**
1610
+ * Format: uuid
1611
+ * @description The USDT payout, once created.
1612
+ */
1613
+ payoutId?: string;
1614
+ /**
1615
+ * @description USDT sent to the address.
1616
+ * @example 18.94
1617
+ */
1618
+ amountUsdt?: string;
1619
+ /**
1620
+ * @description Network payout fee.
1621
+ * @example 0.75
1622
+ */
1623
+ feeUsdt?: string;
1624
+ /** @description On-chain hash once the payout completed. */
1625
+ txHash?: string;
1626
+ /**
1627
+ * @description Why it is held, failed or canceled.
1628
+ * @example below_payout_minimum
1629
+ */
1630
+ reason?: string;
1631
+ /** Format: date-time */
1632
+ updatedAt: string;
1554
1633
  };
1555
1634
  C2pIntentResponseDto: {
1556
1635
  /**
@@ -1571,8 +1650,22 @@ interface components {
1571
1650
  usdAmount: number;
1572
1651
  /** @example 912.5 */
1573
1652
  vesAmount: number;
1574
- /** @example 36.5 */
1653
+ /**
1654
+ * @description Official BCV rate (Bs per $1) when the payment was created. Reference only; see `rate`.
1655
+ * @example 36.5
1656
+ */
1575
1657
  bcvRate: number;
1658
+ /**
1659
+ * @description Rate (Bs per $1) this payment was priced at: equal to `bcvRate` for BCV tenants, the market rate for MARKET tenants.
1660
+ * @example 36.5
1661
+ */
1662
+ rate?: number;
1663
+ /**
1664
+ * @description Source of `rate`: the account's Bolívar rate setting when the payment was created.
1665
+ * @example BCV
1666
+ * @enum {string}
1667
+ */
1668
+ rateSource?: "BCV" | "MARKET";
1576
1669
  /**
1577
1670
  * @description Platform service fee, USD. Clamped 0..usdAmount.
1578
1671
  * @example 0.88
@@ -1625,6 +1718,8 @@ interface components {
1625
1718
  reversalRef?: string;
1626
1719
  /** @example 842950 */
1627
1720
  reversalTxId?: number;
1721
+ /** @description Present when the pay-in was sent with `onwardPayout`. */
1722
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
1628
1723
  /**
1629
1724
  * Format: uuid
1630
1725
  * @description Use this value as intentId when executing the C2P charge.
@@ -1639,8 +1734,16 @@ interface components {
1639
1734
  * @description Pending intent returned by POST /v1/payments/c2p/request.
1640
1735
  */
1641
1736
  intentId?: string;
1642
- /** @example 25 */
1643
- usdAmount: number;
1737
+ /**
1738
+ * @description USD amount. Required unless vesAmount or intentId is set. When only usdAmount is set, VES is derived at your Bolívar rate (live BCV, or market if you chose it).
1739
+ * @example 25
1740
+ */
1741
+ usdAmount?: number;
1742
+ /**
1743
+ * @description VES amount debited at the bank. When set, locks the bolívar charge and derives USD at your Bolívar rate (it wins over usdAmount). With intentId the amount locked on the intent is charged; amounts sent here must match it (±0.01 Bs / ±$0.01).
1744
+ * @example 50
1745
+ */
1746
+ vesAmount?: number;
1644
1747
  /** @example V12345678 */
1645
1748
  debtorId: string;
1646
1749
  /** @example 584121234567 */
@@ -1675,6 +1778,8 @@ interface components {
1675
1778
  * @example 10
1676
1779
  */
1677
1780
  applicationFeePercent?: number;
1781
+ /** @description Convert this payment's net VES to USDT once it completes and send it to this wallet. Needs USDT and conversions enabled; not allowed with merchantId. See the "Pay in bolívars, receive USDT" guide. */
1782
+ onwardPayout?: components["schemas"]["OnwardPayoutDto"];
1678
1783
  };
1679
1784
  PaymentReceiptDto: {
1680
1785
  /**
@@ -1695,8 +1800,22 @@ interface components {
1695
1800
  usdAmount: number;
1696
1801
  /** @example 912.5 */
1697
1802
  vesAmount: number;
1698
- /** @example 36.5 */
1803
+ /**
1804
+ * @description Official BCV rate (Bs per $1) when the payment was created. Reference only; see `rate`.
1805
+ * @example 36.5
1806
+ */
1699
1807
  bcvRate: number;
1808
+ /**
1809
+ * @description Rate (Bs per $1) this payment was priced at: equal to `bcvRate` for BCV tenants, the market rate for MARKET tenants.
1810
+ * @example 36.5
1811
+ */
1812
+ rate?: number;
1813
+ /**
1814
+ * @description Source of `rate`: the account's Bolívar rate setting when the payment was created.
1815
+ * @example BCV
1816
+ * @enum {string}
1817
+ */
1818
+ rateSource?: "BCV" | "MARKET";
1700
1819
  /**
1701
1820
  * @description Platform service fee, USD. Clamped 0..usdAmount.
1702
1821
  * @example 0.88
@@ -1749,15 +1868,17 @@ interface components {
1749
1868
  reversalRef?: string;
1750
1869
  /** @example 842950 */
1751
1870
  reversalTxId?: number;
1871
+ /** @description Present when the pay-in was sent with `onwardPayout`. */
1872
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
1752
1873
  };
1753
1874
  VposPaymentDto: {
1754
1875
  /**
1755
- * @description USD amount. Required unless vesAmount is set. When only usdAmount is set, VES is derived at the live BCV rate.
1876
+ * @description USD amount. Required unless vesAmount is set. When only usdAmount is set, VES is derived at your Bolívar rate (live BCV, or market if you chose it).
1756
1877
  * @example 25
1757
1878
  */
1758
1879
  usdAmount?: number;
1759
1880
  /**
1760
- * @description VES amount charged at the bank. When set, locks the bolívar charge and derives USD at BCV — use this to avoid USD↔VES 2-decimal round-trip drift (e.g. Bs. 50 → $0.07 → Bs. 52.86).
1881
+ * @description VES amount charged at the bank. When set, locks the bolívar charge and derives USD at your Bolívar rate — use this to avoid USD↔VES 2-decimal round-trip drift (e.g. Bs. 50 → $0.07 → Bs. 52.86).
1761
1882
  * @example 50
1762
1883
  */
1763
1884
  vesAmount?: number;
@@ -1798,6 +1919,11 @@ interface components {
1798
1919
  * @example order-1042
1799
1920
  */
1800
1921
  externalRef?: string;
1922
+ /**
1923
+ * @description Who the funds are for when that is not a merchant (e.g. the wallet user being topped up). Shown to ops only; does not affect settlement.
1924
+ * @example @maria
1925
+ */
1926
+ beneficiary?: string;
1801
1927
  /** Format: uuid */
1802
1928
  merchantId?: string;
1803
1929
  /**
@@ -1811,6 +1937,25 @@ interface components {
1811
1937
  */
1812
1938
  applicationFeePercent?: number;
1813
1939
  };
1940
+ PaymentMethodAvailabilityDto: {
1941
+ /**
1942
+ * @description `pago_movil`: the customer sends a Pago Móvil (verify). `c2p`: bank debit with the customer's OTP. `vpos`: card.
1943
+ * @enum {string}
1944
+ */
1945
+ method: "pago_movil" | "c2p" | "vpos";
1946
+ /** @description Whether your account can take this method right now. */
1947
+ available: boolean;
1948
+ /**
1949
+ * @description Only when available is false. `not_enabled`: the method is not enabled on your account. `receiving_account_not_configured`: Pago Móvil receiving details are not set up yet. `provider_not_configured`: temporarily unavailable in this mode — contact support.
1950
+ * @enum {string}
1951
+ */
1952
+ reason?: "not_enabled" | "receiving_account_not_configured" | "provider_not_configured";
1953
+ };
1954
+ PaymentMethodsResponseDto: {
1955
+ /** @description false for test keys. */
1956
+ livemode: boolean;
1957
+ methods: components["schemas"]["PaymentMethodAvailabilityDto"][];
1958
+ };
1814
1959
  PagoMovilReceivingAccountDto: {
1815
1960
  /**
1816
1961
  * @description Provider Pago Móvil verify uses for this tenant (same routing as POST /v1/payments/pago-movil/verify).
@@ -1876,6 +2021,8 @@ interface components {
1876
2021
  * @example 04149333844
1877
2022
  */
1878
2023
  debtorCellPhone?: string;
2024
+ /** @description Convert this payment's net VES to USDT once it completes and send it to this wallet. Needs USDT and conversions enabled; not allowed with merchantId. See the "Pay in bolívars, receive USDT" guide. */
2025
+ onwardPayout?: components["schemas"]["OnwardPayoutDto"];
1879
2026
  };
1880
2027
  PayoutMethodResponseDto: {
1881
2028
  /** Format: uuid */
@@ -2136,8 +2283,8 @@ interface components {
2136
2283
  * ]
2137
2284
  */
2138
2285
  allowedOrigins?: string[];
2139
- /** @description Payment methods offered. Defaults to every method your account can accept. `cop` (Colombian pesos: Bre-B, Nequi, Daviplata) needs the COP method on your account. */
2140
- methods?: ("c2p" | "vpos" | "usdt" | "usdc" | "cop")[];
2286
+ /** @description Payment methods offered. Defaults to every method your account can accept. `c2p` is the bank pull shown as Débito Inmediato; `pago_movil` is a Pago Móvil the buyer sends from their bank app (needs Pago Móvil enabled on your account). `cop` (Colombian pesos: Bre-B, Nequi, Daviplata) needs the COP method on your account. */
2287
+ methods?: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
2141
2288
  /**
2142
2289
  * @description Up to 20 string key/value pairs (keys ≤ 40 chars, values ≤ 500 chars).
2143
2290
  * @example {
@@ -2173,7 +2320,7 @@ interface components {
2173
2320
  [key: string]: string;
2174
2321
  };
2175
2322
  allowedOrigins: string[];
2176
- methods: ("c2p" | "vpos" | "usdt" | "usdc" | "cop")[];
2323
+ methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
2177
2324
  successUrl?: string | null;
2178
2325
  cancelUrl?: string | null;
2179
2326
  /** @description Latest payment for this session, once one exists. */
@@ -5843,7 +5990,7 @@ interface operations {
5843
5990
  };
5844
5991
  requestBody?: never;
5845
5992
  responses: {
5846
- /** @description bcvRate/vesAmount are authoritative for settlement; medianRate/medianVesAmount are for display. sources includes per-source rates or errors. */
5993
+ /** @description rate/vesAmount are authoritative for settlement; bcvRate is the official rate; medianRate/medianVesAmount are for display. sources includes per-source rates or errors. */
5847
5994
  200: {
5848
5995
  headers: {
5849
5996
  [name: string]: unknown;
@@ -6149,6 +6296,70 @@ interface operations {
6149
6296
  };
6150
6297
  };
6151
6298
  };
6299
+ Payments_listPaymentMethods: {
6300
+ parameters: {
6301
+ query?: never;
6302
+ header?: never;
6303
+ path?: never;
6304
+ cookie?: never;
6305
+ };
6306
+ requestBody?: never;
6307
+ responses: {
6308
+ 200: {
6309
+ headers: {
6310
+ [name: string]: unknown;
6311
+ };
6312
+ content: {
6313
+ "application/json": components["schemas"]["PaymentMethodsResponseDto"];
6314
+ };
6315
+ };
6316
+ /** @description Invalid request or unsupported operation. */
6317
+ 400: {
6318
+ headers: {
6319
+ [name: string]: unknown;
6320
+ };
6321
+ content: {
6322
+ "application/json": components["schemas"]["ApiErrorDto"];
6323
+ };
6324
+ };
6325
+ /** @description Missing, invalid, or inactive tenant API key. */
6326
+ 401: {
6327
+ headers: {
6328
+ [name: string]: unknown;
6329
+ };
6330
+ content: {
6331
+ "application/json": components["schemas"]["ApiErrorDto"];
6332
+ };
6333
+ };
6334
+ /** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
6335
+ 403: {
6336
+ headers: {
6337
+ [name: string]: unknown;
6338
+ };
6339
+ content: {
6340
+ "application/json": components["schemas"]["ApiErrorDto"];
6341
+ };
6342
+ };
6343
+ /** @description Client error. */
6344
+ "4XX": {
6345
+ headers: {
6346
+ [name: string]: unknown;
6347
+ };
6348
+ content: {
6349
+ "application/json": components["schemas"]["ApiErrorDto"];
6350
+ };
6351
+ };
6352
+ /** @description Server or upstream bank error. */
6353
+ "5XX": {
6354
+ headers: {
6355
+ [name: string]: unknown;
6356
+ };
6357
+ content: {
6358
+ "application/json": components["schemas"]["ApiErrorDto"];
6359
+ };
6360
+ };
6361
+ };
6362
+ };
6152
6363
  Payments_getPagoMovilReceivingAccount: {
6153
6364
  parameters: {
6154
6365
  query?: never;
@@ -8708,6 +8919,15 @@ interface operations {
8708
8919
  "application/json": components["schemas"]["ApiErrorDto"];
8709
8920
  };
8710
8921
  };
8922
+ /** @description More than 10 test notifications in 10 minutes. */
8923
+ 429: {
8924
+ headers: {
8925
+ [name: string]: unknown;
8926
+ };
8927
+ content: {
8928
+ "application/json": components["schemas"]["ApiErrorDto"];
8929
+ };
8930
+ };
8711
8931
  /** @description Client error. */
8712
8932
  "4XX": {
8713
8933
  headers: {
@@ -8808,6 +9028,8 @@ declare class Quotes extends APIResource {
8808
9028
  retrieve(params: QueryParams<'Payments_getQuote'>, options?: RequestOptions): Promise<{
8809
9029
  usdAmount: number;
8810
9030
  bcvRate: number;
9031
+ rate?: number;
9032
+ rateSource?: "BCV" | "MARKET";
8811
9033
  vesAmount: number;
8812
9034
  medianRate: number;
8813
9035
  medianVesAmount: number;
@@ -9039,7 +9261,7 @@ declare class WebhookEndpoints extends APIResource {
9039
9261
  id: string;
9040
9262
  tenantId: string;
9041
9263
  url: string;
9042
- events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9264
+ events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9043
9265
  isActive: boolean;
9044
9266
  createdAt: string;
9045
9267
  secret?: string;
@@ -9048,7 +9270,7 @@ declare class WebhookEndpoints extends APIResource {
9048
9270
  id: string;
9049
9271
  tenantId: string;
9050
9272
  url: string;
9051
- events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9273
+ events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9052
9274
  isActive: boolean;
9053
9275
  createdAt: string;
9054
9276
  secret?: string;
@@ -9057,7 +9279,7 @@ declare class WebhookEndpoints extends APIResource {
9057
9279
  id: string;
9058
9280
  tenantId: string;
9059
9281
  url: string;
9060
- events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9282
+ events: ("payment.pending" | "payment.completed" | "payment.failed" | "payment.canceled" | "payment.reversed" | "payment.chargeback" | "payment.chargeback_closed" | "merchant.verified" | "merchant.rejected" | "merchant.deactivated" | "merchant.reactivated" | "merchant.balance.updated" | "merchant.created" | "merchant.activated" | "merchant.updated" | "merchant.kyb_required" | "merchant.restricted" | "merchant.capability.updated" | "merchant.wallet_credit" | "payout.completed" | "payout.failed" | "conversion.created" | "conversion.completed" | "conversion.canceled" | "onward_payout.updated" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
9061
9283
  isActive: boolean;
9062
9284
  createdAt: string;
9063
9285
  secret?: string;
@@ -9089,7 +9311,7 @@ declare class CheckoutSessions extends APIResource {
9089
9311
  [key: string]: string;
9090
9312
  };
9091
9313
  allowedOrigins: string[];
9092
- methods: ("c2p" | "vpos" | "usdt" | "usdc" | "cop")[];
9314
+ methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
9093
9315
  successUrl?: string | null;
9094
9316
  cancelUrl?: string | null;
9095
9317
  paymentId?: string | null;
@@ -9110,7 +9332,7 @@ declare class CheckoutSessions extends APIResource {
9110
9332
  [key: string]: string;
9111
9333
  };
9112
9334
  allowedOrigins: string[];
9113
- methods: ("c2p" | "vpos" | "usdt" | "usdc" | "cop")[];
9335
+ methods: ("c2p" | "pago_movil" | "vpos" | "usdt" | "usdc" | "cop")[];
9114
9336
  successUrl?: string | null;
9115
9337
  cancelUrl?: string | null;
9116
9338
  paymentId?: string | null;
@@ -9794,6 +10016,8 @@ declare class C2p extends APIResource {
9794
10016
  usdAmount: number;
9795
10017
  vesAmount: number;
9796
10018
  bcvRate: number;
10019
+ rate?: number;
10020
+ rateSource?: "BCV" | "MARKET";
9797
10021
  feeUsd?: number;
9798
10022
  feeVes?: number;
9799
10023
  netVes?: number;
@@ -9814,6 +10038,7 @@ declare class C2p extends APIResource {
9814
10038
  reversedAt?: string;
9815
10039
  reversalRef?: string;
9816
10040
  reversalTxId?: number;
10041
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9817
10042
  intentId: string;
9818
10043
  otpRequested: boolean;
9819
10044
  }>;
@@ -9826,6 +10051,8 @@ declare class C2p extends APIResource {
9826
10051
  usdAmount: number;
9827
10052
  vesAmount: number;
9828
10053
  bcvRate: number;
10054
+ rate?: number;
10055
+ rateSource?: "BCV" | "MARKET";
9829
10056
  feeUsd?: number;
9830
10057
  feeVes?: number;
9831
10058
  netVes?: number;
@@ -9846,6 +10073,7 @@ declare class C2p extends APIResource {
9846
10073
  reversedAt?: string;
9847
10074
  reversalRef?: string;
9848
10075
  reversalTxId?: number;
10076
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9849
10077
  }>;
9850
10078
  }
9851
10079
  /** Card payments (VPOS). Prefer the hosted/embedded checkout so card data never touches your servers. */
@@ -9858,6 +10086,8 @@ declare class Vpos extends APIResource {
9858
10086
  usdAmount: number;
9859
10087
  vesAmount: number;
9860
10088
  bcvRate: number;
10089
+ rate?: number;
10090
+ rateSource?: "BCV" | "MARKET";
9861
10091
  feeUsd?: number;
9862
10092
  feeVes?: number;
9863
10093
  netVes?: number;
@@ -9878,6 +10108,7 @@ declare class Vpos extends APIResource {
9878
10108
  reversedAt?: string;
9879
10109
  reversalRef?: string;
9880
10110
  reversalTxId?: number;
10111
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9881
10112
  }>;
9882
10113
  }
9883
10114
  /** Confirm a Pago Móvil the customer already sent to you. */
@@ -9904,6 +10135,8 @@ declare class PagoMovil extends APIResource {
9904
10135
  usdAmount: number;
9905
10136
  vesAmount: number;
9906
10137
  bcvRate: number;
10138
+ rate?: number;
10139
+ rateSource?: "BCV" | "MARKET";
9907
10140
  feeUsd?: number;
9908
10141
  feeVes?: number;
9909
10142
  netVes?: number;
@@ -9924,6 +10157,7 @@ declare class PagoMovil extends APIResource {
9924
10157
  reversedAt?: string;
9925
10158
  reversalRef?: string;
9926
10159
  reversalTxId?: number;
10160
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9927
10161
  }>;
9928
10162
  }
9929
10163
  /** Débito inmediato (advanced payments, enabled per account). */
@@ -10031,6 +10265,11 @@ declare class Payments extends APIResource {
10031
10265
  readonly operations: Operations;
10032
10266
  readonly dispersals: Dispersals;
10033
10267
  readonly change: Change;
10268
+ /** Bolívar methods your account can take now (`pago_movil`, `c2p`, `vpos`), with a reason when unavailable. */
10269
+ methods(options?: RequestOptions): Promise<{
10270
+ livemode: boolean;
10271
+ methods: components["schemas"]["PaymentMethodAvailabilityDto"][];
10272
+ }>;
10034
10273
  retrieve(id: string, options?: RequestOptions): Promise<{
10035
10274
  paymentId: string;
10036
10275
  externalRef?: string;
@@ -10039,6 +10278,8 @@ declare class Payments extends APIResource {
10039
10278
  usdAmount: number;
10040
10279
  vesAmount: number;
10041
10280
  bcvRate: number;
10281
+ rate?: number;
10282
+ rateSource?: "BCV" | "MARKET";
10042
10283
  feeUsd?: number;
10043
10284
  feeVes?: number;
10044
10285
  netVes?: number;
@@ -10059,6 +10300,7 @@ declare class Payments extends APIResource {
10059
10300
  reversedAt?: string;
10060
10301
  reversalRef?: string;
10061
10302
  reversalTxId?: number;
10303
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10062
10304
  }>;
10063
10305
  /** Look up a payment by the `externalRef` you sent. */
10064
10306
  retrieveByRef(externalRef: string, options?: RequestOptions): Promise<{
@@ -10069,6 +10311,8 @@ declare class Payments extends APIResource {
10069
10311
  usdAmount: number;
10070
10312
  vesAmount: number;
10071
10313
  bcvRate: number;
10314
+ rate?: number;
10315
+ rateSource?: "BCV" | "MARKET";
10072
10316
  feeUsd?: number;
10073
10317
  feeVes?: number;
10074
10318
  netVes?: number;
@@ -10089,6 +10333,7 @@ declare class Payments extends APIResource {
10089
10333
  reversedAt?: string;
10090
10334
  reversalRef?: string;
10091
10335
  reversalTxId?: number;
10336
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10092
10337
  }>;
10093
10338
  /** Reverse a completed C2P payment. */
10094
10339
  reverse(id: string, options?: RequestOptions): Promise<{
@@ -10099,6 +10344,8 @@ declare class Payments extends APIResource {
10099
10344
  usdAmount: number;
10100
10345
  vesAmount: number;
10101
10346
  bcvRate: number;
10347
+ rate?: number;
10348
+ rateSource?: "BCV" | "MARKET";
10102
10349
  feeUsd?: number;
10103
10350
  feeVes?: number;
10104
10351
  netVes?: number;
@@ -10119,10 +10366,11 @@ declare class Payments extends APIResource {
10119
10366
  reversedAt?: string;
10120
10367
  reversalRef?: string;
10121
10368
  reversalTxId?: number;
10369
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10122
10370
  }>;
10123
10371
  }
10124
10372
 
10125
- declare const WEBHOOK_EVENT_NAMES: readonly ["payment.pending", "payment.completed", "payment.failed", "payment.canceled", "payment.reversed", "payment.chargeback", "payment.chargeback_closed", "merchant.verified", "merchant.rejected", "merchant.deactivated", "merchant.reactivated", "merchant.balance.updated", "merchant.created", "merchant.activated", "merchant.updated", "merchant.kyb_required", "merchant.restricted", "merchant.capability.updated", "merchant.wallet_credit", "payout.completed", "payout.failed", "conversion.created", "conversion.completed", "conversion.canceled", "tenant.status_changed", "tenant.api_key.created", "tenant.api_key.rotated", "tenant.api_key.revoked", "tenant.live_status_changed", "notification.test"];
10373
+ declare const WEBHOOK_EVENT_NAMES: readonly ["payment.pending", "payment.completed", "payment.failed", "payment.canceled", "payment.reversed", "payment.chargeback", "payment.chargeback_closed", "merchant.verified", "merchant.rejected", "merchant.deactivated", "merchant.reactivated", "merchant.balance.updated", "merchant.created", "merchant.activated", "merchant.updated", "merchant.kyb_required", "merchant.restricted", "merchant.capability.updated", "merchant.wallet_credit", "payout.completed", "payout.failed", "conversion.created", "conversion.completed", "conversion.canceled", "onward_payout.updated", "tenant.status_changed", "tenant.api_key.created", "tenant.api_key.rotated", "tenant.api_key.revoked", "tenant.live_status_changed", "notification.test"];
10126
10374
  type WebhookEventName = (typeof WEBHOOK_EVENT_NAMES)[number];
10127
10375
  /** `data` of every `payment.*` event. */
10128
10376
  interface PaymentWebhookData {
@@ -10133,7 +10381,12 @@ interface PaymentWebhookData {
10133
10381
  method: 'C2P' | 'VPOS' | 'PAGO_MOVIL' | 'DEBITO_INMEDIATO' | 'COP';
10134
10382
  usdAmount: number;
10135
10383
  vesAmount: number;
10384
+ /** Official BCV rate (Bs per $1) when the payment was created. */
10136
10385
  bcvRate: number;
10386
+ /** Rate the payment was priced at: `bcvRate` for BCV accounts, the market rate for MARKET accounts. */
10387
+ rate?: number;
10388
+ /** Your account's Bolívar rate setting when the payment was created. */
10389
+ rateSource?: 'BCV' | 'MARKET';
10137
10390
  feeUsd?: number;
10138
10391
  feeVes?: number;
10139
10392
  netVes?: number;
@@ -10309,6 +10562,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
10309
10562
  declare class VexPaySignatureVerificationError extends VexPayError {
10310
10563
  }
10311
10564
 
10312
- declare const VERSION = "0.7.0";
10565
+ declare const VERSION = "0.9.0";
10313
10566
 
10314
10567
  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.7.0";
65
+ var VERSION = "0.9.0";
66
66
 
67
67
  // src/core.ts
68
68
  var INITIAL_RETRY_DELAY_MS = 500;
@@ -262,6 +262,7 @@ var ROUTES = {
262
262
  Payments_getPayment: { method: "GET", path: "/v1/payments/{id}" },
263
263
  Payments_getPaymentByRef: { method: "GET", path: "/v1/payments/by-ref/{externalRef}" },
264
264
  Payments_getQuote: { method: "GET", path: "/v1/quote" },
265
+ Payments_listPaymentMethods: { method: "GET", path: "/v1/payment-methods" },
265
266
  Payments_requestC2p: { method: "POST", path: "/v1/payments/c2p/request" },
266
267
  Payments_reversePayment: { method: "POST", path: "/v1/payments/{id}/reverse" },
267
268
  Payments_verifyPagoMovil: { method: "POST", path: "/v1/payments/pago-movil/verify" },
@@ -732,6 +733,10 @@ var Payments = class extends APIResource {
732
733
  operations = new Operations(this.http);
733
734
  dispersals = new Dispersals(this.http);
734
735
  change = new Change(this.http);
736
+ /** Bolívar methods your account can take now (`pago_movil`, `c2p`, `vpos`), with a reason when unavailable. */
737
+ methods(options) {
738
+ return this.call("Payments_listPaymentMethods", {}, options);
739
+ }
735
740
  retrieve(id, options) {
736
741
  return this.call("Payments_getPayment", { path: { id } }, options);
737
742
  }
@@ -772,6 +777,7 @@ var WEBHOOK_EVENT_NAMES = [
772
777
  "conversion.created",
773
778
  "conversion.completed",
774
779
  "conversion.canceled",
780
+ "onward_payout.updated",
775
781
  "tenant.status_changed",
776
782
  "tenant.api_key.created",
777
783
  "tenant.api_key.rotated",