@vexpay/node 0.8.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,14 +1533,28 @@ 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
1551
  /**
1524
- * @description USD amount. Required unless vesAmount is set. When only usdAmount is set, VES is derived at the live BCV rate.
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).
1525
1553
  * @example 25
1526
1554
  */
1527
1555
  usdAmount?: number;
1528
1556
  /**
1529
- * @description VES amount debited at the bank. When set, locks the bolívar charge and derives USD at BCV (it wins over usdAmount). The intent keeps this amount until it is executed.
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.
1530
1558
  * @example 50
1531
1559
  */
1532
1560
  vesAmount?: number;
@@ -1559,6 +1587,49 @@ interface components {
1559
1587
  * @example 10
1560
1588
  */
1561
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;
1562
1633
  };
1563
1634
  C2pIntentResponseDto: {
1564
1635
  /**
@@ -1579,8 +1650,22 @@ interface components {
1579
1650
  usdAmount: number;
1580
1651
  /** @example 912.5 */
1581
1652
  vesAmount: number;
1582
- /** @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
+ */
1583
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";
1584
1669
  /**
1585
1670
  * @description Platform service fee, USD. Clamped 0..usdAmount.
1586
1671
  * @example 0.88
@@ -1633,6 +1718,8 @@ interface components {
1633
1718
  reversalRef?: string;
1634
1719
  /** @example 842950 */
1635
1720
  reversalTxId?: number;
1721
+ /** @description Present when the pay-in was sent with `onwardPayout`. */
1722
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
1636
1723
  /**
1637
1724
  * Format: uuid
1638
1725
  * @description Use this value as intentId when executing the C2P charge.
@@ -1648,12 +1735,12 @@ interface components {
1648
1735
  */
1649
1736
  intentId?: string;
1650
1737
  /**
1651
- * @description USD amount. Required unless vesAmount or intentId is set. When only usdAmount is set, VES is derived at the live BCV rate.
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).
1652
1739
  * @example 25
1653
1740
  */
1654
1741
  usdAmount?: number;
1655
1742
  /**
1656
- * @description VES amount debited at the bank. When set, locks the bolívar charge and derives USD at BCV (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).
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).
1657
1744
  * @example 50
1658
1745
  */
1659
1746
  vesAmount?: number;
@@ -1691,6 +1778,8 @@ interface components {
1691
1778
  * @example 10
1692
1779
  */
1693
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"];
1694
1783
  };
1695
1784
  PaymentReceiptDto: {
1696
1785
  /**
@@ -1711,8 +1800,22 @@ interface components {
1711
1800
  usdAmount: number;
1712
1801
  /** @example 912.5 */
1713
1802
  vesAmount: number;
1714
- /** @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
+ */
1715
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";
1716
1819
  /**
1717
1820
  * @description Platform service fee, USD. Clamped 0..usdAmount.
1718
1821
  * @example 0.88
@@ -1765,15 +1868,17 @@ interface components {
1765
1868
  reversalRef?: string;
1766
1869
  /** @example 842950 */
1767
1870
  reversalTxId?: number;
1871
+ /** @description Present when the pay-in was sent with `onwardPayout`. */
1872
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
1768
1873
  };
1769
1874
  VposPaymentDto: {
1770
1875
  /**
1771
- * @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).
1772
1877
  * @example 25
1773
1878
  */
1774
1879
  usdAmount?: number;
1775
1880
  /**
1776
- * @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).
1777
1882
  * @example 50
1778
1883
  */
1779
1884
  vesAmount?: number;
@@ -1814,6 +1919,11 @@ interface components {
1814
1919
  * @example order-1042
1815
1920
  */
1816
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;
1817
1927
  /** Format: uuid */
1818
1928
  merchantId?: string;
1819
1929
  /**
@@ -1911,6 +2021,8 @@ interface components {
1911
2021
  * @example 04149333844
1912
2022
  */
1913
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"];
1914
2026
  };
1915
2027
  PayoutMethodResponseDto: {
1916
2028
  /** Format: uuid */
@@ -5878,7 +5990,7 @@ interface operations {
5878
5990
  };
5879
5991
  requestBody?: never;
5880
5992
  responses: {
5881
- /** @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. */
5882
5994
  200: {
5883
5995
  headers: {
5884
5996
  [name: string]: unknown;
@@ -8807,6 +8919,15 @@ interface operations {
8807
8919
  "application/json": components["schemas"]["ApiErrorDto"];
8808
8920
  };
8809
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
+ };
8810
8931
  /** @description Client error. */
8811
8932
  "4XX": {
8812
8933
  headers: {
@@ -8907,6 +9028,8 @@ declare class Quotes extends APIResource {
8907
9028
  retrieve(params: QueryParams<'Payments_getQuote'>, options?: RequestOptions): Promise<{
8908
9029
  usdAmount: number;
8909
9030
  bcvRate: number;
9031
+ rate?: number;
9032
+ rateSource?: "BCV" | "MARKET";
8910
9033
  vesAmount: number;
8911
9034
  medianRate: number;
8912
9035
  medianVesAmount: number;
@@ -9138,7 +9261,7 @@ declare class WebhookEndpoints extends APIResource {
9138
9261
  id: string;
9139
9262
  tenantId: string;
9140
9263
  url: string;
9141
- 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")[];
9142
9265
  isActive: boolean;
9143
9266
  createdAt: string;
9144
9267
  secret?: string;
@@ -9147,7 +9270,7 @@ declare class WebhookEndpoints extends APIResource {
9147
9270
  id: string;
9148
9271
  tenantId: string;
9149
9272
  url: string;
9150
- 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")[];
9151
9274
  isActive: boolean;
9152
9275
  createdAt: string;
9153
9276
  secret?: string;
@@ -9156,7 +9279,7 @@ declare class WebhookEndpoints extends APIResource {
9156
9279
  id: string;
9157
9280
  tenantId: string;
9158
9281
  url: string;
9159
- 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")[];
9160
9283
  isActive: boolean;
9161
9284
  createdAt: string;
9162
9285
  secret?: string;
@@ -9893,6 +10016,8 @@ declare class C2p extends APIResource {
9893
10016
  usdAmount: number;
9894
10017
  vesAmount: number;
9895
10018
  bcvRate: number;
10019
+ rate?: number;
10020
+ rateSource?: "BCV" | "MARKET";
9896
10021
  feeUsd?: number;
9897
10022
  feeVes?: number;
9898
10023
  netVes?: number;
@@ -9913,6 +10038,7 @@ declare class C2p extends APIResource {
9913
10038
  reversedAt?: string;
9914
10039
  reversalRef?: string;
9915
10040
  reversalTxId?: number;
10041
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9916
10042
  intentId: string;
9917
10043
  otpRequested: boolean;
9918
10044
  }>;
@@ -9925,6 +10051,8 @@ declare class C2p extends APIResource {
9925
10051
  usdAmount: number;
9926
10052
  vesAmount: number;
9927
10053
  bcvRate: number;
10054
+ rate?: number;
10055
+ rateSource?: "BCV" | "MARKET";
9928
10056
  feeUsd?: number;
9929
10057
  feeVes?: number;
9930
10058
  netVes?: number;
@@ -9945,6 +10073,7 @@ declare class C2p extends APIResource {
9945
10073
  reversedAt?: string;
9946
10074
  reversalRef?: string;
9947
10075
  reversalTxId?: number;
10076
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9948
10077
  }>;
9949
10078
  }
9950
10079
  /** Card payments (VPOS). Prefer the hosted/embedded checkout so card data never touches your servers. */
@@ -9957,6 +10086,8 @@ declare class Vpos extends APIResource {
9957
10086
  usdAmount: number;
9958
10087
  vesAmount: number;
9959
10088
  bcvRate: number;
10089
+ rate?: number;
10090
+ rateSource?: "BCV" | "MARKET";
9960
10091
  feeUsd?: number;
9961
10092
  feeVes?: number;
9962
10093
  netVes?: number;
@@ -9977,6 +10108,7 @@ declare class Vpos extends APIResource {
9977
10108
  reversedAt?: string;
9978
10109
  reversalRef?: string;
9979
10110
  reversalTxId?: number;
10111
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
9980
10112
  }>;
9981
10113
  }
9982
10114
  /** Confirm a Pago Móvil the customer already sent to you. */
@@ -10003,6 +10135,8 @@ declare class PagoMovil extends APIResource {
10003
10135
  usdAmount: number;
10004
10136
  vesAmount: number;
10005
10137
  bcvRate: number;
10138
+ rate?: number;
10139
+ rateSource?: "BCV" | "MARKET";
10006
10140
  feeUsd?: number;
10007
10141
  feeVes?: number;
10008
10142
  netVes?: number;
@@ -10023,6 +10157,7 @@ declare class PagoMovil extends APIResource {
10023
10157
  reversedAt?: string;
10024
10158
  reversalRef?: string;
10025
10159
  reversalTxId?: number;
10160
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10026
10161
  }>;
10027
10162
  }
10028
10163
  /** Débito inmediato (advanced payments, enabled per account). */
@@ -10143,6 +10278,8 @@ declare class Payments extends APIResource {
10143
10278
  usdAmount: number;
10144
10279
  vesAmount: number;
10145
10280
  bcvRate: number;
10281
+ rate?: number;
10282
+ rateSource?: "BCV" | "MARKET";
10146
10283
  feeUsd?: number;
10147
10284
  feeVes?: number;
10148
10285
  netVes?: number;
@@ -10163,6 +10300,7 @@ declare class Payments extends APIResource {
10163
10300
  reversedAt?: string;
10164
10301
  reversalRef?: string;
10165
10302
  reversalTxId?: number;
10303
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10166
10304
  }>;
10167
10305
  /** Look up a payment by the `externalRef` you sent. */
10168
10306
  retrieveByRef(externalRef: string, options?: RequestOptions): Promise<{
@@ -10173,6 +10311,8 @@ declare class Payments extends APIResource {
10173
10311
  usdAmount: number;
10174
10312
  vesAmount: number;
10175
10313
  bcvRate: number;
10314
+ rate?: number;
10315
+ rateSource?: "BCV" | "MARKET";
10176
10316
  feeUsd?: number;
10177
10317
  feeVes?: number;
10178
10318
  netVes?: number;
@@ -10193,6 +10333,7 @@ declare class Payments extends APIResource {
10193
10333
  reversedAt?: string;
10194
10334
  reversalRef?: string;
10195
10335
  reversalTxId?: number;
10336
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10196
10337
  }>;
10197
10338
  /** Reverse a completed C2P payment. */
10198
10339
  reverse(id: string, options?: RequestOptions): Promise<{
@@ -10203,6 +10344,8 @@ declare class Payments extends APIResource {
10203
10344
  usdAmount: number;
10204
10345
  vesAmount: number;
10205
10346
  bcvRate: number;
10347
+ rate?: number;
10348
+ rateSource?: "BCV" | "MARKET";
10206
10349
  feeUsd?: number;
10207
10350
  feeVes?: number;
10208
10351
  netVes?: number;
@@ -10223,10 +10366,11 @@ declare class Payments extends APIResource {
10223
10366
  reversedAt?: string;
10224
10367
  reversalRef?: string;
10225
10368
  reversalTxId?: number;
10369
+ onwardPayout?: components["schemas"]["OnwardPayoutStatusDto"];
10226
10370
  }>;
10227
10371
  }
10228
10372
 
10229
- 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"];
10230
10374
  type WebhookEventName = (typeof WEBHOOK_EVENT_NAMES)[number];
10231
10375
  /** `data` of every `payment.*` event. */
10232
10376
  interface PaymentWebhookData {
@@ -10237,7 +10381,12 @@ interface PaymentWebhookData {
10237
10381
  method: 'C2P' | 'VPOS' | 'PAGO_MOVIL' | 'DEBITO_INMEDIATO' | 'COP';
10238
10382
  usdAmount: number;
10239
10383
  vesAmount: number;
10384
+ /** Official BCV rate (Bs per $1) when the payment was created. */
10240
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';
10241
10390
  feeUsd?: number;
10242
10391
  feeVes?: number;
10243
10392
  netVes?: number;
@@ -10413,6 +10562,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
10413
10562
  declare class VexPaySignatureVerificationError extends VexPayError {
10414
10563
  }
10415
10564
 
10416
- declare const VERSION = "0.8.0";
10565
+ declare const VERSION = "0.9.0";
10417
10566
 
10418
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.8.0";
65
+ var VERSION = "0.9.0";
66
66
 
67
67
  // src/core.ts
68
68
  var INITIAL_RETRY_DELAY_MS = 500;
@@ -777,6 +777,7 @@ var WEBHOOK_EVENT_NAMES = [
777
777
  "conversion.created",
778
778
  "conversion.completed",
779
779
  "conversion.canceled",
780
+ "onward_payout.updated",
780
781
  "tenant.status_changed",
781
782
  "tenant.api_key.created",
782
783
  "tenant.api_key.rotated",