@vexpay/node 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/index.cjs +39 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +573 -34
- package/dist/index.d.ts +573 -34
- package/dist/index.js +39 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,24 @@ interface components {
|
|
|
50
50
|
*/
|
|
51
51
|
error?: string;
|
|
52
52
|
};
|
|
53
|
+
BsSettlementStatusDto: {
|
|
54
|
+
/**
|
|
55
|
+
* @description True when your available Bs is settled automatically every 15 minutes.
|
|
56
|
+
* @example true
|
|
57
|
+
*/
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @description `active` = settling; `no_payout_account` / `payout_account_unverified` = add and verify a payout account; `payout_account_cooling` = destination changed recently; `paused` = paused by VEXPay; `opted_out` = off for your account; `disbursements` = your balance funds disbursements; `test_mode` = never settled in test mode.
|
|
61
|
+
* @example active
|
|
62
|
+
* @enum {string}
|
|
63
|
+
*/
|
|
64
|
+
status: "active" | "no_payout_account" | "payout_account_unverified" | "payout_account_cooling" | "paused" | "opted_out" | "disbursements" | "test_mode";
|
|
65
|
+
/**
|
|
66
|
+
* @description Smallest available Bs amount that is settled.
|
|
67
|
+
* @example 100.00
|
|
68
|
+
*/
|
|
69
|
+
minimumVes: string;
|
|
70
|
+
};
|
|
53
71
|
PlatformBalanceDto: {
|
|
54
72
|
/** Format: uuid */
|
|
55
73
|
tenantId: string;
|
|
@@ -76,8 +94,8 @@ interface components {
|
|
|
76
94
|
/** @example 8650.00 */
|
|
77
95
|
ledgerNetVes: string;
|
|
78
96
|
/**
|
|
79
|
-
* @description VES under
|
|
80
|
-
* @example
|
|
97
|
+
* @description VES under a balance hold set by VEXPay (none by default, see `balanceHoldHours`): such credits count in `ledgerNetVes` but cannot be paid out until their hold ends. Conversions and seller transfers may still use them.
|
|
98
|
+
* @example 0.00
|
|
81
99
|
*/
|
|
82
100
|
heldVes?: string;
|
|
83
101
|
/**
|
|
@@ -87,10 +105,17 @@ interface components {
|
|
|
87
105
|
*/
|
|
88
106
|
nextReleaseAt?: string | null;
|
|
89
107
|
/**
|
|
90
|
-
* @description What payouts can spend: ledgerNetVes − reserveVes − heldVes (seller obligations already deducted via SELLER_TRANSFER).
|
|
108
|
+
* @description What payouts and automatic settlement can spend: ledgerNetVes − reserveVes − heldVes − unconfirmedVes (seller obligations already deducted via SELLER_TRANSFER).
|
|
91
109
|
* @example 4150.00
|
|
92
110
|
*/
|
|
93
111
|
availableVes: string;
|
|
112
|
+
/**
|
|
113
|
+
* @description Bs from payments the bank has not confirmed yet: they count in `ledgerNetVes` but cannot be paid out or settled until the bank confirms them. Conversions and seller transfers may still use them.
|
|
114
|
+
* @example 4500.00
|
|
115
|
+
*/
|
|
116
|
+
unconfirmedVes?: string;
|
|
117
|
+
/** @description Automatic Bs settlement to your verified payout account. */
|
|
118
|
+
settlement?: components["schemas"]["BsSettlementStatusDto"];
|
|
94
119
|
/** @example 8650.00 */
|
|
95
120
|
platformAvailableVes: string;
|
|
96
121
|
/**
|
|
@@ -107,8 +132,8 @@ interface components {
|
|
|
107
132
|
/** @example 0.00 */
|
|
108
133
|
feeFixedUsd: string;
|
|
109
134
|
/**
|
|
110
|
-
* @description Hours each incoming credit is held before payouts can spend it (0 = no hold). Set by VEXPay.
|
|
111
|
-
* @example
|
|
135
|
+
* @description Hours each incoming credit is held before payouts can spend it (0 = no hold, the default). Set by VEXPay.
|
|
136
|
+
* @example 0
|
|
112
137
|
*/
|
|
113
138
|
balanceHoldHours?: number;
|
|
114
139
|
};
|
|
@@ -176,7 +201,7 @@ interface components {
|
|
|
176
201
|
* "payment.failed"
|
|
177
202
|
* ]
|
|
178
203
|
*/
|
|
179
|
-
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
204
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
180
205
|
};
|
|
181
206
|
WebhookEndpointDto: {
|
|
182
207
|
/** Format: uuid */
|
|
@@ -185,7 +210,7 @@ interface components {
|
|
|
185
210
|
tenantId: string;
|
|
186
211
|
/** Format: uri */
|
|
187
212
|
url: string;
|
|
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
213
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
189
214
|
isActive: boolean;
|
|
190
215
|
/** Format: date-time */
|
|
191
216
|
createdAt: string;
|
|
@@ -206,7 +231,7 @@ interface components {
|
|
|
206
231
|
* "payout.completed"
|
|
207
232
|
* ]
|
|
208
233
|
*/
|
|
209
|
-
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
234
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
210
235
|
/** @example true */
|
|
211
236
|
isActive?: boolean;
|
|
212
237
|
};
|
|
@@ -221,15 +246,15 @@ interface components {
|
|
|
221
246
|
*/
|
|
222
247
|
payoutId: string;
|
|
223
248
|
/**
|
|
224
|
-
* @description `pending` means the credit is still reconciling (AC00); subscribe to payout webhooks or poll GET /v1/payouts/:id. `awaiting_approval` means the funds are reserved but the payout is held for VEX Pay review (see `holdReason`) and has not been sent; it later becomes `pending`/`completed` when approved or `failed` (`rejected_new_account_limit`, funds returned) when rejected.
|
|
249
|
+
* @description `pending` means the credit is still reconciling (AC00); subscribe to payout webhooks or poll GET /v1/payouts/:id. `awaiting_approval` means the funds are reserved but the payout is held for VEX Pay review (see `holdReason`) and has not been sent; it later becomes `pending`/`completed` when approved or `failed` (`rejected_new_account_limit` or `rejected_bank_unfunded`, funds returned) when rejected.
|
|
225
250
|
* @enum {string}
|
|
226
251
|
*/
|
|
227
252
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
228
253
|
/**
|
|
229
|
-
* @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).
|
|
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.
|
|
230
255
|
* @enum {string}
|
|
231
256
|
*/
|
|
232
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
257
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
233
258
|
/** @description Bank reference when available. */
|
|
234
259
|
reference?: string | null;
|
|
235
260
|
/** @description Machine-readable failure when status is failed (e.g. merchant_inactive, payout_method_not_verified). */
|
|
@@ -299,15 +324,15 @@ interface components {
|
|
|
299
324
|
*/
|
|
300
325
|
payoutId: string;
|
|
301
326
|
/**
|
|
302
|
-
* @description `pending` means the credit is still reconciling (AC00); subscribe to payout webhooks or poll GET /v1/payouts/:id. `awaiting_approval` means the funds are reserved but the payout is held for VEX Pay review (see `holdReason`) and has not been sent; it later becomes `pending`/`completed` when approved or `failed` (`rejected_new_account_limit`, funds returned) when rejected.
|
|
327
|
+
* @description `pending` means the credit is still reconciling (AC00); subscribe to payout webhooks or poll GET /v1/payouts/:id. `awaiting_approval` means the funds are reserved but the payout is held for VEX Pay review (see `holdReason`) and has not been sent; it later becomes `pending`/`completed` when approved or `failed` (`rejected_new_account_limit` or `rejected_bank_unfunded`, funds returned) when rejected.
|
|
303
328
|
* @enum {string}
|
|
304
329
|
*/
|
|
305
330
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
306
331
|
/**
|
|
307
|
-
* @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).
|
|
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.
|
|
308
333
|
* @enum {string}
|
|
309
334
|
*/
|
|
310
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
335
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
311
336
|
/** @description Bank reference when available. */
|
|
312
337
|
reference?: string | null;
|
|
313
338
|
/** @description Machine-readable failure when status is failed (e.g. merchant_inactive, payout_method_not_verified). */
|
|
@@ -1002,13 +1027,13 @@ interface components {
|
|
|
1002
1027
|
*/
|
|
1003
1028
|
available: string;
|
|
1004
1029
|
/**
|
|
1005
|
-
* @description
|
|
1030
|
+
* @description Credited but not payable yet, in `currency`: under a balance hold until it ends, or bought with VES still awaiting bank confirmation until the bank confirms it.
|
|
1006
1031
|
* @example 0.00
|
|
1007
1032
|
*/
|
|
1008
1033
|
held?: string;
|
|
1009
1034
|
/**
|
|
1010
1035
|
* Format: date-time
|
|
1011
|
-
* @description When the soonest held amount becomes available; null when nothing is held.
|
|
1036
|
+
* @description When the soonest held amount becomes available; null when nothing is held or only amounts awaiting bank confirmation (no set time) are held.
|
|
1012
1037
|
*/
|
|
1013
1038
|
nextReleaseAt?: string | null;
|
|
1014
1039
|
/**
|
|
@@ -1831,7 +1856,7 @@ interface components {
|
|
|
1831
1856
|
};
|
|
1832
1857
|
OnwardPayoutStatusDto: {
|
|
1833
1858
|
/**
|
|
1834
|
-
* @description `waiting_release`: converted, waiting
|
|
1859
|
+
* @description `waiting_release`: converted, waiting before sending until the balance hold ends (see `sendAfter`) or, with `reason: awaiting_bank_confirmation`, until the bank confirms the paid VES.
|
|
1835
1860
|
* @example completed
|
|
1836
1861
|
* @enum {string}
|
|
1837
1862
|
*/
|
|
@@ -1864,13 +1889,13 @@ interface components {
|
|
|
1864
1889
|
/** @description On-chain hash once the payout completed. */
|
|
1865
1890
|
txHash?: string;
|
|
1866
1891
|
/**
|
|
1867
|
-
* @description Why it is held, failed or canceled.
|
|
1892
|
+
* @description Why it is waiting, held, failed or canceled (`awaiting_bank_confirmation` while the bank has not confirmed the paid VES).
|
|
1868
1893
|
* @example below_payout_minimum
|
|
1869
1894
|
*/
|
|
1870
1895
|
reason?: string;
|
|
1871
1896
|
/**
|
|
1872
1897
|
* Format: date-time
|
|
1873
|
-
* @description `waiting_release` only: when the converted USDT leaves the balance hold and the payout is sent.
|
|
1898
|
+
* @description `waiting_release` only: when the converted USDT leaves the balance hold and the payout is sent. Omitted while waiting for bank confirmation.
|
|
1874
1899
|
*/
|
|
1875
1900
|
sendAfter?: string;
|
|
1876
1901
|
/** Format: date-time */
|
|
@@ -2729,7 +2754,7 @@ interface components {
|
|
|
2729
2754
|
* @example cs-9f2a4b7c1d3e_secret_k8Jc…
|
|
2730
2755
|
*/
|
|
2731
2756
|
clientSecret?: string;
|
|
2732
|
-
/** @example https://pay.
|
|
2757
|
+
/** @example https://pay.vexpay.app/pay/cs-9f2a4b7c1d3e */
|
|
2733
2758
|
url: string;
|
|
2734
2759
|
/** @example 25.00 */
|
|
2735
2760
|
amountUsd: string;
|
|
@@ -2975,7 +3000,10 @@ interface components {
|
|
|
2975
3000
|
metadata?: {
|
|
2976
3001
|
[key: string]: string;
|
|
2977
3002
|
} | null;
|
|
2978
|
-
/**
|
|
3003
|
+
/**
|
|
3004
|
+
* @description Attach the customer to a test clock (test mode only, at most 3 customers per clock). Set on create only.
|
|
3005
|
+
* @example clock_3fd84b2d9ad14f74a2d90f2f56984db5
|
|
3006
|
+
*/
|
|
2979
3007
|
testClock?: string;
|
|
2980
3008
|
};
|
|
2981
3009
|
CustomerResponseDto: {
|
|
@@ -2993,6 +3021,7 @@ interface components {
|
|
|
2993
3021
|
metadata: {
|
|
2994
3022
|
[key: string]: string;
|
|
2995
3023
|
};
|
|
3024
|
+
/** @description Test clock id (`clock_…`) the customer runs on, or null. */
|
|
2996
3025
|
testClock: string | null;
|
|
2997
3026
|
createdAt: string;
|
|
2998
3027
|
livemode: boolean;
|
|
@@ -3025,7 +3054,10 @@ interface components {
|
|
|
3025
3054
|
metadata?: {
|
|
3026
3055
|
[key: string]: string;
|
|
3027
3056
|
} | null;
|
|
3028
|
-
/**
|
|
3057
|
+
/**
|
|
3058
|
+
* @description Attach the customer to a test clock (test mode only, at most 3 customers per clock). Set on create only.
|
|
3059
|
+
* @example clock_3fd84b2d9ad14f74a2d90f2f56984db5
|
|
3060
|
+
*/
|
|
3029
3061
|
testClock?: string;
|
|
3030
3062
|
};
|
|
3031
3063
|
DeletedObjectResponseDto: {
|
|
@@ -3271,6 +3303,45 @@ interface components {
|
|
|
3271
3303
|
items: components["schemas"]["PaymentMethodResponseDto"][];
|
|
3272
3304
|
nextCursor: string | null;
|
|
3273
3305
|
};
|
|
3306
|
+
CreateTestClockDto: {
|
|
3307
|
+
/**
|
|
3308
|
+
* @description ISO 8601 time the clock starts at.
|
|
3309
|
+
* @example 2026-01-01T00:00:00.000Z
|
|
3310
|
+
*/
|
|
3311
|
+
frozenTime: string;
|
|
3312
|
+
/** @example Dunning test */
|
|
3313
|
+
name?: string | null;
|
|
3314
|
+
};
|
|
3315
|
+
TestClockResponseDto: {
|
|
3316
|
+
/** @example clock_3fd84b2d9ad14f74a2d90f2f56984db5 */
|
|
3317
|
+
id: string;
|
|
3318
|
+
/** @example test_clock */
|
|
3319
|
+
object: string;
|
|
3320
|
+
name: string | null;
|
|
3321
|
+
/** @description The clock's current time. */
|
|
3322
|
+
frozenTime: string;
|
|
3323
|
+
/**
|
|
3324
|
+
* @description advancing while events between the old and new time are being run.
|
|
3325
|
+
* @enum {string}
|
|
3326
|
+
*/
|
|
3327
|
+
status: "ready" | "advancing" | "internal_failure";
|
|
3328
|
+
/** @description While advancing: the time the clock is moving to. */
|
|
3329
|
+
targetTime: string | null;
|
|
3330
|
+
createdAt: string;
|
|
3331
|
+
/** @example false */
|
|
3332
|
+
livemode: boolean;
|
|
3333
|
+
};
|
|
3334
|
+
TestClockListResponseDto: {
|
|
3335
|
+
items: components["schemas"]["TestClockResponseDto"][];
|
|
3336
|
+
nextCursor: string | null;
|
|
3337
|
+
};
|
|
3338
|
+
AdvanceTestClockDto: {
|
|
3339
|
+
/**
|
|
3340
|
+
* @description ISO 8601 time to move to: later than the current one, and at most two intervals of the shortest subscription on the clock ahead.
|
|
3341
|
+
* @example 2026-01-05T00:00:00.000Z
|
|
3342
|
+
*/
|
|
3343
|
+
frozenTime: string;
|
|
3344
|
+
};
|
|
3274
3345
|
};
|
|
3275
3346
|
responses: never;
|
|
3276
3347
|
parameters: never;
|
|
@@ -3813,6 +3884,15 @@ interface operations {
|
|
|
3813
3884
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
3814
3885
|
};
|
|
3815
3886
|
};
|
|
3887
|
+
/** @description `insufficient_balance` (body: `availableVes`, `requestedVes`, `heldVes`, `nextReleaseAt`, `unconfirmedVes`, `maxPayoutVes`) or `insufficient_merchant_balance` (body: `availableVes`, `requestedVes`, `maxPayoutVes`) with `fromMerchantBalance`, `fee_exceeds_amount`, and other business rules. */
|
|
3888
|
+
422: {
|
|
3889
|
+
headers: {
|
|
3890
|
+
[name: string]: unknown;
|
|
3891
|
+
};
|
|
3892
|
+
content: {
|
|
3893
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
3894
|
+
};
|
|
3895
|
+
};
|
|
3816
3896
|
/** @description Client error. */
|
|
3817
3897
|
"4XX": {
|
|
3818
3898
|
headers: {
|
|
@@ -3903,6 +3983,15 @@ interface operations {
|
|
|
3903
3983
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
3904
3984
|
};
|
|
3905
3985
|
};
|
|
3986
|
+
/** @description `insufficient_balance` (body: `availableVes`, `requestedVes`, `heldVes`, `nextReleaseAt`, `unconfirmedVes`, `maxPayoutVes`) or `insufficient_merchant_balance` (body: `availableVes`, `requestedVes`, `maxPayoutVes`) with `fromMerchantBalance`, `fee_exceeds_amount`, and other business rules. */
|
|
3987
|
+
422: {
|
|
3988
|
+
headers: {
|
|
3989
|
+
[name: string]: unknown;
|
|
3990
|
+
};
|
|
3991
|
+
content: {
|
|
3992
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
3993
|
+
};
|
|
3994
|
+
};
|
|
3906
3995
|
/** @description Client error. */
|
|
3907
3996
|
"4XX": {
|
|
3908
3997
|
headers: {
|
|
@@ -12238,6 +12327,391 @@ interface operations {
|
|
|
12238
12327
|
};
|
|
12239
12328
|
};
|
|
12240
12329
|
};
|
|
12330
|
+
TestClocks_list: {
|
|
12331
|
+
parameters: {
|
|
12332
|
+
query?: {
|
|
12333
|
+
cursor?: string;
|
|
12334
|
+
limit?: number;
|
|
12335
|
+
};
|
|
12336
|
+
header?: never;
|
|
12337
|
+
path?: never;
|
|
12338
|
+
cookie?: never;
|
|
12339
|
+
};
|
|
12340
|
+
requestBody?: never;
|
|
12341
|
+
responses: {
|
|
12342
|
+
200: {
|
|
12343
|
+
headers: {
|
|
12344
|
+
[name: string]: unknown;
|
|
12345
|
+
};
|
|
12346
|
+
content: {
|
|
12347
|
+
"application/json": components["schemas"]["TestClockListResponseDto"];
|
|
12348
|
+
};
|
|
12349
|
+
};
|
|
12350
|
+
/** @description Validation failure, or test_mode_only on a live-mode tenant. */
|
|
12351
|
+
400: {
|
|
12352
|
+
headers: {
|
|
12353
|
+
[name: string]: unknown;
|
|
12354
|
+
};
|
|
12355
|
+
content: {
|
|
12356
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12357
|
+
};
|
|
12358
|
+
};
|
|
12359
|
+
/** @description Missing or invalid tenant API key. */
|
|
12360
|
+
401: {
|
|
12361
|
+
headers: {
|
|
12362
|
+
[name: string]: unknown;
|
|
12363
|
+
};
|
|
12364
|
+
content: {
|
|
12365
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12366
|
+
};
|
|
12367
|
+
};
|
|
12368
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
12369
|
+
403: {
|
|
12370
|
+
headers: {
|
|
12371
|
+
[name: string]: unknown;
|
|
12372
|
+
};
|
|
12373
|
+
content: {
|
|
12374
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12375
|
+
};
|
|
12376
|
+
};
|
|
12377
|
+
/** @description Client error. */
|
|
12378
|
+
"4XX": {
|
|
12379
|
+
headers: {
|
|
12380
|
+
[name: string]: unknown;
|
|
12381
|
+
};
|
|
12382
|
+
content: {
|
|
12383
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12384
|
+
};
|
|
12385
|
+
};
|
|
12386
|
+
/** @description Server or upstream bank error. */
|
|
12387
|
+
"5XX": {
|
|
12388
|
+
headers: {
|
|
12389
|
+
[name: string]: unknown;
|
|
12390
|
+
};
|
|
12391
|
+
content: {
|
|
12392
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12393
|
+
};
|
|
12394
|
+
};
|
|
12395
|
+
};
|
|
12396
|
+
};
|
|
12397
|
+
TestClocks_create: {
|
|
12398
|
+
parameters: {
|
|
12399
|
+
query?: never;
|
|
12400
|
+
header?: {
|
|
12401
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
12402
|
+
"Idempotency-Key"?: string;
|
|
12403
|
+
};
|
|
12404
|
+
path?: never;
|
|
12405
|
+
cookie?: never;
|
|
12406
|
+
};
|
|
12407
|
+
requestBody: {
|
|
12408
|
+
content: {
|
|
12409
|
+
"application/json": components["schemas"]["CreateTestClockDto"];
|
|
12410
|
+
};
|
|
12411
|
+
};
|
|
12412
|
+
responses: {
|
|
12413
|
+
201: {
|
|
12414
|
+
headers: {
|
|
12415
|
+
[name: string]: unknown;
|
|
12416
|
+
};
|
|
12417
|
+
content: {
|
|
12418
|
+
"application/json": components["schemas"]["TestClockResponseDto"];
|
|
12419
|
+
};
|
|
12420
|
+
};
|
|
12421
|
+
/** @description Validation failure, or test_mode_only on a live-mode tenant. */
|
|
12422
|
+
400: {
|
|
12423
|
+
headers: {
|
|
12424
|
+
[name: string]: unknown;
|
|
12425
|
+
};
|
|
12426
|
+
content: {
|
|
12427
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12428
|
+
};
|
|
12429
|
+
};
|
|
12430
|
+
/** @description Missing or invalid tenant API key. */
|
|
12431
|
+
401: {
|
|
12432
|
+
headers: {
|
|
12433
|
+
[name: string]: unknown;
|
|
12434
|
+
};
|
|
12435
|
+
content: {
|
|
12436
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12437
|
+
};
|
|
12438
|
+
};
|
|
12439
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
12440
|
+
403: {
|
|
12441
|
+
headers: {
|
|
12442
|
+
[name: string]: unknown;
|
|
12443
|
+
};
|
|
12444
|
+
content: {
|
|
12445
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12446
|
+
};
|
|
12447
|
+
};
|
|
12448
|
+
/** @description Client error. */
|
|
12449
|
+
"4XX": {
|
|
12450
|
+
headers: {
|
|
12451
|
+
[name: string]: unknown;
|
|
12452
|
+
};
|
|
12453
|
+
content: {
|
|
12454
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12455
|
+
};
|
|
12456
|
+
};
|
|
12457
|
+
/** @description Server or upstream bank error. */
|
|
12458
|
+
"5XX": {
|
|
12459
|
+
headers: {
|
|
12460
|
+
[name: string]: unknown;
|
|
12461
|
+
};
|
|
12462
|
+
content: {
|
|
12463
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12464
|
+
};
|
|
12465
|
+
};
|
|
12466
|
+
};
|
|
12467
|
+
};
|
|
12468
|
+
TestClocks_retrieve: {
|
|
12469
|
+
parameters: {
|
|
12470
|
+
query?: never;
|
|
12471
|
+
header?: never;
|
|
12472
|
+
path: {
|
|
12473
|
+
id: string;
|
|
12474
|
+
};
|
|
12475
|
+
cookie?: never;
|
|
12476
|
+
};
|
|
12477
|
+
requestBody?: never;
|
|
12478
|
+
responses: {
|
|
12479
|
+
200: {
|
|
12480
|
+
headers: {
|
|
12481
|
+
[name: string]: unknown;
|
|
12482
|
+
};
|
|
12483
|
+
content: {
|
|
12484
|
+
"application/json": components["schemas"]["TestClockResponseDto"];
|
|
12485
|
+
};
|
|
12486
|
+
};
|
|
12487
|
+
/** @description Validation failure, or test_mode_only on a live-mode tenant. */
|
|
12488
|
+
400: {
|
|
12489
|
+
headers: {
|
|
12490
|
+
[name: string]: unknown;
|
|
12491
|
+
};
|
|
12492
|
+
content: {
|
|
12493
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12494
|
+
};
|
|
12495
|
+
};
|
|
12496
|
+
/** @description Missing or invalid tenant API key. */
|
|
12497
|
+
401: {
|
|
12498
|
+
headers: {
|
|
12499
|
+
[name: string]: unknown;
|
|
12500
|
+
};
|
|
12501
|
+
content: {
|
|
12502
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12503
|
+
};
|
|
12504
|
+
};
|
|
12505
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
12506
|
+
403: {
|
|
12507
|
+
headers: {
|
|
12508
|
+
[name: string]: unknown;
|
|
12509
|
+
};
|
|
12510
|
+
content: {
|
|
12511
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12512
|
+
};
|
|
12513
|
+
};
|
|
12514
|
+
404: {
|
|
12515
|
+
headers: {
|
|
12516
|
+
[name: string]: unknown;
|
|
12517
|
+
};
|
|
12518
|
+
content: {
|
|
12519
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12520
|
+
};
|
|
12521
|
+
};
|
|
12522
|
+
/** @description Client error. */
|
|
12523
|
+
"4XX": {
|
|
12524
|
+
headers: {
|
|
12525
|
+
[name: string]: unknown;
|
|
12526
|
+
};
|
|
12527
|
+
content: {
|
|
12528
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12529
|
+
};
|
|
12530
|
+
};
|
|
12531
|
+
/** @description Server or upstream bank error. */
|
|
12532
|
+
"5XX": {
|
|
12533
|
+
headers: {
|
|
12534
|
+
[name: string]: unknown;
|
|
12535
|
+
};
|
|
12536
|
+
content: {
|
|
12537
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12538
|
+
};
|
|
12539
|
+
};
|
|
12540
|
+
};
|
|
12541
|
+
};
|
|
12542
|
+
TestClocks_remove: {
|
|
12543
|
+
parameters: {
|
|
12544
|
+
query?: never;
|
|
12545
|
+
header?: never;
|
|
12546
|
+
path: {
|
|
12547
|
+
id: string;
|
|
12548
|
+
};
|
|
12549
|
+
cookie?: never;
|
|
12550
|
+
};
|
|
12551
|
+
requestBody?: never;
|
|
12552
|
+
responses: {
|
|
12553
|
+
200: {
|
|
12554
|
+
headers: {
|
|
12555
|
+
[name: string]: unknown;
|
|
12556
|
+
};
|
|
12557
|
+
content: {
|
|
12558
|
+
"application/json": components["schemas"]["DeletedObjectResponseDto"];
|
|
12559
|
+
};
|
|
12560
|
+
};
|
|
12561
|
+
/** @description Validation failure, or test_mode_only on a live-mode tenant. */
|
|
12562
|
+
400: {
|
|
12563
|
+
headers: {
|
|
12564
|
+
[name: string]: unknown;
|
|
12565
|
+
};
|
|
12566
|
+
content: {
|
|
12567
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12568
|
+
};
|
|
12569
|
+
};
|
|
12570
|
+
/** @description Missing or invalid tenant API key. */
|
|
12571
|
+
401: {
|
|
12572
|
+
headers: {
|
|
12573
|
+
[name: string]: unknown;
|
|
12574
|
+
};
|
|
12575
|
+
content: {
|
|
12576
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12577
|
+
};
|
|
12578
|
+
};
|
|
12579
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
12580
|
+
403: {
|
|
12581
|
+
headers: {
|
|
12582
|
+
[name: string]: unknown;
|
|
12583
|
+
};
|
|
12584
|
+
content: {
|
|
12585
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12586
|
+
};
|
|
12587
|
+
};
|
|
12588
|
+
404: {
|
|
12589
|
+
headers: {
|
|
12590
|
+
[name: string]: unknown;
|
|
12591
|
+
};
|
|
12592
|
+
content: {
|
|
12593
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12594
|
+
};
|
|
12595
|
+
};
|
|
12596
|
+
/** @description test_clock_advancing */
|
|
12597
|
+
409: {
|
|
12598
|
+
headers: {
|
|
12599
|
+
[name: string]: unknown;
|
|
12600
|
+
};
|
|
12601
|
+
content: {
|
|
12602
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12603
|
+
};
|
|
12604
|
+
};
|
|
12605
|
+
/** @description Client error. */
|
|
12606
|
+
"4XX": {
|
|
12607
|
+
headers: {
|
|
12608
|
+
[name: string]: unknown;
|
|
12609
|
+
};
|
|
12610
|
+
content: {
|
|
12611
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12612
|
+
};
|
|
12613
|
+
};
|
|
12614
|
+
/** @description Server or upstream bank error. */
|
|
12615
|
+
"5XX": {
|
|
12616
|
+
headers: {
|
|
12617
|
+
[name: string]: unknown;
|
|
12618
|
+
};
|
|
12619
|
+
content: {
|
|
12620
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12621
|
+
};
|
|
12622
|
+
};
|
|
12623
|
+
};
|
|
12624
|
+
};
|
|
12625
|
+
TestClocks_advance: {
|
|
12626
|
+
parameters: {
|
|
12627
|
+
query?: never;
|
|
12628
|
+
header?: {
|
|
12629
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
12630
|
+
"Idempotency-Key"?: string;
|
|
12631
|
+
};
|
|
12632
|
+
path: {
|
|
12633
|
+
id: string;
|
|
12634
|
+
};
|
|
12635
|
+
cookie?: never;
|
|
12636
|
+
};
|
|
12637
|
+
requestBody: {
|
|
12638
|
+
content: {
|
|
12639
|
+
"application/json": components["schemas"]["AdvanceTestClockDto"];
|
|
12640
|
+
};
|
|
12641
|
+
};
|
|
12642
|
+
responses: {
|
|
12643
|
+
200: {
|
|
12644
|
+
headers: {
|
|
12645
|
+
[name: string]: unknown;
|
|
12646
|
+
};
|
|
12647
|
+
content: {
|
|
12648
|
+
"application/json": components["schemas"]["TestClockResponseDto"];
|
|
12649
|
+
};
|
|
12650
|
+
};
|
|
12651
|
+
/** @description Validation failure, or test_mode_only on a live-mode tenant. */
|
|
12652
|
+
400: {
|
|
12653
|
+
headers: {
|
|
12654
|
+
[name: string]: unknown;
|
|
12655
|
+
};
|
|
12656
|
+
content: {
|
|
12657
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12658
|
+
};
|
|
12659
|
+
};
|
|
12660
|
+
/** @description Missing or invalid tenant API key. */
|
|
12661
|
+
401: {
|
|
12662
|
+
headers: {
|
|
12663
|
+
[name: string]: unknown;
|
|
12664
|
+
};
|
|
12665
|
+
content: {
|
|
12666
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12667
|
+
};
|
|
12668
|
+
};
|
|
12669
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
12670
|
+
403: {
|
|
12671
|
+
headers: {
|
|
12672
|
+
[name: string]: unknown;
|
|
12673
|
+
};
|
|
12674
|
+
content: {
|
|
12675
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12676
|
+
};
|
|
12677
|
+
};
|
|
12678
|
+
404: {
|
|
12679
|
+
headers: {
|
|
12680
|
+
[name: string]: unknown;
|
|
12681
|
+
};
|
|
12682
|
+
content: {
|
|
12683
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12684
|
+
};
|
|
12685
|
+
};
|
|
12686
|
+
/** @description test_clock_advancing */
|
|
12687
|
+
409: {
|
|
12688
|
+
headers: {
|
|
12689
|
+
[name: string]: unknown;
|
|
12690
|
+
};
|
|
12691
|
+
content: {
|
|
12692
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12693
|
+
};
|
|
12694
|
+
};
|
|
12695
|
+
/** @description Client error. */
|
|
12696
|
+
"4XX": {
|
|
12697
|
+
headers: {
|
|
12698
|
+
[name: string]: unknown;
|
|
12699
|
+
};
|
|
12700
|
+
content: {
|
|
12701
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12702
|
+
};
|
|
12703
|
+
};
|
|
12704
|
+
/** @description Server or upstream bank error. */
|
|
12705
|
+
"5XX": {
|
|
12706
|
+
headers: {
|
|
12707
|
+
[name: string]: unknown;
|
|
12708
|
+
};
|
|
12709
|
+
content: {
|
|
12710
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
12711
|
+
};
|
|
12712
|
+
};
|
|
12713
|
+
};
|
|
12714
|
+
};
|
|
12241
12715
|
}
|
|
12242
12716
|
|
|
12243
12717
|
type CursorPage<Item> = {
|
|
@@ -12481,6 +12955,8 @@ declare class Balance extends APIResource {
|
|
|
12481
12955
|
heldVes?: string;
|
|
12482
12956
|
nextReleaseAt?: string | null;
|
|
12483
12957
|
availableVes: string;
|
|
12958
|
+
unconfirmedVes?: string;
|
|
12959
|
+
settlement?: components["schemas"]["BsSettlementStatusDto"];
|
|
12484
12960
|
platformAvailableVes: string;
|
|
12485
12961
|
sellerObligationsVes: string;
|
|
12486
12962
|
sellerPendingVes: string;
|
|
@@ -12495,7 +12971,7 @@ declare class Payouts extends APIResource {
|
|
|
12495
12971
|
create(params: RequestBody<'Payouts_create'>, options?: RequestOptions): Promise<{
|
|
12496
12972
|
payoutId: string;
|
|
12497
12973
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
12498
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
12974
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
12499
12975
|
reference?: string | null;
|
|
12500
12976
|
failureCode?: string | null;
|
|
12501
12977
|
externalRef?: string;
|
|
@@ -12519,7 +12995,7 @@ declare class Payouts extends APIResource {
|
|
|
12519
12995
|
createInstant(params: RequestBody<'Payouts_createInstant'>, options?: RequestOptions): Promise<{
|
|
12520
12996
|
payoutId: string;
|
|
12521
12997
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
12522
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
12998
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
12523
12999
|
reference?: string | null;
|
|
12524
13000
|
failureCode?: string | null;
|
|
12525
13001
|
externalRef?: string;
|
|
@@ -12552,7 +13028,7 @@ declare class Payouts extends APIResource {
|
|
|
12552
13028
|
}, {
|
|
12553
13029
|
payoutId: string;
|
|
12554
13030
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
12555
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
13031
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
12556
13032
|
reference?: string | null;
|
|
12557
13033
|
failureCode?: string | null;
|
|
12558
13034
|
externalRef?: string;
|
|
@@ -12575,7 +13051,7 @@ declare class Payouts extends APIResource {
|
|
|
12575
13051
|
retrieve(id: string, options?: RequestOptions): Promise<{
|
|
12576
13052
|
payoutId: string;
|
|
12577
13053
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
12578
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
13054
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
12579
13055
|
reference?: string | null;
|
|
12580
13056
|
failureCode?: string | null;
|
|
12581
13057
|
externalRef?: string;
|
|
@@ -12598,7 +13074,7 @@ declare class Payouts extends APIResource {
|
|
|
12598
13074
|
retrieveByRef(externalRef: string, options?: RequestOptions): Promise<{
|
|
12599
13075
|
payoutId: string;
|
|
12600
13076
|
status: "completed" | "pending" | "failed" | "awaiting_approval";
|
|
12601
|
-
holdReason?: "NEW_ACCOUNT_LIMIT";
|
|
13077
|
+
holdReason?: "NEW_ACCOUNT_LIMIT" | "BANK_UNFUNDED";
|
|
12602
13078
|
reference?: string | null;
|
|
12603
13079
|
failureCode?: string | null;
|
|
12604
13080
|
externalRef?: string;
|
|
@@ -12680,7 +13156,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
12680
13156
|
id: string;
|
|
12681
13157
|
tenantId: string;
|
|
12682
13158
|
url: string;
|
|
12683
|
-
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
13159
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
12684
13160
|
isActive: boolean;
|
|
12685
13161
|
createdAt: string;
|
|
12686
13162
|
secret?: string;
|
|
@@ -12689,7 +13165,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
12689
13165
|
id: string;
|
|
12690
13166
|
tenantId: string;
|
|
12691
13167
|
url: string;
|
|
12692
|
-
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
13168
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
12693
13169
|
isActive: boolean;
|
|
12694
13170
|
createdAt: string;
|
|
12695
13171
|
secret?: string;
|
|
@@ -12698,7 +13174,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
12698
13174
|
id: string;
|
|
12699
13175
|
tenantId: string;
|
|
12700
13176
|
url: string;
|
|
12701
|
-
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "notification.test")[];
|
|
13177
|
+
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" | "customer.created" | "customer.updated" | "customer.deleted" | "customer.subscription.created" | "customer.subscription.updated" | "customer.subscription.deleted" | "customer.subscription.trial_will_end" | "customer.subscription.reactivated" | "invoice.created" | "invoice.upcoming" | "invoice.paid" | "invoice.payment_attempt" | "invoice.payment_failed" | "invoice.overdue" | "invoice.voided" | "invoice.marked_uncollectible" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "test_clock.advancing" | "test_clock.ready" | "notification.test")[];
|
|
12702
13178
|
isActive: boolean;
|
|
12703
13179
|
createdAt: string;
|
|
12704
13180
|
secret?: string;
|
|
@@ -13206,6 +13682,67 @@ declare class PaymentMethods extends APIResource {
|
|
|
13206
13682
|
livemode: boolean;
|
|
13207
13683
|
}>;
|
|
13208
13684
|
}
|
|
13685
|
+
/**
|
|
13686
|
+
* Test mode only: freeze time for up to 3 customers and move it forward to see trials,
|
|
13687
|
+
* renewals, dunning and cancellations happen in minutes. Attach a customer with
|
|
13688
|
+
* `customers.create({ testClock })`.
|
|
13689
|
+
*/
|
|
13690
|
+
declare class TestClocks extends APIResource {
|
|
13691
|
+
/** `frozenTime` is an ISO 8601 time. */
|
|
13692
|
+
create(params: RequestBody<'TestClocks_create'>, options?: RequestOptions): Promise<{
|
|
13693
|
+
id: string;
|
|
13694
|
+
object: string;
|
|
13695
|
+
name: string | null;
|
|
13696
|
+
frozenTime: string;
|
|
13697
|
+
status: "ready" | "advancing" | "internal_failure";
|
|
13698
|
+
targetTime: string | null;
|
|
13699
|
+
createdAt: string;
|
|
13700
|
+
livemode: boolean;
|
|
13701
|
+
}>;
|
|
13702
|
+
/** Await for one page, or `for await` over every clock (newest first). */
|
|
13703
|
+
list(params?: QueryParams<'TestClocks_list'>, options?: RequestOptions): PagePromise<{
|
|
13704
|
+
items: components["schemas"]["TestClockResponseDto"][];
|
|
13705
|
+
nextCursor: string | null;
|
|
13706
|
+
}, {
|
|
13707
|
+
id: string;
|
|
13708
|
+
object: string;
|
|
13709
|
+
name: string | null;
|
|
13710
|
+
frozenTime: string;
|
|
13711
|
+
status: "ready" | "advancing" | "internal_failure";
|
|
13712
|
+
targetTime: string | null;
|
|
13713
|
+
createdAt: string;
|
|
13714
|
+
livemode: boolean;
|
|
13715
|
+
}>;
|
|
13716
|
+
retrieve(id: string, options?: RequestOptions): Promise<{
|
|
13717
|
+
id: string;
|
|
13718
|
+
object: string;
|
|
13719
|
+
name: string | null;
|
|
13720
|
+
frozenTime: string;
|
|
13721
|
+
status: "ready" | "advancing" | "internal_failure";
|
|
13722
|
+
targetTime: string | null;
|
|
13723
|
+
createdAt: string;
|
|
13724
|
+
livemode: boolean;
|
|
13725
|
+
}>;
|
|
13726
|
+
/** Deletes the clock with its customers, subscriptions, invoices and payment methods. */
|
|
13727
|
+
delete(id: string, options?: RequestOptions): Promise<{
|
|
13728
|
+
id: string;
|
|
13729
|
+
deleted: boolean;
|
|
13730
|
+
}>;
|
|
13731
|
+
/**
|
|
13732
|
+
* Move the clock forward (at most two intervals of its shortest subscription). It returns at
|
|
13733
|
+
* once with `status: "advancing"`; poll `retrieve` or wait for `test_clock.ready`.
|
|
13734
|
+
*/
|
|
13735
|
+
advance(id: string, params: RequestBody<'TestClocks_advance'>, options?: RequestOptions): Promise<{
|
|
13736
|
+
id: string;
|
|
13737
|
+
object: string;
|
|
13738
|
+
name: string | null;
|
|
13739
|
+
frozenTime: string;
|
|
13740
|
+
status: "ready" | "advancing" | "internal_failure";
|
|
13741
|
+
targetTime: string | null;
|
|
13742
|
+
createdAt: string;
|
|
13743
|
+
livemode: boolean;
|
|
13744
|
+
}>;
|
|
13745
|
+
}
|
|
13209
13746
|
|
|
13210
13747
|
/** Single-purchase checkouts: redirect to `url`, or embed with @vexpay/js using `clientSecret`. */
|
|
13211
13748
|
declare class CheckoutSessions extends APIResource {
|
|
@@ -14369,7 +14906,7 @@ declare class Payments extends APIResource {
|
|
|
14369
14906
|
}>;
|
|
14370
14907
|
}
|
|
14371
14908
|
|
|
14372
|
-
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", "customer.created", "customer.updated", "customer.deleted", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.deleted", "customer.subscription.trial_will_end", "customer.subscription.reactivated", "invoice.created", "invoice.upcoming", "invoice.paid", "invoice.payment_attempt", "invoice.payment_failed", "invoice.overdue", "invoice.voided", "invoice.marked_uncollectible", "payment_method.attached", "payment_method.updated", "payment_method.detached", "notification.test"];
|
|
14909
|
+
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", "customer.created", "customer.updated", "customer.deleted", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.deleted", "customer.subscription.trial_will_end", "customer.subscription.reactivated", "invoice.created", "invoice.upcoming", "invoice.paid", "invoice.payment_attempt", "invoice.payment_failed", "invoice.overdue", "invoice.voided", "invoice.marked_uncollectible", "payment_method.attached", "payment_method.updated", "payment_method.detached", "test_clock.advancing", "test_clock.ready", "notification.test"];
|
|
14373
14910
|
type WebhookEventName = (typeof WEBHOOK_EVENT_NAMES)[number];
|
|
14374
14911
|
/** `data` of every `payment.*` event. */
|
|
14375
14912
|
interface PaymentWebhookData {
|
|
@@ -14484,9 +15021,9 @@ declare class Webhooks {
|
|
|
14484
15021
|
}): string;
|
|
14485
15022
|
}
|
|
14486
15023
|
|
|
14487
|
-
declare const DEFAULT_BASE_URL = "https://api.
|
|
15024
|
+
declare const DEFAULT_BASE_URL = "https://api.vexpay.app";
|
|
14488
15025
|
interface VexPayOptions {
|
|
14489
|
-
/** API origin. Defaults to production (`https://api.
|
|
15026
|
+
/** API origin. Defaults to production (`https://api.vexpay.app`). */
|
|
14490
15027
|
baseUrl?: string;
|
|
14491
15028
|
/** Per-attempt timeout. Default 30 000 ms. */
|
|
14492
15029
|
timeoutMs?: number;
|
|
@@ -14526,6 +15063,8 @@ declare class VexPay {
|
|
|
14526
15063
|
readonly setupSessions: SetupSessions;
|
|
14527
15064
|
/** Billing: domiciliación payment methods (bolívar methods your account takes: `payments.methods()`). */
|
|
14528
15065
|
readonly paymentMethods: PaymentMethods;
|
|
15066
|
+
/** Billing, test mode only: simulated time for trials, renewals and dunning. */
|
|
15067
|
+
readonly testClocks: TestClocks;
|
|
14529
15068
|
/** Offline helpers: `constructEvent` verifies deliveries; no API calls. */
|
|
14530
15069
|
readonly webhooks: Webhooks;
|
|
14531
15070
|
constructor(apiKey: string, options?: VexPayOptions);
|
|
@@ -14579,6 +15118,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
|
|
|
14579
15118
|
declare class VexPaySignatureVerificationError extends VexPayError {
|
|
14580
15119
|
}
|
|
14581
15120
|
|
|
14582
|
-
declare const VERSION = "0.
|
|
15121
|
+
declare const VERSION = "0.15.0";
|
|
14583
15122
|
|
|
14584
15123
|
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 };
|