@vexpay/node 0.6.0 → 0.7.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 +14 -3
- package/dist/index.cjs +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -28
- package/dist/index.d.ts +294 -28
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
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.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" | "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.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" | "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.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" | "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
|
};
|
|
@@ -1277,14 +1277,84 @@ interface components {
|
|
|
1277
1277
|
/** Format: date-time */
|
|
1278
1278
|
asOf: string;
|
|
1279
1279
|
};
|
|
1280
|
+
CurrencyFlagsDto: {
|
|
1281
|
+
VES: boolean;
|
|
1282
|
+
COP: boolean;
|
|
1283
|
+
};
|
|
1284
|
+
CurrencyAmountsDto: {
|
|
1285
|
+
/** @example 3.0000 */
|
|
1286
|
+
VES: string;
|
|
1287
|
+
/** @example 3.0000 */
|
|
1288
|
+
COP: string;
|
|
1289
|
+
};
|
|
1290
|
+
CurrencyCapsDto: {
|
|
1291
|
+
/**
|
|
1292
|
+
* @description Max VES per Caracas day; `null` = no cap.
|
|
1293
|
+
* @example null
|
|
1294
|
+
*/
|
|
1295
|
+
VES: string | null;
|
|
1296
|
+
/**
|
|
1297
|
+
* @description Max COP per Bogotá day; `null` = no cap.
|
|
1298
|
+
* @example 2000000
|
|
1299
|
+
*/
|
|
1300
|
+
COP: string | null;
|
|
1301
|
+
};
|
|
1302
|
+
AutoConvertPercentDto: {
|
|
1303
|
+
/**
|
|
1304
|
+
* @description Whole number; 0 = off.
|
|
1305
|
+
* @example 50
|
|
1306
|
+
*/
|
|
1307
|
+
percent: number;
|
|
1308
|
+
};
|
|
1309
|
+
AutoConvertDto: {
|
|
1310
|
+
COP: components["schemas"]["AutoConvertPercentDto"];
|
|
1311
|
+
};
|
|
1312
|
+
ConversionSettingsDto: {
|
|
1313
|
+
/** @example conversion_settings */
|
|
1314
|
+
object: string;
|
|
1315
|
+
/** @description Conversions are enabled for your account. */
|
|
1316
|
+
enabled: boolean;
|
|
1317
|
+
/** @description Which currencies you can convert from right now. */
|
|
1318
|
+
sourceCurrencies: components["schemas"]["CurrencyFlagsDto"];
|
|
1319
|
+
/** @description Your spread per source currency, in percent. */
|
|
1320
|
+
spreadPercent: components["schemas"]["CurrencyAmountsDto"];
|
|
1321
|
+
/**
|
|
1322
|
+
* @description Smallest USDT amount a conversion may deliver.
|
|
1323
|
+
* @example 10.00
|
|
1324
|
+
*/
|
|
1325
|
+
minimumUsdt: string;
|
|
1326
|
+
dailyMax: components["schemas"]["CurrencyCapsDto"];
|
|
1327
|
+
autoConvert: components["schemas"]["AutoConvertDto"];
|
|
1328
|
+
};
|
|
1329
|
+
UpdateConversionSettingsDto: {
|
|
1330
|
+
/**
|
|
1331
|
+
* @example {
|
|
1332
|
+
* "COP": {
|
|
1333
|
+
* "percent": 50
|
|
1334
|
+
* }
|
|
1335
|
+
* }
|
|
1336
|
+
*/
|
|
1337
|
+
autoConvert: components["schemas"]["AutoConvertDto"];
|
|
1338
|
+
};
|
|
1280
1339
|
CreateConversionQuoteDto: {
|
|
1281
1340
|
/**
|
|
1282
|
-
* @description
|
|
1341
|
+
* @description Currency you convert from. Defaults to `VES`.
|
|
1342
|
+
* @default VES
|
|
1343
|
+
* @enum {string}
|
|
1344
|
+
*/
|
|
1345
|
+
sourceCurrency?: "VES" | "COP";
|
|
1346
|
+
/**
|
|
1347
|
+
* @description Amount of `sourceCurrency` to spend (VES: up to 2 decimals; COP: whole pesos). Send this or `targetAmountUsdt`, not both.
|
|
1348
|
+
* @example 1000000
|
|
1349
|
+
*/
|
|
1350
|
+
sourceAmount?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* @description VES only: same as `sourceAmount` (kept for existing integrations).
|
|
1283
1353
|
* @example 10000.00
|
|
1284
1354
|
*/
|
|
1285
1355
|
sourceAmountVes?: string;
|
|
1286
1356
|
/**
|
|
1287
|
-
* @description USDT to receive. Send this or `
|
|
1357
|
+
* @description USDT to receive. Send this or `sourceAmount`, not both.
|
|
1288
1358
|
* @example 50.00
|
|
1289
1359
|
*/
|
|
1290
1360
|
targetAmountUsdt?: string;
|
|
@@ -1294,12 +1364,12 @@ interface components {
|
|
|
1294
1364
|
/** @example conversion_quote */
|
|
1295
1365
|
object: string;
|
|
1296
1366
|
/**
|
|
1297
|
-
* @description
|
|
1367
|
+
* @description Units of `sourceCurrency` per 1 USDT you get: market rate plus your spread.
|
|
1298
1368
|
* @example 998.8299
|
|
1299
1369
|
*/
|
|
1300
1370
|
rate: string;
|
|
1301
1371
|
/**
|
|
1302
|
-
* @description Market USDT
|
|
1372
|
+
* @description Market USDT rate (in `sourceCurrency`) the quote is based on.
|
|
1303
1373
|
* @example 979.2450
|
|
1304
1374
|
*/
|
|
1305
1375
|
marketRate: string;
|
|
@@ -1313,8 +1383,18 @@ interface components {
|
|
|
1313
1383
|
* @enum {string}
|
|
1314
1384
|
*/
|
|
1315
1385
|
rateSource: "market";
|
|
1316
|
-
/** @
|
|
1317
|
-
|
|
1386
|
+
/** @enum {string} */
|
|
1387
|
+
sourceCurrency: "VES" | "COP";
|
|
1388
|
+
/**
|
|
1389
|
+
* @description Amount debited (VES to the cent, COP in whole pesos; rounded up).
|
|
1390
|
+
* @example 10000.00
|
|
1391
|
+
*/
|
|
1392
|
+
sourceAmount: string;
|
|
1393
|
+
/**
|
|
1394
|
+
* @description VES quotes only; `null` for COP.
|
|
1395
|
+
* @example 10000.00
|
|
1396
|
+
*/
|
|
1397
|
+
sourceAmountVes: string | null;
|
|
1318
1398
|
/**
|
|
1319
1399
|
* @description Rounded down to the cent.
|
|
1320
1400
|
* @example 10.01
|
|
@@ -1351,10 +1431,27 @@ interface components {
|
|
|
1351
1431
|
* @enum {string}
|
|
1352
1432
|
*/
|
|
1353
1433
|
rateSource: "market";
|
|
1354
|
-
/** @
|
|
1355
|
-
|
|
1434
|
+
/** @enum {string} */
|
|
1435
|
+
sourceCurrency: "VES" | "COP";
|
|
1436
|
+
/**
|
|
1437
|
+
* @description Amount debited (VES to the cent, COP in whole pesos).
|
|
1438
|
+
* @example 10000.00
|
|
1439
|
+
*/
|
|
1440
|
+
sourceAmount: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* @description VES conversions only; `null` for COP.
|
|
1443
|
+
* @example 10000.00
|
|
1444
|
+
*/
|
|
1445
|
+
sourceAmountVes: string | null;
|
|
1356
1446
|
/** @example 10.01 */
|
|
1357
1447
|
targetAmountUsdt: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* @description `auto` when created by auto-convert from a pay-in.
|
|
1450
|
+
* @enum {string}
|
|
1451
|
+
*/
|
|
1452
|
+
origin: "api" | "auto";
|
|
1453
|
+
/** @description The pay-in an auto-conversion came from; `null` otherwise. */
|
|
1454
|
+
paymentId: string | null;
|
|
1358
1455
|
createdAt: string;
|
|
1359
1456
|
completedAt: string | null;
|
|
1360
1457
|
canceledAt: string | null;
|
|
@@ -5158,6 +5255,129 @@ interface operations {
|
|
|
5158
5255
|
};
|
|
5159
5256
|
};
|
|
5160
5257
|
};
|
|
5258
|
+
ConversionSettings_get: {
|
|
5259
|
+
parameters: {
|
|
5260
|
+
query?: never;
|
|
5261
|
+
header?: never;
|
|
5262
|
+
path?: never;
|
|
5263
|
+
cookie?: never;
|
|
5264
|
+
};
|
|
5265
|
+
requestBody?: never;
|
|
5266
|
+
responses: {
|
|
5267
|
+
200: {
|
|
5268
|
+
headers: {
|
|
5269
|
+
[name: string]: unknown;
|
|
5270
|
+
};
|
|
5271
|
+
content: {
|
|
5272
|
+
"application/json": components["schemas"]["ConversionSettingsDto"];
|
|
5273
|
+
};
|
|
5274
|
+
};
|
|
5275
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
5276
|
+
401: {
|
|
5277
|
+
headers: {
|
|
5278
|
+
[name: string]: unknown;
|
|
5279
|
+
};
|
|
5280
|
+
content: {
|
|
5281
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5282
|
+
};
|
|
5283
|
+
};
|
|
5284
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
5285
|
+
403: {
|
|
5286
|
+
headers: {
|
|
5287
|
+
[name: string]: unknown;
|
|
5288
|
+
};
|
|
5289
|
+
content: {
|
|
5290
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5291
|
+
};
|
|
5292
|
+
};
|
|
5293
|
+
/** @description Client error. */
|
|
5294
|
+
"4XX": {
|
|
5295
|
+
headers: {
|
|
5296
|
+
[name: string]: unknown;
|
|
5297
|
+
};
|
|
5298
|
+
content: {
|
|
5299
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5300
|
+
};
|
|
5301
|
+
};
|
|
5302
|
+
/** @description Server or upstream bank error. */
|
|
5303
|
+
"5XX": {
|
|
5304
|
+
headers: {
|
|
5305
|
+
[name: string]: unknown;
|
|
5306
|
+
};
|
|
5307
|
+
content: {
|
|
5308
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5309
|
+
};
|
|
5310
|
+
};
|
|
5311
|
+
};
|
|
5312
|
+
};
|
|
5313
|
+
ConversionSettings_update: {
|
|
5314
|
+
parameters: {
|
|
5315
|
+
query?: never;
|
|
5316
|
+
header?: never;
|
|
5317
|
+
path?: never;
|
|
5318
|
+
cookie?: never;
|
|
5319
|
+
};
|
|
5320
|
+
requestBody: {
|
|
5321
|
+
content: {
|
|
5322
|
+
"application/json": components["schemas"]["UpdateConversionSettingsDto"];
|
|
5323
|
+
};
|
|
5324
|
+
};
|
|
5325
|
+
responses: {
|
|
5326
|
+
200: {
|
|
5327
|
+
headers: {
|
|
5328
|
+
[name: string]: unknown;
|
|
5329
|
+
};
|
|
5330
|
+
content: {
|
|
5331
|
+
"application/json": components["schemas"]["ConversionSettingsDto"];
|
|
5332
|
+
};
|
|
5333
|
+
};
|
|
5334
|
+
/** @description `invalid_data` — unknown field or percent outside 0–100. */
|
|
5335
|
+
400: {
|
|
5336
|
+
headers: {
|
|
5337
|
+
[name: string]: unknown;
|
|
5338
|
+
};
|
|
5339
|
+
content: {
|
|
5340
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5341
|
+
};
|
|
5342
|
+
};
|
|
5343
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
5344
|
+
401: {
|
|
5345
|
+
headers: {
|
|
5346
|
+
[name: string]: unknown;
|
|
5347
|
+
};
|
|
5348
|
+
content: {
|
|
5349
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5350
|
+
};
|
|
5351
|
+
};
|
|
5352
|
+
/** @description `conversions_not_enabled` — COP conversions are not allowed for this account. */
|
|
5353
|
+
403: {
|
|
5354
|
+
headers: {
|
|
5355
|
+
[name: string]: unknown;
|
|
5356
|
+
};
|
|
5357
|
+
content: {
|
|
5358
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5359
|
+
};
|
|
5360
|
+
};
|
|
5361
|
+
/** @description Client error. */
|
|
5362
|
+
"4XX": {
|
|
5363
|
+
headers: {
|
|
5364
|
+
[name: string]: unknown;
|
|
5365
|
+
};
|
|
5366
|
+
content: {
|
|
5367
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5368
|
+
};
|
|
5369
|
+
};
|
|
5370
|
+
/** @description Server or upstream bank error. */
|
|
5371
|
+
"5XX": {
|
|
5372
|
+
headers: {
|
|
5373
|
+
[name: string]: unknown;
|
|
5374
|
+
};
|
|
5375
|
+
content: {
|
|
5376
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5377
|
+
};
|
|
5378
|
+
};
|
|
5379
|
+
};
|
|
5380
|
+
};
|
|
5161
5381
|
Conversions_createQuote: {
|
|
5162
5382
|
parameters: {
|
|
5163
5383
|
query?: never;
|
|
@@ -5253,6 +5473,7 @@ interface operations {
|
|
|
5253
5473
|
status?: "PENDING" | "COMPLETED" | "CANCELED";
|
|
5254
5474
|
cursor?: string;
|
|
5255
5475
|
limit?: string;
|
|
5476
|
+
sourceCurrency?: "VES" | "COP";
|
|
5256
5477
|
};
|
|
5257
5478
|
header?: never;
|
|
5258
5479
|
path?: never;
|
|
@@ -5863,7 +6084,7 @@ interface operations {
|
|
|
5863
6084
|
"application/json": components["schemas"]["PaymentReceiptDto"];
|
|
5864
6085
|
};
|
|
5865
6086
|
};
|
|
5866
|
-
/** @description Invalid
|
|
6087
|
+
/** @description Invalid body, or a VPOS test card sent with a Live key (test_card_in_live_mode). */
|
|
5867
6088
|
400: {
|
|
5868
6089
|
headers: {
|
|
5869
6090
|
[name: string]: unknown;
|
|
@@ -8818,7 +9039,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8818
9039
|
id: string;
|
|
8819
9040
|
tenantId: string;
|
|
8820
9041
|
url: string;
|
|
8821
|
-
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.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
|
|
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")[];
|
|
8822
9043
|
isActive: boolean;
|
|
8823
9044
|
createdAt: string;
|
|
8824
9045
|
secret?: string;
|
|
@@ -8827,7 +9048,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8827
9048
|
id: string;
|
|
8828
9049
|
tenantId: string;
|
|
8829
9050
|
url: string;
|
|
8830
|
-
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.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
|
|
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")[];
|
|
8831
9052
|
isActive: boolean;
|
|
8832
9053
|
createdAt: string;
|
|
8833
9054
|
secret?: string;
|
|
@@ -8836,7 +9057,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8836
9057
|
id: string;
|
|
8837
9058
|
tenantId: string;
|
|
8838
9059
|
url: string;
|
|
8839
|
-
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.completed" | "conversion.canceled" | "tenant.status_changed" | "tenant.api_key.created" | "tenant.api_key.rotated" | "tenant.api_key.revoked" | "tenant.live_status_changed" | "notification.test")[];
|
|
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")[];
|
|
8840
9061
|
isActive: boolean;
|
|
8841
9062
|
createdAt: string;
|
|
8842
9063
|
secret?: string;
|
|
@@ -8994,9 +9215,12 @@ declare class PaymentLinks extends APIResource {
|
|
|
8994
9215
|
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
8995
9216
|
}
|
|
8996
9217
|
|
|
8997
|
-
/** A rate for converting VES to USDT, locked for 60 seconds. */
|
|
9218
|
+
/** A rate for converting VES or COP to USDT, locked for 60 seconds. */
|
|
8998
9219
|
declare class ConversionQuotes extends APIResource {
|
|
8999
|
-
/**
|
|
9220
|
+
/**
|
|
9221
|
+
* `sourceCurrency` is `'VES'` (default) or `'COP'`. Send `sourceAmount` (to spend; COP in whole pesos)
|
|
9222
|
+
* or `targetAmountUsdt` (USDT to receive) — exactly one. VES may still use `sourceAmountVes`.
|
|
9223
|
+
*/
|
|
9000
9224
|
create(params: RequestBody<'Conversions_createQuote'>, options?: RequestOptions): Promise<{
|
|
9001
9225
|
id: string;
|
|
9002
9226
|
object: string;
|
|
@@ -9004,18 +9228,44 @@ declare class ConversionQuotes extends APIResource {
|
|
|
9004
9228
|
marketRate: string;
|
|
9005
9229
|
spreadPercent: string;
|
|
9006
9230
|
rateSource: "market";
|
|
9007
|
-
|
|
9231
|
+
sourceCurrency: "VES" | "COP";
|
|
9232
|
+
sourceAmount: string;
|
|
9233
|
+
sourceAmountVes: string | null;
|
|
9008
9234
|
targetAmountUsdt: string;
|
|
9009
9235
|
expiresAt: string;
|
|
9010
9236
|
createdAt: string;
|
|
9011
9237
|
}>;
|
|
9012
9238
|
}
|
|
9239
|
+
/** Your conversion spreads, minimum and caps, and COP auto-convert. */
|
|
9240
|
+
declare class ConversionSettings extends APIResource {
|
|
9241
|
+
retrieve(options?: RequestOptions): Promise<{
|
|
9242
|
+
object: string;
|
|
9243
|
+
enabled: boolean;
|
|
9244
|
+
sourceCurrencies: components["schemas"]["CurrencyFlagsDto"];
|
|
9245
|
+
spreadPercent: components["schemas"]["CurrencyAmountsDto"];
|
|
9246
|
+
minimumUsdt: string;
|
|
9247
|
+
dailyMax: components["schemas"]["CurrencyCapsDto"];
|
|
9248
|
+
autoConvert: components["schemas"]["AutoConvertDto"];
|
|
9249
|
+
}>;
|
|
9250
|
+
/** Only `autoConvert.COP.percent` (0–100, whole number; 0 = off) can be changed. */
|
|
9251
|
+
update(params: RequestBody<'ConversionSettings_update'>, options?: RequestOptions): Promise<{
|
|
9252
|
+
object: string;
|
|
9253
|
+
enabled: boolean;
|
|
9254
|
+
sourceCurrencies: components["schemas"]["CurrencyFlagsDto"];
|
|
9255
|
+
spreadPercent: components["schemas"]["CurrencyAmountsDto"];
|
|
9256
|
+
minimumUsdt: string;
|
|
9257
|
+
dailyMax: components["schemas"]["CurrencyCapsDto"];
|
|
9258
|
+
autoConvert: components["schemas"]["AutoConvertDto"];
|
|
9259
|
+
}>;
|
|
9260
|
+
}
|
|
9013
9261
|
/**
|
|
9014
|
-
* Convert available VES into your USDT balance. Accepting a quote debits the
|
|
9015
|
-
* conversion is `PENDING` until VEXPay delivers the USDT
|
|
9262
|
+
* Convert available VES or COP into your USDT balance. Accepting a quote debits the source at once
|
|
9263
|
+
* (`conversion.created`); the conversion is `PENDING` until VEXPay delivers the USDT
|
|
9264
|
+
* (`conversion.completed`). Enabled per account.
|
|
9016
9265
|
*/
|
|
9017
9266
|
declare class Conversions extends APIResource {
|
|
9018
9267
|
readonly quotes: ConversionQuotes;
|
|
9268
|
+
readonly settings: ConversionSettings;
|
|
9019
9269
|
/** Accept a quote (`quoteId`). Pass `idempotencyKey` in options to retry safely. */
|
|
9020
9270
|
create(params: RequestBody<'Conversions_create'>, options?: RequestOptions): Promise<{
|
|
9021
9271
|
id: string;
|
|
@@ -9026,8 +9276,12 @@ declare class Conversions extends APIResource {
|
|
|
9026
9276
|
marketRate: string;
|
|
9027
9277
|
spreadPercent: string;
|
|
9028
9278
|
rateSource: "market";
|
|
9029
|
-
|
|
9279
|
+
sourceCurrency: "VES" | "COP";
|
|
9280
|
+
sourceAmount: string;
|
|
9281
|
+
sourceAmountVes: string | null;
|
|
9030
9282
|
targetAmountUsdt: string;
|
|
9283
|
+
origin: "api" | "auto";
|
|
9284
|
+
paymentId: string | null;
|
|
9031
9285
|
createdAt: string;
|
|
9032
9286
|
completedAt: string | null;
|
|
9033
9287
|
canceledAt: string | null;
|
|
@@ -9042,14 +9296,18 @@ declare class Conversions extends APIResource {
|
|
|
9042
9296
|
marketRate: string;
|
|
9043
9297
|
spreadPercent: string;
|
|
9044
9298
|
rateSource: "market";
|
|
9045
|
-
|
|
9299
|
+
sourceCurrency: "VES" | "COP";
|
|
9300
|
+
sourceAmount: string;
|
|
9301
|
+
sourceAmountVes: string | null;
|
|
9046
9302
|
targetAmountUsdt: string;
|
|
9303
|
+
origin: "api" | "auto";
|
|
9304
|
+
paymentId: string | null;
|
|
9047
9305
|
createdAt: string;
|
|
9048
9306
|
completedAt: string | null;
|
|
9049
9307
|
canceledAt: string | null;
|
|
9050
9308
|
cancelReason: string | null;
|
|
9051
9309
|
}>;
|
|
9052
|
-
/** Await for one page, or `for await` over every conversion (newest first). */
|
|
9310
|
+
/** Await for one page, or `for await` over every conversion (newest first). Filter with `sourceCurrency`. */
|
|
9053
9311
|
list(params?: QueryParams<'Conversions_list'>, options?: RequestOptions): PagePromise<{
|
|
9054
9312
|
items: components["schemas"]["ConversionDto"][];
|
|
9055
9313
|
nextCursor: string | null;
|
|
@@ -9062,14 +9320,18 @@ declare class Conversions extends APIResource {
|
|
|
9062
9320
|
marketRate: string;
|
|
9063
9321
|
spreadPercent: string;
|
|
9064
9322
|
rateSource: "market";
|
|
9065
|
-
|
|
9323
|
+
sourceCurrency: "VES" | "COP";
|
|
9324
|
+
sourceAmount: string;
|
|
9325
|
+
sourceAmountVes: string | null;
|
|
9066
9326
|
targetAmountUsdt: string;
|
|
9327
|
+
origin: "api" | "auto";
|
|
9328
|
+
paymentId: string | null;
|
|
9067
9329
|
createdAt: string;
|
|
9068
9330
|
completedAt: string | null;
|
|
9069
9331
|
canceledAt: string | null;
|
|
9070
9332
|
cancelReason: string | null;
|
|
9071
9333
|
}>;
|
|
9072
|
-
/** Cancel a `PENDING` conversion; the VES returns to your available balance. */
|
|
9334
|
+
/** Cancel a `PENDING` conversion; the VES or COP returns to your available balance. */
|
|
9073
9335
|
cancel(id: string, options?: RequestOptions): Promise<{
|
|
9074
9336
|
id: string;
|
|
9075
9337
|
object: string;
|
|
@@ -9079,8 +9341,12 @@ declare class Conversions extends APIResource {
|
|
|
9079
9341
|
marketRate: string;
|
|
9080
9342
|
spreadPercent: string;
|
|
9081
9343
|
rateSource: "market";
|
|
9082
|
-
|
|
9344
|
+
sourceCurrency: "VES" | "COP";
|
|
9345
|
+
sourceAmount: string;
|
|
9346
|
+
sourceAmountVes: string | null;
|
|
9083
9347
|
targetAmountUsdt: string;
|
|
9348
|
+
origin: "api" | "auto";
|
|
9349
|
+
paymentId: string | null;
|
|
9084
9350
|
createdAt: string;
|
|
9085
9351
|
completedAt: string | null;
|
|
9086
9352
|
canceledAt: string | null;
|
|
@@ -9856,7 +10122,7 @@ declare class Payments extends APIResource {
|
|
|
9856
10122
|
}>;
|
|
9857
10123
|
}
|
|
9858
10124
|
|
|
9859
|
-
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.completed", "conversion.canceled", "tenant.status_changed", "tenant.api_key.created", "tenant.api_key.rotated", "tenant.api_key.revoked", "tenant.live_status_changed", "notification.test"];
|
|
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"];
|
|
9860
10126
|
type WebhookEventName = (typeof WEBHOOK_EVENT_NAMES)[number];
|
|
9861
10127
|
/** `data` of every `payment.*` event. */
|
|
9862
10128
|
interface PaymentWebhookData {
|
|
@@ -10043,6 +10309,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
|
|
|
10043
10309
|
declare class VexPaySignatureVerificationError extends VexPayError {
|
|
10044
10310
|
}
|
|
10045
10311
|
|
|
10046
|
-
declare const VERSION = "0.
|
|
10312
|
+
declare const VERSION = "0.7.0";
|
|
10047
10313
|
|
|
10048
10314
|
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 };
|