@vexpay/node 0.5.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 +62 -3
- package/dist/index.cjs +65 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1142 -128
- package/dist/index.d.ts +1142 -128
- package/dist/index.js +65 -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
|
};
|
|
@@ -1140,14 +1140,221 @@ interface components {
|
|
|
1140
1140
|
/** Format: date-time */
|
|
1141
1141
|
completedAt?: string;
|
|
1142
1142
|
};
|
|
1143
|
+
CopBuyerDto: {
|
|
1144
|
+
/** @example Juan */
|
|
1145
|
+
firstName?: string;
|
|
1146
|
+
/** @example Pérez */
|
|
1147
|
+
lastName?: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* @description Required for Nequi and Daviplata.
|
|
1150
|
+
* @example juan@example.com
|
|
1151
|
+
*/
|
|
1152
|
+
email?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* @description Colombian mobile number (10 digits starting with 3, with or without +57). Required for Nequi (it receives the push) and Daviplata.
|
|
1155
|
+
* @example 3001234567
|
|
1156
|
+
*/
|
|
1157
|
+
phone?: string;
|
|
1158
|
+
/**
|
|
1159
|
+
* @description Required for Nequi and Daviplata. Daviplata accepts CC, CE and TI only.
|
|
1160
|
+
* @example CC
|
|
1161
|
+
* @enum {string}
|
|
1162
|
+
*/
|
|
1163
|
+
documentType?: "CC" | "CE" | "TI" | "NIT" | "PP";
|
|
1164
|
+
/**
|
|
1165
|
+
* @description National document number. Required for Nequi and Daviplata.
|
|
1166
|
+
* @example 1234567890
|
|
1167
|
+
*/
|
|
1168
|
+
documentNumber?: string;
|
|
1169
|
+
};
|
|
1170
|
+
CreateCopPaymentDto: {
|
|
1171
|
+
/**
|
|
1172
|
+
* @description Amount in whole Colombian pesos.
|
|
1173
|
+
* @example 100000
|
|
1174
|
+
*/
|
|
1175
|
+
amountCop: number;
|
|
1176
|
+
/**
|
|
1177
|
+
* @description `breb`: QR code / transfer key the buyer pays from any Colombian bank app. `nequi`: push to the buyer's Nequi app. `daviplata`: SMS code the buyer reads to you.
|
|
1178
|
+
* @example breb
|
|
1179
|
+
* @enum {string}
|
|
1180
|
+
*/
|
|
1181
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
1182
|
+
/**
|
|
1183
|
+
* @description Shown to the buyer.
|
|
1184
|
+
* @example Order 1042
|
|
1185
|
+
*/
|
|
1186
|
+
description?: string;
|
|
1187
|
+
/**
|
|
1188
|
+
* @description Your reference, echoed in reads and webhooks.
|
|
1189
|
+
* @example order-1042
|
|
1190
|
+
*/
|
|
1191
|
+
reference?: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* @description Up to 20 string key/value pairs (keys ≤ 40 chars, values ≤ 500 chars).
|
|
1194
|
+
* @example {
|
|
1195
|
+
* "orderId": "1042"
|
|
1196
|
+
* }
|
|
1197
|
+
*/
|
|
1198
|
+
metadata?: {
|
|
1199
|
+
[key: string]: string;
|
|
1200
|
+
};
|
|
1201
|
+
/** @description Required for `nequi` and `daviplata`; optional for `breb`. */
|
|
1202
|
+
buyer?: components["schemas"]["CopBuyerDto"];
|
|
1203
|
+
};
|
|
1204
|
+
CopNextActionDto: {
|
|
1205
|
+
/** @enum {string} */
|
|
1206
|
+
type: "show_qr" | "approve_in_app" | "submit_otp";
|
|
1207
|
+
/** @description Bre-B: base64 PNG of the payment QR. Returned only when the payment is created. */
|
|
1208
|
+
qrPngBase64?: string;
|
|
1209
|
+
/** @description Bre-B: transfer key the buyer can enter instead of scanning. */
|
|
1210
|
+
transferKey?: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* @description Nequi: masked phone that received the push.
|
|
1213
|
+
* @example ****567
|
|
1214
|
+
*/
|
|
1215
|
+
phoneMasked?: string;
|
|
1216
|
+
};
|
|
1217
|
+
CopPaymentDto: {
|
|
1218
|
+
/** Format: uuid */
|
|
1219
|
+
id: string;
|
|
1220
|
+
/** @enum {string} */
|
|
1221
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
1222
|
+
/** @enum {string} */
|
|
1223
|
+
method: "COP";
|
|
1224
|
+
/** @enum {string} */
|
|
1225
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
1226
|
+
/** @example 100000 */
|
|
1227
|
+
amountCop: number;
|
|
1228
|
+
/**
|
|
1229
|
+
* @description Present once completed.
|
|
1230
|
+
* @example 3500
|
|
1231
|
+
*/
|
|
1232
|
+
feeCop?: number;
|
|
1233
|
+
/**
|
|
1234
|
+
* @description Hosted checkout payments only: the USD price the peso amount was computed from.
|
|
1235
|
+
* @example 5.00
|
|
1236
|
+
*/
|
|
1237
|
+
amountUsd?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* @description Hosted checkout payments only: COP per USD the buyer was charged at.
|
|
1240
|
+
* @example 3316.382375
|
|
1241
|
+
*/
|
|
1242
|
+
copRate?: string;
|
|
1243
|
+
/** @example order-1042 */
|
|
1244
|
+
reference?: string;
|
|
1245
|
+
metadata: {
|
|
1246
|
+
[key: string]: string;
|
|
1247
|
+
};
|
|
1248
|
+
/** @enum {string} */
|
|
1249
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
1250
|
+
/** Format: date-time */
|
|
1251
|
+
expiresAt?: string;
|
|
1252
|
+
/** Format: date-time */
|
|
1253
|
+
createdAt: string;
|
|
1254
|
+
/** Format: date-time */
|
|
1255
|
+
completedAt?: string;
|
|
1256
|
+
/** @description What the buyer must do next. Returned when the payment is created. */
|
|
1257
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
1258
|
+
};
|
|
1259
|
+
SubmitCopOtpDto: {
|
|
1260
|
+
/**
|
|
1261
|
+
* @description The code the buyer received by SMS.
|
|
1262
|
+
* @example 123456
|
|
1263
|
+
*/
|
|
1264
|
+
otp: string;
|
|
1265
|
+
};
|
|
1266
|
+
CopBalanceDto: {
|
|
1267
|
+
/**
|
|
1268
|
+
* @description Whole pesos available for payout.
|
|
1269
|
+
* @example 96500
|
|
1270
|
+
*/
|
|
1271
|
+
availableCop: number;
|
|
1272
|
+
/**
|
|
1273
|
+
* @description Whole pesos reserved by payouts in progress.
|
|
1274
|
+
* @example 0
|
|
1275
|
+
*/
|
|
1276
|
+
pendingPayoutCop: number;
|
|
1277
|
+
/** Format: date-time */
|
|
1278
|
+
asOf: string;
|
|
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
|
+
};
|
|
1143
1339
|
CreateConversionQuoteDto: {
|
|
1144
1340
|
/**
|
|
1145
|
-
* @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).
|
|
1146
1353
|
* @example 10000.00
|
|
1147
1354
|
*/
|
|
1148
1355
|
sourceAmountVes?: string;
|
|
1149
1356
|
/**
|
|
1150
|
-
* @description USDT to receive. Send this or `
|
|
1357
|
+
* @description USDT to receive. Send this or `sourceAmount`, not both.
|
|
1151
1358
|
* @example 50.00
|
|
1152
1359
|
*/
|
|
1153
1360
|
targetAmountUsdt?: string;
|
|
@@ -1157,12 +1364,12 @@ interface components {
|
|
|
1157
1364
|
/** @example conversion_quote */
|
|
1158
1365
|
object: string;
|
|
1159
1366
|
/**
|
|
1160
|
-
* @description
|
|
1367
|
+
* @description Units of `sourceCurrency` per 1 USDT you get: market rate plus your spread.
|
|
1161
1368
|
* @example 998.8299
|
|
1162
1369
|
*/
|
|
1163
1370
|
rate: string;
|
|
1164
1371
|
/**
|
|
1165
|
-
* @description Market USDT
|
|
1372
|
+
* @description Market USDT rate (in `sourceCurrency`) the quote is based on.
|
|
1166
1373
|
* @example 979.2450
|
|
1167
1374
|
*/
|
|
1168
1375
|
marketRate: string;
|
|
@@ -1176,8 +1383,18 @@ interface components {
|
|
|
1176
1383
|
* @enum {string}
|
|
1177
1384
|
*/
|
|
1178
1385
|
rateSource: "market";
|
|
1179
|
-
/** @
|
|
1180
|
-
|
|
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;
|
|
1181
1398
|
/**
|
|
1182
1399
|
* @description Rounded down to the cent.
|
|
1183
1400
|
* @example 10.01
|
|
@@ -1214,10 +1431,27 @@ interface components {
|
|
|
1214
1431
|
* @enum {string}
|
|
1215
1432
|
*/
|
|
1216
1433
|
rateSource: "market";
|
|
1217
|
-
/** @
|
|
1218
|
-
|
|
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;
|
|
1219
1446
|
/** @example 10.01 */
|
|
1220
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;
|
|
1221
1455
|
createdAt: string;
|
|
1222
1456
|
completedAt: string | null;
|
|
1223
1457
|
canceledAt: string | null;
|
|
@@ -4156,21 +4390,599 @@ interface operations {
|
|
|
4156
4390
|
query?: {
|
|
4157
4391
|
currency?: "USDT" | "USDC";
|
|
4158
4392
|
};
|
|
4159
|
-
header?: never;
|
|
4160
|
-
path?: never;
|
|
4393
|
+
header?: never;
|
|
4394
|
+
path?: never;
|
|
4395
|
+
cookie?: never;
|
|
4396
|
+
};
|
|
4397
|
+
requestBody?: never;
|
|
4398
|
+
responses: {
|
|
4399
|
+
200: {
|
|
4400
|
+
headers: {
|
|
4401
|
+
[name: string]: unknown;
|
|
4402
|
+
};
|
|
4403
|
+
content: {
|
|
4404
|
+
"application/json": components["schemas"]["CryptoBalanceDto"];
|
|
4405
|
+
};
|
|
4406
|
+
};
|
|
4407
|
+
/** @description `unsupported_currency`. */
|
|
4408
|
+
400: {
|
|
4409
|
+
headers: {
|
|
4410
|
+
[name: string]: unknown;
|
|
4411
|
+
};
|
|
4412
|
+
content: {
|
|
4413
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4414
|
+
};
|
|
4415
|
+
};
|
|
4416
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4417
|
+
401: {
|
|
4418
|
+
headers: {
|
|
4419
|
+
[name: string]: unknown;
|
|
4420
|
+
};
|
|
4421
|
+
content: {
|
|
4422
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4423
|
+
};
|
|
4424
|
+
};
|
|
4425
|
+
/** @description `method_not_allowed` — USDC is not enabled for this account. */
|
|
4426
|
+
403: {
|
|
4427
|
+
headers: {
|
|
4428
|
+
[name: string]: unknown;
|
|
4429
|
+
};
|
|
4430
|
+
content: {
|
|
4431
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4432
|
+
};
|
|
4433
|
+
};
|
|
4434
|
+
/** @description Client error. */
|
|
4435
|
+
"4XX": {
|
|
4436
|
+
headers: {
|
|
4437
|
+
[name: string]: unknown;
|
|
4438
|
+
};
|
|
4439
|
+
content: {
|
|
4440
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4441
|
+
};
|
|
4442
|
+
};
|
|
4443
|
+
/** @description Server or upstream bank error. */
|
|
4444
|
+
"5XX": {
|
|
4445
|
+
headers: {
|
|
4446
|
+
[name: string]: unknown;
|
|
4447
|
+
};
|
|
4448
|
+
content: {
|
|
4449
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4450
|
+
};
|
|
4451
|
+
};
|
|
4452
|
+
};
|
|
4453
|
+
};
|
|
4454
|
+
Crypto_getBalances: {
|
|
4455
|
+
parameters: {
|
|
4456
|
+
query?: never;
|
|
4457
|
+
header?: never;
|
|
4458
|
+
path?: never;
|
|
4459
|
+
cookie?: never;
|
|
4460
|
+
};
|
|
4461
|
+
requestBody?: never;
|
|
4462
|
+
responses: {
|
|
4463
|
+
200: {
|
|
4464
|
+
headers: {
|
|
4465
|
+
[name: string]: unknown;
|
|
4466
|
+
};
|
|
4467
|
+
content: {
|
|
4468
|
+
"application/json": components["schemas"]["CryptoBalancesDto"];
|
|
4469
|
+
};
|
|
4470
|
+
};
|
|
4471
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4472
|
+
401: {
|
|
4473
|
+
headers: {
|
|
4474
|
+
[name: string]: unknown;
|
|
4475
|
+
};
|
|
4476
|
+
content: {
|
|
4477
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4478
|
+
};
|
|
4479
|
+
};
|
|
4480
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
4481
|
+
403: {
|
|
4482
|
+
headers: {
|
|
4483
|
+
[name: string]: unknown;
|
|
4484
|
+
};
|
|
4485
|
+
content: {
|
|
4486
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4487
|
+
};
|
|
4488
|
+
};
|
|
4489
|
+
/** @description Client error. */
|
|
4490
|
+
"4XX": {
|
|
4491
|
+
headers: {
|
|
4492
|
+
[name: string]: unknown;
|
|
4493
|
+
};
|
|
4494
|
+
content: {
|
|
4495
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4496
|
+
};
|
|
4497
|
+
};
|
|
4498
|
+
/** @description Server or upstream bank error. */
|
|
4499
|
+
"5XX": {
|
|
4500
|
+
headers: {
|
|
4501
|
+
[name: string]: unknown;
|
|
4502
|
+
};
|
|
4503
|
+
content: {
|
|
4504
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4505
|
+
};
|
|
4506
|
+
};
|
|
4507
|
+
};
|
|
4508
|
+
};
|
|
4509
|
+
Crypto_createDepositAddress: {
|
|
4510
|
+
parameters: {
|
|
4511
|
+
query?: never;
|
|
4512
|
+
header?: {
|
|
4513
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4514
|
+
"Idempotency-Key"?: string;
|
|
4515
|
+
};
|
|
4516
|
+
path?: never;
|
|
4517
|
+
cookie?: never;
|
|
4518
|
+
};
|
|
4519
|
+
requestBody: {
|
|
4520
|
+
content: {
|
|
4521
|
+
"application/json": components["schemas"]["CreateDepositAddressDto"];
|
|
4522
|
+
};
|
|
4523
|
+
};
|
|
4524
|
+
responses: {
|
|
4525
|
+
200: {
|
|
4526
|
+
headers: {
|
|
4527
|
+
[name: string]: unknown;
|
|
4528
|
+
};
|
|
4529
|
+
content: {
|
|
4530
|
+
"application/json": components["schemas"]["DepositAddressDto"];
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4533
|
+
/** @description `unsupported_currency`, `unsupported_network` or invalid `customerRef`. */
|
|
4534
|
+
400: {
|
|
4535
|
+
headers: {
|
|
4536
|
+
[name: string]: unknown;
|
|
4537
|
+
};
|
|
4538
|
+
content: {
|
|
4539
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4540
|
+
};
|
|
4541
|
+
};
|
|
4542
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4543
|
+
401: {
|
|
4544
|
+
headers: {
|
|
4545
|
+
[name: string]: unknown;
|
|
4546
|
+
};
|
|
4547
|
+
content: {
|
|
4548
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4549
|
+
};
|
|
4550
|
+
};
|
|
4551
|
+
/** @description `method_not_allowed` — that stablecoin is not enabled for this account. */
|
|
4552
|
+
403: {
|
|
4553
|
+
headers: {
|
|
4554
|
+
[name: string]: unknown;
|
|
4555
|
+
};
|
|
4556
|
+
content: {
|
|
4557
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4558
|
+
};
|
|
4559
|
+
};
|
|
4560
|
+
/** @description Client error. */
|
|
4561
|
+
"4XX": {
|
|
4562
|
+
headers: {
|
|
4563
|
+
[name: string]: unknown;
|
|
4564
|
+
};
|
|
4565
|
+
content: {
|
|
4566
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4567
|
+
};
|
|
4568
|
+
};
|
|
4569
|
+
/** @description Server or upstream bank error. */
|
|
4570
|
+
"5XX": {
|
|
4571
|
+
headers: {
|
|
4572
|
+
[name: string]: unknown;
|
|
4573
|
+
};
|
|
4574
|
+
content: {
|
|
4575
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4576
|
+
};
|
|
4577
|
+
};
|
|
4578
|
+
};
|
|
4579
|
+
};
|
|
4580
|
+
Crypto_listNetworks: {
|
|
4581
|
+
parameters: {
|
|
4582
|
+
query?: {
|
|
4583
|
+
/** @description Alias of `amount`. */
|
|
4584
|
+
amountUsdt?: string;
|
|
4585
|
+
currency?: "USDT" | "USDC";
|
|
4586
|
+
amount?: string;
|
|
4587
|
+
};
|
|
4588
|
+
header?: never;
|
|
4589
|
+
path?: never;
|
|
4590
|
+
cookie?: never;
|
|
4591
|
+
};
|
|
4592
|
+
requestBody?: never;
|
|
4593
|
+
responses: {
|
|
4594
|
+
200: {
|
|
4595
|
+
headers: {
|
|
4596
|
+
[name: string]: unknown;
|
|
4597
|
+
};
|
|
4598
|
+
content: {
|
|
4599
|
+
"application/json": components["schemas"]["CryptoNetworkDto"][];
|
|
4600
|
+
};
|
|
4601
|
+
};
|
|
4602
|
+
/** @description `unsupported_currency`. */
|
|
4603
|
+
400: {
|
|
4604
|
+
headers: {
|
|
4605
|
+
[name: string]: unknown;
|
|
4606
|
+
};
|
|
4607
|
+
content: {
|
|
4608
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4609
|
+
};
|
|
4610
|
+
};
|
|
4611
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4612
|
+
401: {
|
|
4613
|
+
headers: {
|
|
4614
|
+
[name: string]: unknown;
|
|
4615
|
+
};
|
|
4616
|
+
content: {
|
|
4617
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4618
|
+
};
|
|
4619
|
+
};
|
|
4620
|
+
/** @description `method_not_allowed` — that stablecoin is not enabled for this account. */
|
|
4621
|
+
403: {
|
|
4622
|
+
headers: {
|
|
4623
|
+
[name: string]: unknown;
|
|
4624
|
+
};
|
|
4625
|
+
content: {
|
|
4626
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4627
|
+
};
|
|
4628
|
+
};
|
|
4629
|
+
/** @description Client error. */
|
|
4630
|
+
"4XX": {
|
|
4631
|
+
headers: {
|
|
4632
|
+
[name: string]: unknown;
|
|
4633
|
+
};
|
|
4634
|
+
content: {
|
|
4635
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4636
|
+
};
|
|
4637
|
+
};
|
|
4638
|
+
/** @description Server or upstream bank error. */
|
|
4639
|
+
"5XX": {
|
|
4640
|
+
headers: {
|
|
4641
|
+
[name: string]: unknown;
|
|
4642
|
+
};
|
|
4643
|
+
content: {
|
|
4644
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4645
|
+
};
|
|
4646
|
+
};
|
|
4647
|
+
};
|
|
4648
|
+
};
|
|
4649
|
+
Crypto_createPayout: {
|
|
4650
|
+
parameters: {
|
|
4651
|
+
query?: never;
|
|
4652
|
+
header?: {
|
|
4653
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4654
|
+
"Idempotency-Key"?: string;
|
|
4655
|
+
};
|
|
4656
|
+
path?: never;
|
|
4657
|
+
cookie?: never;
|
|
4658
|
+
};
|
|
4659
|
+
requestBody: {
|
|
4660
|
+
content: {
|
|
4661
|
+
"application/json": components["schemas"]["CreateCryptoPayoutDto"];
|
|
4662
|
+
};
|
|
4663
|
+
};
|
|
4664
|
+
responses: {
|
|
4665
|
+
/** @description Idempotent replay of an existing payout. */
|
|
4666
|
+
200: {
|
|
4667
|
+
headers: {
|
|
4668
|
+
[name: string]: unknown;
|
|
4669
|
+
};
|
|
4670
|
+
content: {
|
|
4671
|
+
"application/json": components["schemas"]["CryptoPayoutDto"];
|
|
4672
|
+
};
|
|
4673
|
+
};
|
|
4674
|
+
/** @description Payout created. */
|
|
4675
|
+
201: {
|
|
4676
|
+
headers: {
|
|
4677
|
+
[name: string]: unknown;
|
|
4678
|
+
};
|
|
4679
|
+
content: {
|
|
4680
|
+
"application/json": components["schemas"]["CryptoPayoutDto"];
|
|
4681
|
+
};
|
|
4682
|
+
};
|
|
4683
|
+
/** @description `unsupported_currency`, `unsupported_network`, `invalid_address` or `invalid_data`. */
|
|
4684
|
+
400: {
|
|
4685
|
+
headers: {
|
|
4686
|
+
[name: string]: unknown;
|
|
4687
|
+
};
|
|
4688
|
+
content: {
|
|
4689
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4690
|
+
};
|
|
4691
|
+
};
|
|
4692
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4693
|
+
401: {
|
|
4694
|
+
headers: {
|
|
4695
|
+
[name: string]: unknown;
|
|
4696
|
+
};
|
|
4697
|
+
content: {
|
|
4698
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4699
|
+
};
|
|
4700
|
+
};
|
|
4701
|
+
/** @description `method_not_allowed` — that stablecoin is not enabled for this account. */
|
|
4702
|
+
403: {
|
|
4703
|
+
headers: {
|
|
4704
|
+
[name: string]: unknown;
|
|
4705
|
+
};
|
|
4706
|
+
content: {
|
|
4707
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4708
|
+
};
|
|
4709
|
+
};
|
|
4710
|
+
/** @description `idempotency_key_reused` with a different request. */
|
|
4711
|
+
409: {
|
|
4712
|
+
headers: {
|
|
4713
|
+
[name: string]: unknown;
|
|
4714
|
+
};
|
|
4715
|
+
content: {
|
|
4716
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4717
|
+
};
|
|
4718
|
+
};
|
|
4719
|
+
/** @description `insufficient_balance` or `amount_below_minimum`. */
|
|
4720
|
+
422: {
|
|
4721
|
+
headers: {
|
|
4722
|
+
[name: string]: unknown;
|
|
4723
|
+
};
|
|
4724
|
+
content: {
|
|
4725
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4726
|
+
};
|
|
4727
|
+
};
|
|
4728
|
+
/** @description Client error. */
|
|
4729
|
+
"4XX": {
|
|
4730
|
+
headers: {
|
|
4731
|
+
[name: string]: unknown;
|
|
4732
|
+
};
|
|
4733
|
+
content: {
|
|
4734
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4735
|
+
};
|
|
4736
|
+
};
|
|
4737
|
+
/** @description Server or upstream bank error. */
|
|
4738
|
+
"5XX": {
|
|
4739
|
+
headers: {
|
|
4740
|
+
[name: string]: unknown;
|
|
4741
|
+
};
|
|
4742
|
+
content: {
|
|
4743
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4744
|
+
};
|
|
4745
|
+
};
|
|
4746
|
+
};
|
|
4747
|
+
};
|
|
4748
|
+
Crypto_getPayout: {
|
|
4749
|
+
parameters: {
|
|
4750
|
+
query?: never;
|
|
4751
|
+
header?: never;
|
|
4752
|
+
path: {
|
|
4753
|
+
id: string;
|
|
4754
|
+
};
|
|
4755
|
+
cookie?: never;
|
|
4756
|
+
};
|
|
4757
|
+
requestBody?: never;
|
|
4758
|
+
responses: {
|
|
4759
|
+
200: {
|
|
4760
|
+
headers: {
|
|
4761
|
+
[name: string]: unknown;
|
|
4762
|
+
};
|
|
4763
|
+
content: {
|
|
4764
|
+
"application/json": components["schemas"]["CryptoPayoutDto"];
|
|
4765
|
+
};
|
|
4766
|
+
};
|
|
4767
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4768
|
+
401: {
|
|
4769
|
+
headers: {
|
|
4770
|
+
[name: string]: unknown;
|
|
4771
|
+
};
|
|
4772
|
+
content: {
|
|
4773
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4774
|
+
};
|
|
4775
|
+
};
|
|
4776
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
4777
|
+
403: {
|
|
4778
|
+
headers: {
|
|
4779
|
+
[name: string]: unknown;
|
|
4780
|
+
};
|
|
4781
|
+
content: {
|
|
4782
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4783
|
+
};
|
|
4784
|
+
};
|
|
4785
|
+
/** @description Client error. */
|
|
4786
|
+
"4XX": {
|
|
4787
|
+
headers: {
|
|
4788
|
+
[name: string]: unknown;
|
|
4789
|
+
};
|
|
4790
|
+
content: {
|
|
4791
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4792
|
+
};
|
|
4793
|
+
};
|
|
4794
|
+
/** @description Server or upstream bank error. */
|
|
4795
|
+
"5XX": {
|
|
4796
|
+
headers: {
|
|
4797
|
+
[name: string]: unknown;
|
|
4798
|
+
};
|
|
4799
|
+
content: {
|
|
4800
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4801
|
+
};
|
|
4802
|
+
};
|
|
4803
|
+
};
|
|
4804
|
+
};
|
|
4805
|
+
CopPayments_create: {
|
|
4806
|
+
parameters: {
|
|
4807
|
+
query?: never;
|
|
4808
|
+
header?: {
|
|
4809
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4810
|
+
"Idempotency-Key"?: string;
|
|
4811
|
+
};
|
|
4812
|
+
path?: never;
|
|
4813
|
+
cookie?: never;
|
|
4814
|
+
};
|
|
4815
|
+
requestBody: {
|
|
4816
|
+
content: {
|
|
4817
|
+
"application/json": components["schemas"]["CreateCopPaymentDto"];
|
|
4818
|
+
};
|
|
4819
|
+
};
|
|
4820
|
+
responses: {
|
|
4821
|
+
201: {
|
|
4822
|
+
headers: {
|
|
4823
|
+
[name: string]: unknown;
|
|
4824
|
+
};
|
|
4825
|
+
content: {
|
|
4826
|
+
"application/json": components["schemas"]["CopPaymentDto"];
|
|
4827
|
+
};
|
|
4828
|
+
};
|
|
4829
|
+
/** @description `invalid_data` (names the field) or `amount_out_of_range`. */
|
|
4830
|
+
400: {
|
|
4831
|
+
headers: {
|
|
4832
|
+
[name: string]: unknown;
|
|
4833
|
+
};
|
|
4834
|
+
content: {
|
|
4835
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4836
|
+
};
|
|
4837
|
+
};
|
|
4838
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4839
|
+
401: {
|
|
4840
|
+
headers: {
|
|
4841
|
+
[name: string]: unknown;
|
|
4842
|
+
};
|
|
4843
|
+
content: {
|
|
4844
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4845
|
+
};
|
|
4846
|
+
};
|
|
4847
|
+
/** @description `method_not_allowed` — COP is not enabled for this account. */
|
|
4848
|
+
403: {
|
|
4849
|
+
headers: {
|
|
4850
|
+
[name: string]: unknown;
|
|
4851
|
+
};
|
|
4852
|
+
content: {
|
|
4853
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4854
|
+
};
|
|
4855
|
+
};
|
|
4856
|
+
/** @description `processor_unavailable` — the payment network did not answer; read the payment before retrying. */
|
|
4857
|
+
502: {
|
|
4858
|
+
headers: {
|
|
4859
|
+
[name: string]: unknown;
|
|
4860
|
+
};
|
|
4861
|
+
content: {
|
|
4862
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4863
|
+
};
|
|
4864
|
+
};
|
|
4865
|
+
/** @description `method_unavailable` — the channel is not available right now. */
|
|
4866
|
+
503: {
|
|
4867
|
+
headers: {
|
|
4868
|
+
[name: string]: unknown;
|
|
4869
|
+
};
|
|
4870
|
+
content: {
|
|
4871
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4872
|
+
};
|
|
4873
|
+
};
|
|
4874
|
+
/** @description Client error. */
|
|
4875
|
+
"4XX": {
|
|
4876
|
+
headers: {
|
|
4877
|
+
[name: string]: unknown;
|
|
4878
|
+
};
|
|
4879
|
+
content: {
|
|
4880
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4881
|
+
};
|
|
4882
|
+
};
|
|
4883
|
+
/** @description Server or upstream bank error. */
|
|
4884
|
+
"5XX": {
|
|
4885
|
+
headers: {
|
|
4886
|
+
[name: string]: unknown;
|
|
4887
|
+
};
|
|
4888
|
+
content: {
|
|
4889
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
};
|
|
4893
|
+
};
|
|
4894
|
+
CopPayments_get: {
|
|
4895
|
+
parameters: {
|
|
4896
|
+
query?: never;
|
|
4897
|
+
header?: never;
|
|
4898
|
+
path: {
|
|
4899
|
+
id: string;
|
|
4900
|
+
};
|
|
4901
|
+
cookie?: never;
|
|
4902
|
+
};
|
|
4903
|
+
requestBody?: never;
|
|
4904
|
+
responses: {
|
|
4905
|
+
200: {
|
|
4906
|
+
headers: {
|
|
4907
|
+
[name: string]: unknown;
|
|
4908
|
+
};
|
|
4909
|
+
content: {
|
|
4910
|
+
"application/json": components["schemas"]["CopPaymentDto"];
|
|
4911
|
+
};
|
|
4912
|
+
};
|
|
4913
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
4914
|
+
401: {
|
|
4915
|
+
headers: {
|
|
4916
|
+
[name: string]: unknown;
|
|
4917
|
+
};
|
|
4918
|
+
content: {
|
|
4919
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4920
|
+
};
|
|
4921
|
+
};
|
|
4922
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
4923
|
+
403: {
|
|
4924
|
+
headers: {
|
|
4925
|
+
[name: string]: unknown;
|
|
4926
|
+
};
|
|
4927
|
+
content: {
|
|
4928
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4929
|
+
};
|
|
4930
|
+
};
|
|
4931
|
+
404: {
|
|
4932
|
+
headers: {
|
|
4933
|
+
[name: string]: unknown;
|
|
4934
|
+
};
|
|
4935
|
+
content: {
|
|
4936
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4937
|
+
};
|
|
4938
|
+
};
|
|
4939
|
+
/** @description Client error. */
|
|
4940
|
+
"4XX": {
|
|
4941
|
+
headers: {
|
|
4942
|
+
[name: string]: unknown;
|
|
4943
|
+
};
|
|
4944
|
+
content: {
|
|
4945
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4946
|
+
};
|
|
4947
|
+
};
|
|
4948
|
+
/** @description Server or upstream bank error. */
|
|
4949
|
+
"5XX": {
|
|
4950
|
+
headers: {
|
|
4951
|
+
[name: string]: unknown;
|
|
4952
|
+
};
|
|
4953
|
+
content: {
|
|
4954
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4955
|
+
};
|
|
4956
|
+
};
|
|
4957
|
+
};
|
|
4958
|
+
};
|
|
4959
|
+
CopPayments_submitOtp: {
|
|
4960
|
+
parameters: {
|
|
4961
|
+
query?: never;
|
|
4962
|
+
header?: {
|
|
4963
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4964
|
+
"Idempotency-Key"?: string;
|
|
4965
|
+
};
|
|
4966
|
+
path: {
|
|
4967
|
+
id: string;
|
|
4968
|
+
};
|
|
4161
4969
|
cookie?: never;
|
|
4162
4970
|
};
|
|
4163
|
-
requestBody
|
|
4971
|
+
requestBody: {
|
|
4972
|
+
content: {
|
|
4973
|
+
"application/json": components["schemas"]["SubmitCopOtpDto"];
|
|
4974
|
+
};
|
|
4975
|
+
};
|
|
4164
4976
|
responses: {
|
|
4165
4977
|
200: {
|
|
4166
4978
|
headers: {
|
|
4167
4979
|
[name: string]: unknown;
|
|
4168
4980
|
};
|
|
4169
4981
|
content: {
|
|
4170
|
-
"application/json": components["schemas"]["
|
|
4982
|
+
"application/json": components["schemas"]["CopPaymentDto"];
|
|
4171
4983
|
};
|
|
4172
4984
|
};
|
|
4173
|
-
/** @description `
|
|
4985
|
+
/** @description `invalid_otp` — the payment stays pending until it expires. */
|
|
4174
4986
|
400: {
|
|
4175
4987
|
headers: {
|
|
4176
4988
|
[name: string]: unknown;
|
|
@@ -4188,7 +5000,7 @@ interface operations {
|
|
|
4188
5000
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4189
5001
|
};
|
|
4190
5002
|
};
|
|
4191
|
-
/** @description `
|
|
5003
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
4192
5004
|
403: {
|
|
4193
5005
|
headers: {
|
|
4194
5006
|
[name: string]: unknown;
|
|
@@ -4197,6 +5009,23 @@ interface operations {
|
|
|
4197
5009
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4198
5010
|
};
|
|
4199
5011
|
};
|
|
5012
|
+
404: {
|
|
5013
|
+
headers: {
|
|
5014
|
+
[name: string]: unknown;
|
|
5015
|
+
};
|
|
5016
|
+
content: {
|
|
5017
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5018
|
+
};
|
|
5019
|
+
};
|
|
5020
|
+
/** @description `invalid_state` — not a pending Daviplata payment. */
|
|
5021
|
+
409: {
|
|
5022
|
+
headers: {
|
|
5023
|
+
[name: string]: unknown;
|
|
5024
|
+
};
|
|
5025
|
+
content: {
|
|
5026
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5027
|
+
};
|
|
5028
|
+
};
|
|
4200
5029
|
/** @description Client error. */
|
|
4201
5030
|
"4XX": {
|
|
4202
5031
|
headers: {
|
|
@@ -4217,11 +5046,16 @@ interface operations {
|
|
|
4217
5046
|
};
|
|
4218
5047
|
};
|
|
4219
5048
|
};
|
|
4220
|
-
|
|
5049
|
+
CopPayments_cancel: {
|
|
4221
5050
|
parameters: {
|
|
4222
5051
|
query?: never;
|
|
4223
|
-
header?:
|
|
4224
|
-
|
|
5052
|
+
header?: {
|
|
5053
|
+
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
5054
|
+
"Idempotency-Key"?: string;
|
|
5055
|
+
};
|
|
5056
|
+
path: {
|
|
5057
|
+
id: string;
|
|
5058
|
+
};
|
|
4225
5059
|
cookie?: never;
|
|
4226
5060
|
};
|
|
4227
5061
|
requestBody?: never;
|
|
@@ -4231,7 +5065,7 @@ interface operations {
|
|
|
4231
5065
|
[name: string]: unknown;
|
|
4232
5066
|
};
|
|
4233
5067
|
content: {
|
|
4234
|
-
"application/json": components["schemas"]["
|
|
5068
|
+
"application/json": components["schemas"]["CopPaymentDto"];
|
|
4235
5069
|
};
|
|
4236
5070
|
};
|
|
4237
5071
|
/** @description Missing, invalid, or inactive tenant API key. */
|
|
@@ -4252,6 +5086,23 @@ interface operations {
|
|
|
4252
5086
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4253
5087
|
};
|
|
4254
5088
|
};
|
|
5089
|
+
404: {
|
|
5090
|
+
headers: {
|
|
5091
|
+
[name: string]: unknown;
|
|
5092
|
+
};
|
|
5093
|
+
content: {
|
|
5094
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5095
|
+
};
|
|
5096
|
+
};
|
|
5097
|
+
/** @description `invalid_state` — the payment is not pending. */
|
|
5098
|
+
409: {
|
|
5099
|
+
headers: {
|
|
5100
|
+
[name: string]: unknown;
|
|
5101
|
+
};
|
|
5102
|
+
content: {
|
|
5103
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5104
|
+
};
|
|
5105
|
+
};
|
|
4255
5106
|
/** @description Client error. */
|
|
4256
5107
|
"4XX": {
|
|
4257
5108
|
headers: {
|
|
@@ -4272,32 +5123,30 @@ interface operations {
|
|
|
4272
5123
|
};
|
|
4273
5124
|
};
|
|
4274
5125
|
};
|
|
4275
|
-
|
|
5126
|
+
CopPayments_refund: {
|
|
4276
5127
|
parameters: {
|
|
4277
5128
|
query?: never;
|
|
4278
5129
|
header?: {
|
|
4279
5130
|
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4280
5131
|
"Idempotency-Key"?: string;
|
|
4281
5132
|
};
|
|
4282
|
-
path
|
|
4283
|
-
|
|
4284
|
-
};
|
|
4285
|
-
requestBody: {
|
|
4286
|
-
content: {
|
|
4287
|
-
"application/json": components["schemas"]["CreateDepositAddressDto"];
|
|
5133
|
+
path: {
|
|
5134
|
+
id: string;
|
|
4288
5135
|
};
|
|
5136
|
+
cookie?: never;
|
|
4289
5137
|
};
|
|
5138
|
+
requestBody?: never;
|
|
4290
5139
|
responses: {
|
|
4291
5140
|
200: {
|
|
4292
5141
|
headers: {
|
|
4293
5142
|
[name: string]: unknown;
|
|
4294
5143
|
};
|
|
4295
5144
|
content: {
|
|
4296
|
-
"application/json": components["schemas"]["
|
|
5145
|
+
"application/json": components["schemas"]["CopPaymentDto"];
|
|
4297
5146
|
};
|
|
4298
5147
|
};
|
|
4299
|
-
/** @description
|
|
4300
|
-
|
|
5148
|
+
/** @description Missing, invalid, or inactive tenant API key. */
|
|
5149
|
+
401: {
|
|
4301
5150
|
headers: {
|
|
4302
5151
|
[name: string]: unknown;
|
|
4303
5152
|
};
|
|
@@ -4305,8 +5154,8 @@ interface operations {
|
|
|
4305
5154
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4306
5155
|
};
|
|
4307
5156
|
};
|
|
4308
|
-
/** @description
|
|
4309
|
-
|
|
5157
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
5158
|
+
403: {
|
|
4310
5159
|
headers: {
|
|
4311
5160
|
[name: string]: unknown;
|
|
4312
5161
|
};
|
|
@@ -4314,8 +5163,16 @@ interface operations {
|
|
|
4314
5163
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4315
5164
|
};
|
|
4316
5165
|
};
|
|
4317
|
-
|
|
4318
|
-
|
|
5166
|
+
404: {
|
|
5167
|
+
headers: {
|
|
5168
|
+
[name: string]: unknown;
|
|
5169
|
+
};
|
|
5170
|
+
content: {
|
|
5171
|
+
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5172
|
+
};
|
|
5173
|
+
};
|
|
5174
|
+
/** @description `invalid_state`, `refund_window_expired` or `insufficient_balance`. */
|
|
5175
|
+
409: {
|
|
4319
5176
|
headers: {
|
|
4320
5177
|
[name: string]: unknown;
|
|
4321
5178
|
};
|
|
@@ -4343,14 +5200,9 @@ interface operations {
|
|
|
4343
5200
|
};
|
|
4344
5201
|
};
|
|
4345
5202
|
};
|
|
4346
|
-
|
|
5203
|
+
CopPayments_balance: {
|
|
4347
5204
|
parameters: {
|
|
4348
|
-
query?:
|
|
4349
|
-
/** @description Alias of `amount`. */
|
|
4350
|
-
amountUsdt?: string;
|
|
4351
|
-
currency?: "USDT" | "USDC";
|
|
4352
|
-
amount?: string;
|
|
4353
|
-
};
|
|
5205
|
+
query?: never;
|
|
4354
5206
|
header?: never;
|
|
4355
5207
|
path?: never;
|
|
4356
5208
|
cookie?: never;
|
|
@@ -4362,16 +5214,7 @@ interface operations {
|
|
|
4362
5214
|
[name: string]: unknown;
|
|
4363
5215
|
};
|
|
4364
5216
|
content: {
|
|
4365
|
-
"application/json": components["schemas"]["
|
|
4366
|
-
};
|
|
4367
|
-
};
|
|
4368
|
-
/** @description `unsupported_currency`. */
|
|
4369
|
-
400: {
|
|
4370
|
-
headers: {
|
|
4371
|
-
[name: string]: unknown;
|
|
4372
|
-
};
|
|
4373
|
-
content: {
|
|
4374
|
-
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5217
|
+
"application/json": components["schemas"]["CopBalanceDto"];
|
|
4375
5218
|
};
|
|
4376
5219
|
};
|
|
4377
5220
|
/** @description Missing, invalid, or inactive tenant API key. */
|
|
@@ -4383,7 +5226,7 @@ interface operations {
|
|
|
4383
5226
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4384
5227
|
};
|
|
4385
5228
|
};
|
|
4386
|
-
/** @description `method_not_allowed` —
|
|
5229
|
+
/** @description `method_not_allowed` — COP is not enabled for this account. */
|
|
4387
5230
|
403: {
|
|
4388
5231
|
headers: {
|
|
4389
5232
|
[name: string]: unknown;
|
|
@@ -4412,47 +5255,21 @@ interface operations {
|
|
|
4412
5255
|
};
|
|
4413
5256
|
};
|
|
4414
5257
|
};
|
|
4415
|
-
|
|
5258
|
+
ConversionSettings_get: {
|
|
4416
5259
|
parameters: {
|
|
4417
5260
|
query?: never;
|
|
4418
|
-
header?:
|
|
4419
|
-
/** @description Optional. Same key + same body within 24h replays the stored response (`Idempotent-Replayed: true`); a different body returns 409 `idempotency_key_reused`. */
|
|
4420
|
-
"Idempotency-Key"?: string;
|
|
4421
|
-
};
|
|
5261
|
+
header?: never;
|
|
4422
5262
|
path?: never;
|
|
4423
5263
|
cookie?: never;
|
|
4424
5264
|
};
|
|
4425
|
-
requestBody
|
|
4426
|
-
content: {
|
|
4427
|
-
"application/json": components["schemas"]["CreateCryptoPayoutDto"];
|
|
4428
|
-
};
|
|
4429
|
-
};
|
|
5265
|
+
requestBody?: never;
|
|
4430
5266
|
responses: {
|
|
4431
|
-
/** @description Idempotent replay of an existing payout. */
|
|
4432
5267
|
200: {
|
|
4433
5268
|
headers: {
|
|
4434
5269
|
[name: string]: unknown;
|
|
4435
5270
|
};
|
|
4436
5271
|
content: {
|
|
4437
|
-
"application/json": components["schemas"]["
|
|
4438
|
-
};
|
|
4439
|
-
};
|
|
4440
|
-
/** @description Payout created. */
|
|
4441
|
-
201: {
|
|
4442
|
-
headers: {
|
|
4443
|
-
[name: string]: unknown;
|
|
4444
|
-
};
|
|
4445
|
-
content: {
|
|
4446
|
-
"application/json": components["schemas"]["CryptoPayoutDto"];
|
|
4447
|
-
};
|
|
4448
|
-
};
|
|
4449
|
-
/** @description `unsupported_currency`, `unsupported_network`, `invalid_address` or `invalid_data`. */
|
|
4450
|
-
400: {
|
|
4451
|
-
headers: {
|
|
4452
|
-
[name: string]: unknown;
|
|
4453
|
-
};
|
|
4454
|
-
content: {
|
|
4455
|
-
"application/json": components["schemas"]["ApiErrorDto"];
|
|
5272
|
+
"application/json": components["schemas"]["ConversionSettingsDto"];
|
|
4456
5273
|
};
|
|
4457
5274
|
};
|
|
4458
5275
|
/** @description Missing, invalid, or inactive tenant API key. */
|
|
@@ -4464,7 +5281,7 @@ interface operations {
|
|
|
4464
5281
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4465
5282
|
};
|
|
4466
5283
|
};
|
|
4467
|
-
/** @description `
|
|
5284
|
+
/** @description Live mode not activated (`live_mode_not_activated`): the live account is pending VEX Pay review or suspended. Test keys are unaffected. */
|
|
4468
5285
|
403: {
|
|
4469
5286
|
headers: {
|
|
4470
5287
|
[name: string]: unknown;
|
|
@@ -4473,24 +5290,6 @@ interface operations {
|
|
|
4473
5290
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4474
5291
|
};
|
|
4475
5292
|
};
|
|
4476
|
-
/** @description `idempotency_key_reused` with a different request. */
|
|
4477
|
-
409: {
|
|
4478
|
-
headers: {
|
|
4479
|
-
[name: string]: unknown;
|
|
4480
|
-
};
|
|
4481
|
-
content: {
|
|
4482
|
-
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4483
|
-
};
|
|
4484
|
-
};
|
|
4485
|
-
/** @description `insufficient_balance` or `amount_below_minimum`. */
|
|
4486
|
-
422: {
|
|
4487
|
-
headers: {
|
|
4488
|
-
[name: string]: unknown;
|
|
4489
|
-
};
|
|
4490
|
-
content: {
|
|
4491
|
-
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4492
|
-
};
|
|
4493
|
-
};
|
|
4494
5293
|
/** @description Client error. */
|
|
4495
5294
|
"4XX": {
|
|
4496
5295
|
headers: {
|
|
@@ -4511,23 +5310,34 @@ interface operations {
|
|
|
4511
5310
|
};
|
|
4512
5311
|
};
|
|
4513
5312
|
};
|
|
4514
|
-
|
|
5313
|
+
ConversionSettings_update: {
|
|
4515
5314
|
parameters: {
|
|
4516
5315
|
query?: never;
|
|
4517
5316
|
header?: never;
|
|
4518
|
-
path
|
|
4519
|
-
id: string;
|
|
4520
|
-
};
|
|
5317
|
+
path?: never;
|
|
4521
5318
|
cookie?: never;
|
|
4522
5319
|
};
|
|
4523
|
-
requestBody
|
|
5320
|
+
requestBody: {
|
|
5321
|
+
content: {
|
|
5322
|
+
"application/json": components["schemas"]["UpdateConversionSettingsDto"];
|
|
5323
|
+
};
|
|
5324
|
+
};
|
|
4524
5325
|
responses: {
|
|
4525
5326
|
200: {
|
|
4526
5327
|
headers: {
|
|
4527
5328
|
[name: string]: unknown;
|
|
4528
5329
|
};
|
|
4529
5330
|
content: {
|
|
4530
|
-
"application/json": components["schemas"]["
|
|
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"];
|
|
4531
5341
|
};
|
|
4532
5342
|
};
|
|
4533
5343
|
/** @description Missing, invalid, or inactive tenant API key. */
|
|
@@ -4539,7 +5349,7 @@ interface operations {
|
|
|
4539
5349
|
"application/json": components["schemas"]["ApiErrorDto"];
|
|
4540
5350
|
};
|
|
4541
5351
|
};
|
|
4542
|
-
/** @description
|
|
5352
|
+
/** @description `conversions_not_enabled` — COP conversions are not allowed for this account. */
|
|
4543
5353
|
403: {
|
|
4544
5354
|
headers: {
|
|
4545
5355
|
[name: string]: unknown;
|
|
@@ -4663,6 +5473,7 @@ interface operations {
|
|
|
4663
5473
|
status?: "PENDING" | "COMPLETED" | "CANCELED";
|
|
4664
5474
|
cursor?: string;
|
|
4665
5475
|
limit?: string;
|
|
5476
|
+
sourceCurrency?: "VES" | "COP";
|
|
4666
5477
|
};
|
|
4667
5478
|
header?: never;
|
|
4668
5479
|
path?: never;
|
|
@@ -5273,7 +6084,7 @@ interface operations {
|
|
|
5273
6084
|
"application/json": components["schemas"]["PaymentReceiptDto"];
|
|
5274
6085
|
};
|
|
5275
6086
|
};
|
|
5276
|
-
/** @description Invalid
|
|
6087
|
+
/** @description Invalid body, or a VPOS test card sent with a Live key (test_card_in_live_mode). */
|
|
5277
6088
|
400: {
|
|
5278
6089
|
headers: {
|
|
5279
6090
|
[name: string]: unknown;
|
|
@@ -8228,7 +9039,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8228
9039
|
id: string;
|
|
8229
9040
|
tenantId: string;
|
|
8230
9041
|
url: string;
|
|
8231
|
-
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")[];
|
|
8232
9043
|
isActive: boolean;
|
|
8233
9044
|
createdAt: string;
|
|
8234
9045
|
secret?: string;
|
|
@@ -8237,7 +9048,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8237
9048
|
id: string;
|
|
8238
9049
|
tenantId: string;
|
|
8239
9050
|
url: string;
|
|
8240
|
-
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")[];
|
|
8241
9052
|
isActive: boolean;
|
|
8242
9053
|
createdAt: string;
|
|
8243
9054
|
secret?: string;
|
|
@@ -8246,7 +9057,7 @@ declare class WebhookEndpoints extends APIResource {
|
|
|
8246
9057
|
id: string;
|
|
8247
9058
|
tenantId: string;
|
|
8248
9059
|
url: string;
|
|
8249
|
-
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")[];
|
|
8250
9061
|
isActive: boolean;
|
|
8251
9062
|
createdAt: string;
|
|
8252
9063
|
secret?: string;
|
|
@@ -8404,9 +9215,12 @@ declare class PaymentLinks extends APIResource {
|
|
|
8404
9215
|
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
8405
9216
|
}
|
|
8406
9217
|
|
|
8407
|
-
/** 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. */
|
|
8408
9219
|
declare class ConversionQuotes extends APIResource {
|
|
8409
|
-
/**
|
|
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
|
+
*/
|
|
8410
9224
|
create(params: RequestBody<'Conversions_createQuote'>, options?: RequestOptions): Promise<{
|
|
8411
9225
|
id: string;
|
|
8412
9226
|
object: string;
|
|
@@ -8414,18 +9228,44 @@ declare class ConversionQuotes extends APIResource {
|
|
|
8414
9228
|
marketRate: string;
|
|
8415
9229
|
spreadPercent: string;
|
|
8416
9230
|
rateSource: "market";
|
|
8417
|
-
|
|
9231
|
+
sourceCurrency: "VES" | "COP";
|
|
9232
|
+
sourceAmount: string;
|
|
9233
|
+
sourceAmountVes: string | null;
|
|
8418
9234
|
targetAmountUsdt: string;
|
|
8419
9235
|
expiresAt: string;
|
|
8420
9236
|
createdAt: string;
|
|
8421
9237
|
}>;
|
|
8422
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
|
+
}
|
|
8423
9261
|
/**
|
|
8424
|
-
* Convert available VES into your USDT balance. Accepting a quote debits the
|
|
8425
|
-
* 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.
|
|
8426
9265
|
*/
|
|
8427
9266
|
declare class Conversions extends APIResource {
|
|
8428
9267
|
readonly quotes: ConversionQuotes;
|
|
9268
|
+
readonly settings: ConversionSettings;
|
|
8429
9269
|
/** Accept a quote (`quoteId`). Pass `idempotencyKey` in options to retry safely. */
|
|
8430
9270
|
create(params: RequestBody<'Conversions_create'>, options?: RequestOptions): Promise<{
|
|
8431
9271
|
id: string;
|
|
@@ -8436,8 +9276,12 @@ declare class Conversions extends APIResource {
|
|
|
8436
9276
|
marketRate: string;
|
|
8437
9277
|
spreadPercent: string;
|
|
8438
9278
|
rateSource: "market";
|
|
8439
|
-
|
|
9279
|
+
sourceCurrency: "VES" | "COP";
|
|
9280
|
+
sourceAmount: string;
|
|
9281
|
+
sourceAmountVes: string | null;
|
|
8440
9282
|
targetAmountUsdt: string;
|
|
9283
|
+
origin: "api" | "auto";
|
|
9284
|
+
paymentId: string | null;
|
|
8441
9285
|
createdAt: string;
|
|
8442
9286
|
completedAt: string | null;
|
|
8443
9287
|
canceledAt: string | null;
|
|
@@ -8452,14 +9296,18 @@ declare class Conversions extends APIResource {
|
|
|
8452
9296
|
marketRate: string;
|
|
8453
9297
|
spreadPercent: string;
|
|
8454
9298
|
rateSource: "market";
|
|
8455
|
-
|
|
9299
|
+
sourceCurrency: "VES" | "COP";
|
|
9300
|
+
sourceAmount: string;
|
|
9301
|
+
sourceAmountVes: string | null;
|
|
8456
9302
|
targetAmountUsdt: string;
|
|
9303
|
+
origin: "api" | "auto";
|
|
9304
|
+
paymentId: string | null;
|
|
8457
9305
|
createdAt: string;
|
|
8458
9306
|
completedAt: string | null;
|
|
8459
9307
|
canceledAt: string | null;
|
|
8460
9308
|
cancelReason: string | null;
|
|
8461
9309
|
}>;
|
|
8462
|
-
/** 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`. */
|
|
8463
9311
|
list(params?: QueryParams<'Conversions_list'>, options?: RequestOptions): PagePromise<{
|
|
8464
9312
|
items: components["schemas"]["ConversionDto"][];
|
|
8465
9313
|
nextCursor: string | null;
|
|
@@ -8472,14 +9320,18 @@ declare class Conversions extends APIResource {
|
|
|
8472
9320
|
marketRate: string;
|
|
8473
9321
|
spreadPercent: string;
|
|
8474
9322
|
rateSource: "market";
|
|
8475
|
-
|
|
9323
|
+
sourceCurrency: "VES" | "COP";
|
|
9324
|
+
sourceAmount: string;
|
|
9325
|
+
sourceAmountVes: string | null;
|
|
8476
9326
|
targetAmountUsdt: string;
|
|
9327
|
+
origin: "api" | "auto";
|
|
9328
|
+
paymentId: string | null;
|
|
8477
9329
|
createdAt: string;
|
|
8478
9330
|
completedAt: string | null;
|
|
8479
9331
|
canceledAt: string | null;
|
|
8480
9332
|
cancelReason: string | null;
|
|
8481
9333
|
}>;
|
|
8482
|
-
/** 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. */
|
|
8483
9335
|
cancel(id: string, options?: RequestOptions): Promise<{
|
|
8484
9336
|
id: string;
|
|
8485
9337
|
object: string;
|
|
@@ -8489,8 +9341,12 @@ declare class Conversions extends APIResource {
|
|
|
8489
9341
|
marketRate: string;
|
|
8490
9342
|
spreadPercent: string;
|
|
8491
9343
|
rateSource: "market";
|
|
8492
|
-
|
|
9344
|
+
sourceCurrency: "VES" | "COP";
|
|
9345
|
+
sourceAmount: string;
|
|
9346
|
+
sourceAmountVes: string | null;
|
|
8493
9347
|
targetAmountUsdt: string;
|
|
9348
|
+
origin: "api" | "auto";
|
|
9349
|
+
paymentId: string | null;
|
|
8494
9350
|
createdAt: string;
|
|
8495
9351
|
completedAt: string | null;
|
|
8496
9352
|
canceledAt: string | null;
|
|
@@ -8498,6 +9354,130 @@ declare class Conversions extends APIResource {
|
|
|
8498
9354
|
}>;
|
|
8499
9355
|
}
|
|
8500
9356
|
|
|
9357
|
+
/**
|
|
9358
|
+
* Colombian peso payments: Bre-B (QR / transfer key), Nequi (push approval) or Daviplata (SMS
|
|
9359
|
+
* code). Payments complete asynchronously — listen for `payment.completed` / `payment.failed`.
|
|
9360
|
+
* COP must be enabled on your account (403 `method_not_allowed` otherwise).
|
|
9361
|
+
*/
|
|
9362
|
+
declare class CopPayments extends APIResource {
|
|
9363
|
+
/**
|
|
9364
|
+
* Create a payment in whole pesos. `buyer` is required for `nequi` and `daviplata`. The response
|
|
9365
|
+
* `next` says what the buyer does: `show_qr`, `approve_in_app` or `submit_otp`.
|
|
9366
|
+
* Pass `idempotencyKey` in options to retry safely.
|
|
9367
|
+
*/
|
|
9368
|
+
create(params: RequestBody<'CopPayments_create'>, options?: RequestOptions): Promise<{
|
|
9369
|
+
id: string;
|
|
9370
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
9371
|
+
method: "COP";
|
|
9372
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
9373
|
+
amountCop: number;
|
|
9374
|
+
feeCop?: number;
|
|
9375
|
+
amountUsd?: string;
|
|
9376
|
+
copRate?: string;
|
|
9377
|
+
reference?: string;
|
|
9378
|
+
metadata: {
|
|
9379
|
+
[key: string]: string;
|
|
9380
|
+
};
|
|
9381
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
9382
|
+
expiresAt?: string;
|
|
9383
|
+
createdAt: string;
|
|
9384
|
+
completedAt?: string;
|
|
9385
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
9386
|
+
}>;
|
|
9387
|
+
retrieve(id: string, options?: RequestOptions): Promise<{
|
|
9388
|
+
id: string;
|
|
9389
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
9390
|
+
method: "COP";
|
|
9391
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
9392
|
+
amountCop: number;
|
|
9393
|
+
feeCop?: number;
|
|
9394
|
+
amountUsd?: string;
|
|
9395
|
+
copRate?: string;
|
|
9396
|
+
reference?: string;
|
|
9397
|
+
metadata: {
|
|
9398
|
+
[key: string]: string;
|
|
9399
|
+
};
|
|
9400
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
9401
|
+
expiresAt?: string;
|
|
9402
|
+
createdAt: string;
|
|
9403
|
+
completedAt?: string;
|
|
9404
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
9405
|
+
}>;
|
|
9406
|
+
/** Daviplata: submit the code the buyer received by SMS. A wrong code fails with `invalid_otp`. */
|
|
9407
|
+
submitOtp(id: string, params: RequestBody<'CopPayments_submitOtp'>, options?: RequestOptions): Promise<{
|
|
9408
|
+
id: string;
|
|
9409
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
9410
|
+
method: "COP";
|
|
9411
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
9412
|
+
amountCop: number;
|
|
9413
|
+
feeCop?: number;
|
|
9414
|
+
amountUsd?: string;
|
|
9415
|
+
copRate?: string;
|
|
9416
|
+
reference?: string;
|
|
9417
|
+
metadata: {
|
|
9418
|
+
[key: string]: string;
|
|
9419
|
+
};
|
|
9420
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
9421
|
+
expiresAt?: string;
|
|
9422
|
+
createdAt: string;
|
|
9423
|
+
completedAt?: string;
|
|
9424
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
9425
|
+
}>;
|
|
9426
|
+
/** Cancel a pending payment. */
|
|
9427
|
+
cancel(id: string, options?: RequestOptions): Promise<{
|
|
9428
|
+
id: string;
|
|
9429
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
9430
|
+
method: "COP";
|
|
9431
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
9432
|
+
amountCop: number;
|
|
9433
|
+
feeCop?: number;
|
|
9434
|
+
amountUsd?: string;
|
|
9435
|
+
copRate?: string;
|
|
9436
|
+
reference?: string;
|
|
9437
|
+
metadata: {
|
|
9438
|
+
[key: string]: string;
|
|
9439
|
+
};
|
|
9440
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
9441
|
+
expiresAt?: string;
|
|
9442
|
+
createdAt: string;
|
|
9443
|
+
completedAt?: string;
|
|
9444
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
9445
|
+
}>;
|
|
9446
|
+
/** Full refund of a completed payment, within 96 hours. */
|
|
9447
|
+
refund(id: string, options?: RequestOptions): Promise<{
|
|
9448
|
+
id: string;
|
|
9449
|
+
status: "pending" | "completed" | "failed" | "canceled" | "refunded";
|
|
9450
|
+
method: "COP";
|
|
9451
|
+
channel: "breb" | "nequi" | "daviplata";
|
|
9452
|
+
amountCop: number;
|
|
9453
|
+
feeCop?: number;
|
|
9454
|
+
amountUsd?: string;
|
|
9455
|
+
copRate?: string;
|
|
9456
|
+
reference?: string;
|
|
9457
|
+
metadata: {
|
|
9458
|
+
[key: string]: string;
|
|
9459
|
+
};
|
|
9460
|
+
failureCode?: "expired" | "rejected" | "processor_error" | "processor_unknown";
|
|
9461
|
+
expiresAt?: string;
|
|
9462
|
+
createdAt: string;
|
|
9463
|
+
completedAt?: string;
|
|
9464
|
+
next?: components["schemas"]["CopNextActionDto"];
|
|
9465
|
+
}>;
|
|
9466
|
+
}
|
|
9467
|
+
/** Your COP balance, in whole pesos. Kept apart from VES and stablecoins. */
|
|
9468
|
+
declare class CopBalance extends APIResource {
|
|
9469
|
+
retrieve(options?: RequestOptions): Promise<{
|
|
9470
|
+
availableCop: number;
|
|
9471
|
+
pendingPayoutCop: number;
|
|
9472
|
+
asOf: string;
|
|
9473
|
+
}>;
|
|
9474
|
+
}
|
|
9475
|
+
/** Collect Colombian pesos (Bre-B, Nequi, Daviplata). */
|
|
9476
|
+
declare class Cop extends APIResource {
|
|
9477
|
+
readonly payments: CopPayments;
|
|
9478
|
+
readonly balance: CopBalance;
|
|
9479
|
+
}
|
|
9480
|
+
|
|
8501
9481
|
/** One stablecoin balance (`currency`: USDT by default, or USDC). Never converted to VES. */
|
|
8502
9482
|
declare class CryptoBalance extends APIResource {
|
|
8503
9483
|
retrieve(params?: QueryParams<'Crypto_getBalance'>, options?: RequestOptions): Promise<{
|
|
@@ -9142,14 +10122,15 @@ declare class Payments extends APIResource {
|
|
|
9142
10122
|
}>;
|
|
9143
10123
|
}
|
|
9144
10124
|
|
|
9145
|
-
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"];
|
|
9146
10126
|
type WebhookEventName = (typeof WEBHOOK_EVENT_NAMES)[number];
|
|
9147
10127
|
/** `data` of every `payment.*` event. */
|
|
9148
10128
|
interface PaymentWebhookData {
|
|
9149
10129
|
paymentId: string;
|
|
9150
10130
|
externalRef?: string;
|
|
9151
10131
|
status: 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELED' | 'REVERSED';
|
|
9152
|
-
|
|
10132
|
+
/** `COP` payments carry a different shape: narrow on `method === 'COP'` and read them as {@link CopPaymentWebhookData}. */
|
|
10133
|
+
method: 'C2P' | 'VPOS' | 'PAGO_MOVIL' | 'DEBITO_INMEDIATO' | 'COP';
|
|
9153
10134
|
usdAmount: number;
|
|
9154
10135
|
vesAmount: number;
|
|
9155
10136
|
bcvRate: number;
|
|
@@ -9181,6 +10162,37 @@ interface PaymentWebhookData {
|
|
|
9181
10162
|
metadata: Record<string, string>;
|
|
9182
10163
|
};
|
|
9183
10164
|
}
|
|
10165
|
+
/**
|
|
10166
|
+
* `payment.*` data for a Colombian peso payment (`method: "COP"`). Amounts are whole pesos.
|
|
10167
|
+
* `amountUsd` and `copRate` are present only for hosted-checkout payments.
|
|
10168
|
+
*/
|
|
10169
|
+
interface CopPaymentWebhookData {
|
|
10170
|
+
id: string;
|
|
10171
|
+
paymentId: string;
|
|
10172
|
+
method: 'COP';
|
|
10173
|
+
currency: 'COP';
|
|
10174
|
+
status: 'pending' | 'completed' | 'failed' | 'canceled' | 'refunded';
|
|
10175
|
+
channel: 'breb' | 'nequi' | 'daviplata';
|
|
10176
|
+
amountCop: number;
|
|
10177
|
+
feeCop?: number;
|
|
10178
|
+
amountUsd?: string;
|
|
10179
|
+
copRate?: string;
|
|
10180
|
+
reference?: string;
|
|
10181
|
+
externalRef?: string;
|
|
10182
|
+
metadata: Record<string, string>;
|
|
10183
|
+
failureCode?: 'expired' | 'rejected' | 'processor_error' | 'processor_unknown';
|
|
10184
|
+
expiresAt?: string;
|
|
10185
|
+
createdAt: string;
|
|
10186
|
+
completedAt?: string;
|
|
10187
|
+
tenantName: string;
|
|
10188
|
+
livemode: boolean;
|
|
10189
|
+
/** Present when the payment came from a checkout session. */
|
|
10190
|
+
checkoutSession?: {
|
|
10191
|
+
id: string;
|
|
10192
|
+
reference: string | null;
|
|
10193
|
+
metadata: Record<string, string>;
|
|
10194
|
+
};
|
|
10195
|
+
}
|
|
9184
10196
|
type PaymentEventName = Extract<WebhookEventName, `payment.${string}`>;
|
|
9185
10197
|
/** A verified webhook delivery, discriminated by `event`. */
|
|
9186
10198
|
type WebhookEvent = {
|
|
@@ -9238,6 +10250,8 @@ declare class VexPay {
|
|
|
9238
10250
|
readonly crypto: Crypto;
|
|
9239
10251
|
/** Convert available VES to USDT (enabled per account). */
|
|
9240
10252
|
readonly conversions: Conversions;
|
|
10253
|
+
/** Colombian pesos: Bre-B, Nequi and Daviplata payments and the COP balance. */
|
|
10254
|
+
readonly cop: Cop;
|
|
9241
10255
|
readonly products: Products;
|
|
9242
10256
|
readonly paymentLinks: PaymentLinks;
|
|
9243
10257
|
readonly tenantPayoutAccount: TenantPayoutAccount;
|
|
@@ -9295,6 +10309,6 @@ declare class VexPayTimeoutError extends VexPayConnectionError {
|
|
|
9295
10309
|
declare class VexPaySignatureVerificationError extends VexPayError {
|
|
9296
10310
|
}
|
|
9297
10311
|
|
|
9298
|
-
declare const VERSION = "0.
|
|
10312
|
+
declare const VERSION = "0.7.0";
|
|
9299
10313
|
|
|
9300
|
-
export { 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 };
|
|
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 };
|