@cobo/cobo-waas2 1.27.0 → 1.28.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 +33 -1
- package/dist/ApiClient.js +1 -1
- package/dist/api/AddressBooksApi.js +2 -2
- package/dist/api/AutoSweepApi.js +4 -4
- package/dist/api/OAuthApi.js +4 -4
- package/dist/api/PaymentApi.js +491 -36
- package/dist/api/StakingsApi.js +44 -2
- package/dist/api/SwapsApi.js +2 -2
- package/dist/api/TransactionsApi.js +6 -6
- package/dist/api/WalletsApi.js +14 -14
- package/dist/index.js +154 -0
- package/dist/model/AddressesEventData.js +8 -3
- package/dist/model/AllocationRecord.js +193 -0
- package/dist/model/AllocationRequest.js +167 -0
- package/dist/model/BabylonCreateStakingExpansion.js +157 -0
- package/dist/model/BabylonStakeExtra.js +26 -0
- package/dist/model/BabylonStakingRegistration.js +1 -1
- package/dist/model/BalanceUpdateInfoEventData.js +8 -3
- package/dist/model/BatchAllocation.js +190 -0
- package/dist/model/BatchAllocationDetail.js +188 -0
- package/dist/model/ChainsEventData.js +8 -3
- package/dist/model/ComplianceDispositionUpdateEventData.js +8 -3
- package/dist/model/ComplianceKytScreeningsUpdateEventData.js +8 -3
- package/dist/model/ContractCallDestination.js +42 -8
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/CosmosContractCallDestination.js +0 -13
- package/dist/model/CreateBatchAllocationRequest.js +142 -0
- package/dist/model/CreateCustodialWalletParams.js +1 -1
- package/dist/model/CreateExchangeWalletParams.js +2 -2
- package/dist/model/CreateMerchantRequest.js +1 -1
- package/dist/model/CreateMpcWalletParams.js +2 -2
- package/dist/model/CreatePaymentOrderRequest.js +115 -68
- package/dist/model/CreatePayoutRequest.js +192 -0
- package/dist/model/CreateRefundRequest.js +3 -3
- package/dist/model/CreateSafeWalletParams.js +1 -1
- package/dist/model/CreateSettlement.js +1 -1
- package/dist/model/CreateSettlementRequestRequest.js +1 -1
- package/dist/model/CreateSmartContractWalletParams.js +1 -1
- package/dist/model/CreateStakeActivityExtra.js +12 -0
- package/dist/model/CreateWalletParams.js +1 -1
- package/dist/model/GetExchangeRate200Response.js +2 -2
- package/dist/model/LinkDisplayInfo.js +13 -0
- package/dist/model/ListAllocations200Response.js +123 -0
- package/dist/model/ListBatchAllocations200Response.js +123 -0
- package/dist/model/ListPayoutItems200Response.js +123 -0
- package/dist/model/ListPayouts200Response.js +123 -0
- package/dist/model/MPCVaultEventData.js +8 -3
- package/dist/model/MerchantBalance.js +28 -2
- package/dist/model/Order.js +135 -102
- package/dist/model/OrderLinkBusinessInfo.js +151 -87
- package/dist/model/OrderLinkBusinessInfoCustomExchangeRatesInner.js +4 -4
- package/dist/model/OrderLinkBusinessInfoPayableAmountsInner.js +125 -0
- package/dist/model/PaymentAddressUpdateEventData.js +8 -3
- package/dist/model/PaymentAllocationAmount.js +125 -0
- package/dist/model/PaymentOrderEventData.js +198 -145
- package/dist/model/PaymentPayout.js +250 -0
- package/dist/model/PaymentPayoutDetail.js +248 -0
- package/dist/model/PaymentPayoutEvent.js +433 -0
- package/dist/model/PaymentPayoutItem.js +298 -0
- package/dist/model/PaymentPayoutItemDetail.js +298 -0
- package/dist/model/PaymentPayoutItemStatus.js +76 -0
- package/dist/model/PaymentPayoutParam.js +165 -0
- package/dist/model/PaymentPayoutStatus.js +81 -0
- package/dist/model/PaymentRefundEventData.js +8 -3
- package/dist/model/PaymentSettlementEvent.js +8 -3
- package/dist/model/PaymentSourceType.js +61 -0
- package/dist/model/PaymentTransactionEventData.js +8 -3
- package/dist/model/PspBalance.js +28 -2
- package/dist/model/RefundLinkBusinessInfo.js +1 -1
- package/dist/model/Stakings.js +33 -6
- package/dist/model/SuspendedTokenEventData.js +8 -3
- package/dist/model/SwapActivity.js +1 -1
- package/dist/model/SwapActivityDetail.js +2 -2
- package/dist/model/SwapActivityTimeline.js +1 -1
- package/dist/model/TSSRequestWebhookEventData.js +8 -3
- package/dist/model/TokenListingEventData.js +8 -3
- package/dist/model/TokensEventData.js +8 -3
- package/dist/model/TransactionCosmosContractDestination.js +0 -13
- package/dist/model/TransactionWebhookEventData.js +8 -3
- package/dist/model/UpdateMerchantByIdRequest.js +1 -1
- package/dist/model/WalletInfoEventData.js +8 -3
- package/dist/model/WebhookEventData.js +106 -42
- package/dist/model/WebhookEventDataType.js +7 -2
- package/dist/model/WebhookEventType.js +10 -0
- package/docs/AddressBooksApi.md +1 -1
- package/docs/AddressesEventData.md +3 -1
- package/docs/AllocationRecord.md +15 -0
- package/docs/AllocationRequest.md +13 -0
- package/docs/AutoSweepApi.md +2 -2
- package/docs/BabylonCreateStakingExpansion.md +12 -0
- package/docs/BabylonStakeExtra.md +2 -0
- package/docs/BalanceUpdateInfoEventData.md +3 -1
- package/docs/BatchAllocation.md +14 -0
- package/docs/BatchAllocationDetail.md +14 -0
- package/docs/ChainsEventData.md +3 -1
- package/docs/ComplianceDispositionUpdateEventData.md +3 -1
- package/docs/ComplianceKytScreeningsUpdateEventData.md +3 -1
- package/docs/ContractCallDestination.md +1 -0
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/CosmosContractCallDestination.md +0 -1
- package/docs/CreateBatchAllocationRequest.md +10 -0
- package/docs/CreateCustodialWalletParams.md +1 -1
- package/docs/CreateExchangeWalletParams.md +1 -1
- package/docs/CreateMerchantRequest.md +1 -1
- package/docs/CreateMpcWalletParams.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +15 -11
- package/docs/CreatePayoutRequest.md +14 -0
- package/docs/CreateRefundRequest.md +3 -3
- package/docs/CreateSafeWalletParams.md +1 -1
- package/docs/CreateSettlement.md +1 -1
- package/docs/CreateSettlementRequestRequest.md +1 -1
- package/docs/CreateSmartContractWalletParams.md +1 -1
- package/docs/CreateStakeActivityExtra.md +2 -0
- package/docs/CreateWalletParams.md +1 -1
- package/docs/GetExchangeRate200Response.md +1 -1
- package/docs/LinkDisplayInfo.md +1 -0
- package/docs/ListAllocations200Response.md +10 -0
- package/docs/ListBatchAllocations200Response.md +10 -0
- package/docs/ListPayoutItems200Response.md +10 -0
- package/docs/ListPayouts200Response.md +10 -0
- package/docs/MPCVaultEventData.md +3 -1
- package/docs/MerchantBalance.md +4 -2
- package/docs/OAuthApi.md +2 -2
- package/docs/Order.md +16 -13
- package/docs/OrderLinkBusinessInfo.md +11 -7
- package/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +2 -2
- package/docs/OrderLinkBusinessInfoPayableAmountsInner.md +10 -0
- package/docs/PaymentAddressUpdateEventData.md +3 -1
- package/docs/PaymentAllocationAmount.md +10 -0
- package/docs/PaymentApi.md +527 -20
- package/docs/PaymentOrderEventData.md +19 -14
- package/docs/PaymentPayout.md +19 -0
- package/docs/PaymentPayoutDetail.md +19 -0
- package/docs/PaymentPayoutEvent.md +65 -0
- package/docs/PaymentPayoutItem.md +22 -0
- package/docs/PaymentPayoutItemDetail.md +22 -0
- package/docs/PaymentPayoutItemStatus.md +18 -0
- package/docs/PaymentPayoutParam.md +13 -0
- package/docs/PaymentPayoutStatus.md +20 -0
- package/docs/PaymentRefundEventData.md +3 -1
- package/docs/PaymentSettlementEvent.md +3 -1
- package/docs/PaymentSourceType.md +12 -0
- package/docs/PaymentTransactionEventData.md +3 -1
- package/docs/PspBalance.md +4 -2
- package/docs/RefundLinkBusinessInfo.md +1 -1
- package/docs/Stakings.md +2 -1
- package/docs/StakingsApi.md +54 -1
- package/docs/SuspendedTokenEventData.md +3 -1
- package/docs/SwapActivity.md +1 -1
- package/docs/SwapActivityDetail.md +1 -1
- package/docs/SwapActivityTimeline.md +1 -1
- package/docs/SwapsApi.md +1 -1
- package/docs/TSSRequestWebhookEventData.md +3 -1
- package/docs/TokenListingEventData.md +3 -1
- package/docs/TokensEventData.md +3 -1
- package/docs/TransactionCosmosContractDestination.md +0 -1
- package/docs/TransactionWebhookEventData.md +3 -1
- package/docs/TransactionsApi.md +3 -3
- package/docs/UpdateMerchantByIdRequest.md +1 -1
- package/docs/WalletInfoEventData.md +3 -1
- package/docs/WalletsApi.md +7 -7
- package/docs/WebhookEventData.md +21 -13
- package/docs/WebhookEventDataType.md +3 -1
- package/docs/WebhookEventType.md +4 -0
- package/package.json +1 -1
package/docs/PaymentApi.md
CHANGED
|
@@ -6,6 +6,7 @@ Method | HTTP request | Description
|
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
7
|
[**batchGetExchangeRates**](PaymentApi.md#batchGetExchangeRates) | **GET** /payments/exchange_rates | Batch get exchange rates
|
|
8
8
|
[**cancelRefundById**](PaymentApi.md#cancelRefundById) | **PUT** /payments/refunds/{refund_id}/cancel | Cancel refund order
|
|
9
|
+
[**createBatchAllocation**](PaymentApi.md#createBatchAllocation) | **POST** /payments/batch_allocations | Create batch allocation
|
|
9
10
|
[**createCounterparty**](PaymentApi.md#createCounterparty) | **POST** /payments/counterparty | Create counterparty
|
|
10
11
|
[**createCounterpartyWalletAddress**](PaymentApi.md#createCounterpartyWalletAddress) | **POST** /payments/counterparty/wallet_address | Create counterparty wallet address
|
|
11
12
|
[**createCryptoAddress**](PaymentApi.md#createCryptoAddress) | **POST** /payments/crypto_addresses | Create crypto address
|
|
@@ -16,6 +17,7 @@ Method | HTTP request | Description
|
|
|
16
17
|
[**createMerchant**](PaymentApi.md#createMerchant) | **POST** /payments/merchants | Create merchant
|
|
17
18
|
[**createOrderLink**](PaymentApi.md#createOrderLink) | **POST** /payments/links/orders | Create order link
|
|
18
19
|
[**createPaymentOrder**](PaymentApi.md#createPaymentOrder) | **POST** /payments/orders | Create pay-in order
|
|
20
|
+
[**createPayout**](PaymentApi.md#createPayout) | **POST** /payments/payouts | Create payout
|
|
19
21
|
[**createRefund**](PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
20
22
|
[**createRefundLink**](PaymentApi.md#createRefundLink) | **POST** /payments/links/refunds | Create refund link
|
|
21
23
|
[**createSettlementRequest**](PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
|
|
@@ -26,18 +28,23 @@ Method | HTTP request | Description
|
|
|
26
28
|
[**deleteDestinationBankAccount**](PaymentApi.md#deleteDestinationBankAccount) | **PUT** /payments/destination/bank_account/{bank_account_id}/delete | Delete destination bank account
|
|
27
29
|
[**deleteDestinationWalletAddress**](PaymentApi.md#deleteDestinationWalletAddress) | **PUT** /payments/destination/wallet_address/{wallet_address_id}/delete | Delete destination wallet address
|
|
28
30
|
[**enableDestinationWhitelist**](PaymentApi.md#enableDestinationWhitelist) | **POST** /payments/destination/enable_whitelist | Enable or disable destination whitelist
|
|
31
|
+
[**getAvailableAllocationAmount**](PaymentApi.md#getAvailableAllocationAmount) | **GET** /payments/allocation_amount | Get available allocation amount
|
|
32
|
+
[**getBatchAllocationById**](PaymentApi.md#getBatchAllocationById) | **GET** /payments/batch_allocations/{batch_allocation_id} | Get batch allocation by id
|
|
29
33
|
[**getCounterpartyDetailById**](PaymentApi.md#getCounterpartyDetailById) | **GET** /payments/counterparty/{counterparty_id}/detail | Get counterparty information
|
|
30
34
|
[**getDestinationBankAccountDetailById**](PaymentApi.md#getDestinationBankAccountDetailById) | **GET** /payments/destination/bank_account/{bank_account_id}/detail | Get destination bank account information
|
|
31
35
|
[**getDestinationDetailById**](PaymentApi.md#getDestinationDetailById) | **GET** /payments/destination/{destination_id}/detail | Get destination information
|
|
32
36
|
[**getExchangeRate**](PaymentApi.md#getExchangeRate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate
|
|
33
37
|
[**getPaymentOrderDetailById**](PaymentApi.md#getPaymentOrderDetailById) | **GET** /payments/orders/{order_id} | Get pay-in order information
|
|
38
|
+
[**getPayoutById**](PaymentApi.md#getPayoutById) | **GET** /payments/payouts/{payout_id} | Get payout information
|
|
34
39
|
[**getPspBalance**](PaymentApi.md#getPspBalance) | **GET** /payments/balance/psp | Get developer balance
|
|
35
40
|
[**getRefundDetailById**](PaymentApi.md#getRefundDetailById) | **GET** /payments/refunds/{refund_id} | Get refund order information
|
|
36
41
|
[**getRefunds**](PaymentApi.md#getRefunds) | **GET** /payments/refunds | List all refund orders
|
|
37
42
|
[**getSettlementById**](PaymentApi.md#getSettlementById) | **GET** /payments/settlement_requests/{settlement_request_id} | Get settlement request information
|
|
38
43
|
[**getSettlementInfoByIds**](PaymentApi.md#getSettlementInfoByIds) | **GET** /payments/settlement_info | Get withdrawable balances
|
|
39
44
|
[**getTopUpAddress**](PaymentApi.md#getTopUpAddress) | **GET** /payments/topup/address | Create/Get top-up address
|
|
45
|
+
[**listAllocations**](PaymentApi.md#listAllocations) | **GET** /payments/allocation_records | List all allocations
|
|
40
46
|
[**listBankAccounts**](PaymentApi.md#listBankAccounts) | **GET** /payments/bank_accounts | List all bank accounts
|
|
47
|
+
[**listBatchAllocations**](PaymentApi.md#listBatchAllocations) | **GET** /payments/batch_allocations | List all batch allocations
|
|
41
48
|
[**listCounterparties**](PaymentApi.md#listCounterparties) | **GET** /payments/counterparty | List all counterparties
|
|
42
49
|
[**listCounterpartyWalletAddress**](PaymentApi.md#listCounterpartyWalletAddress) | **GET** /payments/counterparty/wallet_address | List counterparty wallet addresses
|
|
43
50
|
[**listCryptoAddresses**](PaymentApi.md#listCryptoAddresses) | **GET** /payments/crypto_addresses | List crypto addresses
|
|
@@ -50,6 +57,8 @@ Method | HTTP request | Description
|
|
|
50
57
|
[**listPaymentOrders**](PaymentApi.md#listPaymentOrders) | **GET** /payments/orders | List all pay-in orders
|
|
51
58
|
[**listPaymentSupportedTokens**](PaymentApi.md#listPaymentSupportedTokens) | **GET** /payments/supported_tokens | List all supported tokens
|
|
52
59
|
[**listPaymentWalletBalances**](PaymentApi.md#listPaymentWalletBalances) | **GET** /payments/balance/payment_wallets | List payment wallet balances
|
|
60
|
+
[**listPayoutItems**](PaymentApi.md#listPayoutItems) | **GET** /payments/payout_items | List all payout items
|
|
61
|
+
[**listPayouts**](PaymentApi.md#listPayouts) | **GET** /payments/payouts | List all payouts
|
|
53
62
|
[**listSettlementDetails**](PaymentApi.md#listSettlementDetails) | **GET** /payments/settlement_details | List all settlement details
|
|
54
63
|
[**listSettlementRequests**](PaymentApi.md#listSettlementRequests) | **GET** /payments/settlement_requests | List all settlement requests
|
|
55
64
|
[**listTopUpPayerAccounts**](PaymentApi.md#listTopUpPayerAccounts) | **GET** /payments/topup/payer_accounts | List top-up payer accounts
|
|
@@ -73,7 +82,7 @@ Method | HTTP request | Description
|
|
|
73
82
|
|
|
74
83
|
Batch get exchange rates
|
|
75
84
|
|
|
76
|
-
This operation retrieves the current exchange rates between
|
|
85
|
+
This operation retrieves the current exchange rates between multiple fiat currencies and cryptocurrencies.
|
|
77
86
|
|
|
78
87
|
### Example
|
|
79
88
|
|
|
@@ -102,8 +111,8 @@ apiInstance.batchGetExchangeRates(token_ids, currencies).then((data) => {
|
|
|
102
111
|
|
|
103
112
|
Name | Type | Description | Notes
|
|
104
113
|
------------- | ------------- | ------------- | -------------
|
|
105
|
-
**token_ids** | **String**|
|
|
106
|
-
**currencies** | **String**|
|
|
114
|
+
**token_ids** | **String**| A list of token IDs, separated by comma. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
115
|
+
**currencies** | **String**| A list of fiat currencies, separated by comma. Currently, only `USD` is supported. |
|
|
107
116
|
|
|
108
117
|
### Return type
|
|
109
118
|
|
|
@@ -169,6 +178,58 @@ Name | Type | Description | Notes
|
|
|
169
178
|
- **Accept**: application/json
|
|
170
179
|
|
|
171
180
|
|
|
181
|
+
## createBatchAllocation
|
|
182
|
+
|
|
183
|
+
> BatchAllocation createBatchAllocation(opts)
|
|
184
|
+
|
|
185
|
+
Create batch allocation
|
|
186
|
+
|
|
187
|
+
This operation creates a batch allocation to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single batch allocation.
|
|
188
|
+
|
|
189
|
+
### Example
|
|
190
|
+
|
|
191
|
+
```javascript
|
|
192
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
193
|
+
// Initialize the API client
|
|
194
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
195
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
196
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
197
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
198
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
199
|
+
// Call the API
|
|
200
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
201
|
+
const opts = {
|
|
202
|
+
'CreateBatchAllocationRequest': new CoboWaas2.CreateBatchAllocationRequest()
|
|
203
|
+
};
|
|
204
|
+
apiInstance.createBatchAllocation(opts).then((data) => {
|
|
205
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
206
|
+
}, (error) => {
|
|
207
|
+
console.error(error);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Parameters
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
Name | Type | Description | Notes
|
|
216
|
+
------------- | ------------- | ------------- | -------------
|
|
217
|
+
**CreateBatchAllocationRequest** | [**CreateBatchAllocationRequest**](CreateBatchAllocationRequest.md)| The request body to create a settlement request. | [optional]
|
|
218
|
+
|
|
219
|
+
### Return type
|
|
220
|
+
|
|
221
|
+
[**BatchAllocation**](BatchAllocation.md)
|
|
222
|
+
|
|
223
|
+
### Authorization
|
|
224
|
+
|
|
225
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
226
|
+
|
|
227
|
+
### HTTP request headers
|
|
228
|
+
|
|
229
|
+
- **Content-Type**: application/json
|
|
230
|
+
- **Accept**: application/json
|
|
231
|
+
|
|
232
|
+
|
|
172
233
|
## createCounterparty
|
|
173
234
|
|
|
174
235
|
> CounterpartyDetail createCounterparty(opts)
|
|
@@ -539,7 +600,7 @@ Name | Type | Description | Notes
|
|
|
539
600
|
|
|
540
601
|
Create merchant
|
|
541
602
|
|
|
542
|
-
This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/
|
|
603
|
+
This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant).
|
|
543
604
|
|
|
544
605
|
### Example
|
|
545
606
|
|
|
@@ -591,7 +652,7 @@ Name | Type | Description | Notes
|
|
|
591
652
|
|
|
592
653
|
Create order link
|
|
593
654
|
|
|
594
|
-
This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/
|
|
655
|
+
This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link).
|
|
595
656
|
|
|
596
657
|
### Example
|
|
597
658
|
|
|
@@ -689,6 +750,58 @@ Name | Type | Description | Notes
|
|
|
689
750
|
- **Accept**: application/json
|
|
690
751
|
|
|
691
752
|
|
|
753
|
+
## createPayout
|
|
754
|
+
|
|
755
|
+
> PaymentPayout createPayout(opts)
|
|
756
|
+
|
|
757
|
+
Create payout
|
|
758
|
+
|
|
759
|
+
This operation creates a payout to withdraw available balances. You can include multiple merchants and cryptocurrencies in a single payout record.
|
|
760
|
+
|
|
761
|
+
### Example
|
|
762
|
+
|
|
763
|
+
```javascript
|
|
764
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
765
|
+
// Initialize the API client
|
|
766
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
767
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
768
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
769
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
770
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
771
|
+
// Call the API
|
|
772
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
773
|
+
const opts = {
|
|
774
|
+
'CreatePayoutRequest': new CoboWaas2.CreatePayoutRequest()
|
|
775
|
+
};
|
|
776
|
+
apiInstance.createPayout(opts).then((data) => {
|
|
777
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
778
|
+
}, (error) => {
|
|
779
|
+
console.error(error);
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
### Parameters
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
Name | Type | Description | Notes
|
|
788
|
+
------------- | ------------- | ------------- | -------------
|
|
789
|
+
**CreatePayoutRequest** | [**CreatePayoutRequest**](CreatePayoutRequest.md)| The request body to create a payout. | [optional]
|
|
790
|
+
|
|
791
|
+
### Return type
|
|
792
|
+
|
|
793
|
+
[**PaymentPayout**](PaymentPayout.md)
|
|
794
|
+
|
|
795
|
+
### Authorization
|
|
796
|
+
|
|
797
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
798
|
+
|
|
799
|
+
### HTTP request headers
|
|
800
|
+
|
|
801
|
+
- **Content-Type**: application/json
|
|
802
|
+
- **Accept**: application/json
|
|
803
|
+
|
|
804
|
+
|
|
692
805
|
## createRefund
|
|
693
806
|
|
|
694
807
|
> Refund createRefund(opts)
|
|
@@ -747,7 +860,7 @@ Name | Type | Description | Notes
|
|
|
747
860
|
|
|
748
861
|
Create refund link
|
|
749
862
|
|
|
750
|
-
This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/
|
|
863
|
+
This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link).
|
|
751
864
|
|
|
752
865
|
### Example
|
|
753
866
|
|
|
@@ -1197,6 +1310,110 @@ Name | Type | Description | Notes
|
|
|
1197
1310
|
- **Accept**: application/json
|
|
1198
1311
|
|
|
1199
1312
|
|
|
1313
|
+
## getAvailableAllocationAmount
|
|
1314
|
+
|
|
1315
|
+
> PaymentAllocationAmount getAvailableAllocationAmount(token_id, source_account, destination_account)
|
|
1316
|
+
|
|
1317
|
+
Get available allocation amount
|
|
1318
|
+
|
|
1319
|
+
This operation retrieves the information of available allocation amount.
|
|
1320
|
+
|
|
1321
|
+
### Example
|
|
1322
|
+
|
|
1323
|
+
```javascript
|
|
1324
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1325
|
+
// Initialize the API client
|
|
1326
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1327
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1328
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1329
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1330
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1331
|
+
// Call the API
|
|
1332
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1333
|
+
const token_id = "ETH_USDT";
|
|
1334
|
+
const source_account = "source_account_example";
|
|
1335
|
+
const destination_account = "destination_account_example";
|
|
1336
|
+
apiInstance.getAvailableAllocationAmount(token_id, source_account, destination_account).then((data) => {
|
|
1337
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1338
|
+
}, (error) => {
|
|
1339
|
+
console.error(error);
|
|
1340
|
+
});
|
|
1341
|
+
|
|
1342
|
+
```
|
|
1343
|
+
|
|
1344
|
+
### Parameters
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
Name | Type | Description | Notes
|
|
1348
|
+
------------- | ------------- | ------------- | -------------
|
|
1349
|
+
**token_id** | **String**| The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
1350
|
+
**source_account** | **String**| |
|
|
1351
|
+
**destination_account** | **String**| |
|
|
1352
|
+
|
|
1353
|
+
### Return type
|
|
1354
|
+
|
|
1355
|
+
[**PaymentAllocationAmount**](PaymentAllocationAmount.md)
|
|
1356
|
+
|
|
1357
|
+
### Authorization
|
|
1358
|
+
|
|
1359
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1360
|
+
|
|
1361
|
+
### HTTP request headers
|
|
1362
|
+
|
|
1363
|
+
- **Content-Type**: Not defined
|
|
1364
|
+
- **Accept**: application/json
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
## getBatchAllocationById
|
|
1368
|
+
|
|
1369
|
+
> BatchAllocationDetail getBatchAllocationById(batch_allocation_id)
|
|
1370
|
+
|
|
1371
|
+
Get batch allocation by id
|
|
1372
|
+
|
|
1373
|
+
This operation retrieves the information of a batch allocation.
|
|
1374
|
+
|
|
1375
|
+
### Example
|
|
1376
|
+
|
|
1377
|
+
```javascript
|
|
1378
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1379
|
+
// Initialize the API client
|
|
1380
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1381
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1382
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1383
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1384
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1385
|
+
// Call the API
|
|
1386
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1387
|
+
const batch_allocation_id = "5b0ed293-f728-40b4-b1f6-86b88cd51384";
|
|
1388
|
+
apiInstance.getBatchAllocationById(batch_allocation_id).then((data) => {
|
|
1389
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1390
|
+
}, (error) => {
|
|
1391
|
+
console.error(error);
|
|
1392
|
+
});
|
|
1393
|
+
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
### Parameters
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
Name | Type | Description | Notes
|
|
1400
|
+
------------- | ------------- | ------------- | -------------
|
|
1401
|
+
**batch_allocation_id** | **String**| The batch allocation ID. |
|
|
1402
|
+
|
|
1403
|
+
### Return type
|
|
1404
|
+
|
|
1405
|
+
[**BatchAllocationDetail**](BatchAllocationDetail.md)
|
|
1406
|
+
|
|
1407
|
+
### Authorization
|
|
1408
|
+
|
|
1409
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1410
|
+
|
|
1411
|
+
### HTTP request headers
|
|
1412
|
+
|
|
1413
|
+
- **Content-Type**: Not defined
|
|
1414
|
+
- **Accept**: application/json
|
|
1415
|
+
|
|
1416
|
+
|
|
1200
1417
|
## getCounterpartyDetailById
|
|
1201
1418
|
|
|
1202
1419
|
> CounterpartyDetail getCounterpartyDetailById(counterparty_id)
|
|
@@ -1449,13 +1666,63 @@ Name | Type | Description | Notes
|
|
|
1449
1666
|
- **Accept**: application/json
|
|
1450
1667
|
|
|
1451
1668
|
|
|
1669
|
+
## getPayoutById
|
|
1670
|
+
|
|
1671
|
+
> PaymentPayoutDetail getPayoutById(payout_id)
|
|
1672
|
+
|
|
1673
|
+
Get payout information
|
|
1674
|
+
|
|
1675
|
+
This operation retrieves the information of a specific payout.
|
|
1676
|
+
|
|
1677
|
+
### Example
|
|
1678
|
+
|
|
1679
|
+
```javascript
|
|
1680
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1681
|
+
// Initialize the API client
|
|
1682
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1683
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1684
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1685
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1686
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1687
|
+
// Call the API
|
|
1688
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1689
|
+
const payout_id = "aff0e1cb-15b2-4e1f-9b9d-a9133715986f";
|
|
1690
|
+
apiInstance.getPayoutById(payout_id).then((data) => {
|
|
1691
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1692
|
+
}, (error) => {
|
|
1693
|
+
console.error(error);
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
### Parameters
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
Name | Type | Description | Notes
|
|
1702
|
+
------------- | ------------- | ------------- | -------------
|
|
1703
|
+
**payout_id** | **String**| The payout ID. |
|
|
1704
|
+
|
|
1705
|
+
### Return type
|
|
1706
|
+
|
|
1707
|
+
[**PaymentPayoutDetail**](PaymentPayoutDetail.md)
|
|
1708
|
+
|
|
1709
|
+
### Authorization
|
|
1710
|
+
|
|
1711
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1712
|
+
|
|
1713
|
+
### HTTP request headers
|
|
1714
|
+
|
|
1715
|
+
- **Content-Type**: Not defined
|
|
1716
|
+
- **Accept**: application/json
|
|
1717
|
+
|
|
1718
|
+
|
|
1452
1719
|
## getPspBalance
|
|
1453
1720
|
|
|
1454
1721
|
> PspBalance getPspBalance(token_id)
|
|
1455
1722
|
|
|
1456
1723
|
Get developer balance
|
|
1457
1724
|
|
|
1458
|
-
This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/
|
|
1725
|
+
This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
1459
1726
|
|
|
1460
1727
|
### Example
|
|
1461
1728
|
|
|
@@ -1595,7 +1862,7 @@ Name | Type | Description | Notes
|
|
|
1595
1862
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
1596
1863
|
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
1597
1864
|
**request_id** | **String**| The request ID. | [optional]
|
|
1598
|
-
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
1865
|
+
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details) | [optional]
|
|
1599
1866
|
|
|
1600
1867
|
### Return type
|
|
1601
1868
|
|
|
@@ -1773,6 +2040,70 @@ Name | Type | Description | Notes
|
|
|
1773
2040
|
- **Accept**: application/json
|
|
1774
2041
|
|
|
1775
2042
|
|
|
2043
|
+
## listAllocations
|
|
2044
|
+
|
|
2045
|
+
> ListAllocations200Response listAllocations(opts)
|
|
2046
|
+
|
|
2047
|
+
List all allocations
|
|
2048
|
+
|
|
2049
|
+
This operation retrieves the information of all allocations.
|
|
2050
|
+
|
|
2051
|
+
### Example
|
|
2052
|
+
|
|
2053
|
+
```javascript
|
|
2054
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2055
|
+
// Initialize the API client
|
|
2056
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2057
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2058
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2059
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2060
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2061
|
+
// Call the API
|
|
2062
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2063
|
+
const opts = {
|
|
2064
|
+
'limit': 10,
|
|
2065
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2066
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2067
|
+
'source_account': "source_account_example",
|
|
2068
|
+
'destination_account': "destination_account_example",
|
|
2069
|
+
'token_id': "ETH_USDT",
|
|
2070
|
+
'batch_allocation_id': "5b0ed293-f728-40b4-b1f6-86b88cd51384"
|
|
2071
|
+
};
|
|
2072
|
+
apiInstance.listAllocations(opts).then((data) => {
|
|
2073
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2074
|
+
}, (error) => {
|
|
2075
|
+
console.error(error);
|
|
2076
|
+
});
|
|
2077
|
+
|
|
2078
|
+
```
|
|
2079
|
+
|
|
2080
|
+
### Parameters
|
|
2081
|
+
|
|
2082
|
+
|
|
2083
|
+
Name | Type | Description | Notes
|
|
2084
|
+
------------- | ------------- | ------------- | -------------
|
|
2085
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2086
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
2087
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2088
|
+
**source_account** | **String**| | [optional]
|
|
2089
|
+
**destination_account** | **String**| | [optional]
|
|
2090
|
+
**token_id** | **String**| The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | [optional]
|
|
2091
|
+
**batch_allocation_id** | **String**| The batch allocation ID. | [optional]
|
|
2092
|
+
|
|
2093
|
+
### Return type
|
|
2094
|
+
|
|
2095
|
+
[**ListAllocations200Response**](ListAllocations200Response.md)
|
|
2096
|
+
|
|
2097
|
+
### Authorization
|
|
2098
|
+
|
|
2099
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
2100
|
+
|
|
2101
|
+
### HTTP request headers
|
|
2102
|
+
|
|
2103
|
+
- **Content-Type**: Not defined
|
|
2104
|
+
- **Accept**: application/json
|
|
2105
|
+
|
|
2106
|
+
|
|
1776
2107
|
## listBankAccounts
|
|
1777
2108
|
|
|
1778
2109
|
> [BankAccount] listBankAccounts()
|
|
@@ -1819,6 +2150,64 @@ This endpoint does not need any parameter.
|
|
|
1819
2150
|
- **Accept**: application/json
|
|
1820
2151
|
|
|
1821
2152
|
|
|
2153
|
+
## listBatchAllocations
|
|
2154
|
+
|
|
2155
|
+
> ListBatchAllocations200Response listBatchAllocations(opts)
|
|
2156
|
+
|
|
2157
|
+
List all batch allocations
|
|
2158
|
+
|
|
2159
|
+
This operation retrieves the information of all batch allocations.
|
|
2160
|
+
|
|
2161
|
+
### Example
|
|
2162
|
+
|
|
2163
|
+
```javascript
|
|
2164
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2165
|
+
// Initialize the API client
|
|
2166
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2167
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2168
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2169
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2170
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2171
|
+
// Call the API
|
|
2172
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2173
|
+
const opts = {
|
|
2174
|
+
'limit': 10,
|
|
2175
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2176
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2177
|
+
'request_id': "random_request_id"
|
|
2178
|
+
};
|
|
2179
|
+
apiInstance.listBatchAllocations(opts).then((data) => {
|
|
2180
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2181
|
+
}, (error) => {
|
|
2182
|
+
console.error(error);
|
|
2183
|
+
});
|
|
2184
|
+
|
|
2185
|
+
```
|
|
2186
|
+
|
|
2187
|
+
### Parameters
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
Name | Type | Description | Notes
|
|
2191
|
+
------------- | ------------- | ------------- | -------------
|
|
2192
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2193
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
2194
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2195
|
+
**request_id** | **String**| The request ID. | [optional]
|
|
2196
|
+
|
|
2197
|
+
### Return type
|
|
2198
|
+
|
|
2199
|
+
[**ListBatchAllocations200Response**](ListBatchAllocations200Response.md)
|
|
2200
|
+
|
|
2201
|
+
### Authorization
|
|
2202
|
+
|
|
2203
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
2204
|
+
|
|
2205
|
+
### HTTP request headers
|
|
2206
|
+
|
|
2207
|
+
- **Content-Type**: Not defined
|
|
2208
|
+
- **Accept**: application/json
|
|
2209
|
+
|
|
2210
|
+
|
|
1822
2211
|
## listCounterparties
|
|
1823
2212
|
|
|
1824
2213
|
> ListCounterparties200Response listCounterparties(opts)
|
|
@@ -1906,7 +2295,7 @@ const opts = {
|
|
|
1906
2295
|
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
1907
2296
|
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
1908
2297
|
'counterparty_id': "5b0ed293-f728-40b4-b1f6-86b88cd51384",
|
|
1909
|
-
'chain_ids': "
|
|
2298
|
+
'chain_ids': "ETH",
|
|
1910
2299
|
'wallet_address': "0x1234567890abcdef..."
|
|
1911
2300
|
};
|
|
1912
2301
|
apiInstance.listCounterpartyWalletAddress(opts).then((data) => {
|
|
@@ -1926,7 +2315,7 @@ Name | Type | Description | Notes
|
|
|
1926
2315
|
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
1927
2316
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
1928
2317
|
**counterparty_id** | **String**| The counterparty ID. | [optional]
|
|
1929
|
-
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain.
|
|
2318
|
+
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain. | [optional]
|
|
1930
2319
|
**wallet_address** | **String**| The wallet address. | [optional]
|
|
1931
2320
|
|
|
1932
2321
|
### Return type
|
|
@@ -2082,7 +2471,7 @@ const opts = {
|
|
|
2082
2471
|
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2083
2472
|
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2084
2473
|
'destination_id': "46beeab4-6a8e-476e-bc69-99b89aacbc6f",
|
|
2085
|
-
'chain_ids': "
|
|
2474
|
+
'chain_ids': "ETH",
|
|
2086
2475
|
'wallet_address': "0x1234567890abcdef..."
|
|
2087
2476
|
};
|
|
2088
2477
|
apiInstance.listDestinationWalletAddresses(opts).then((data) => {
|
|
@@ -2102,7 +2491,7 @@ Name | Type | Description | Notes
|
|
|
2102
2491
|
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
2103
2492
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2104
2493
|
**destination_id** | **String**| The destination ID. | [optional]
|
|
2105
|
-
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain.
|
|
2494
|
+
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain. | [optional]
|
|
2106
2495
|
**wallet_address** | **String**| The wallet address. | [optional]
|
|
2107
2496
|
|
|
2108
2497
|
### Return type
|
|
@@ -2243,11 +2632,11 @@ Name | Type | Description | Notes
|
|
|
2243
2632
|
|
|
2244
2633
|
## listMerchantBalances
|
|
2245
2634
|
|
|
2246
|
-
> ListMerchantBalances200Response listMerchantBalances(token_id,
|
|
2635
|
+
> ListMerchantBalances200Response listMerchantBalances(token_id, opts)
|
|
2247
2636
|
|
|
2248
2637
|
List merchant balances
|
|
2249
2638
|
|
|
2250
|
-
This operation retrieves the balance information for specified merchants.
|
|
2639
|
+
This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Funds allocation and balances](https://www.cobo.com/payments/en/guides/amounts-and-balances).
|
|
2251
2640
|
|
|
2252
2641
|
### Example
|
|
2253
2642
|
|
|
@@ -2262,11 +2651,11 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
2262
2651
|
// Call the API
|
|
2263
2652
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2264
2653
|
const token_id = "ETH_USDT";
|
|
2265
|
-
const acquiring_type = new CoboWaas2.AcquiringType();
|
|
2266
2654
|
const opts = {
|
|
2267
|
-
'merchant_ids': "M1001,M1002,M1003"
|
|
2655
|
+
'merchant_ids': "M1001,M1002,M1003",
|
|
2656
|
+
'acquiring_type': new CoboWaas2.AcquiringType()
|
|
2268
2657
|
};
|
|
2269
|
-
apiInstance.listMerchantBalances(token_id,
|
|
2658
|
+
apiInstance.listMerchantBalances(token_id, opts).then((data) => {
|
|
2270
2659
|
console.log('API called successfully. Returned data: ' + data);
|
|
2271
2660
|
}, (error) => {
|
|
2272
2661
|
console.error(error);
|
|
@@ -2280,8 +2669,8 @@ apiInstance.listMerchantBalances(token_id, acquiring_type, opts).then((data) =>
|
|
|
2280
2669
|
Name | Type | Description | Notes
|
|
2281
2670
|
------------- | ------------- | ------------- | -------------
|
|
2282
2671
|
**token_id** | **String**| The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` |
|
|
2283
|
-
**acquiring_type** | [**AcquiringType**](.md)| The payment acquisition type. - `Order`: Payers pay by fixed-amount orders. Ideal for specific purchases and one-time transactions. - `TopUp`: Account recharge flow where payers deposit funds to their dedicated top-up addresses. Ideal for flexible or usage-based payment models. |
|
|
2284
2672
|
**merchant_ids** | **String**| A list of merchant IDs to query. | [optional]
|
|
2673
|
+
**acquiring_type** | [**AcquiringType**](.md)| | [optional]
|
|
2285
2674
|
|
|
2286
2675
|
### Return type
|
|
2287
2676
|
|
|
@@ -2405,7 +2794,7 @@ Name | Type | Description | Notes
|
|
|
2405
2794
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2406
2795
|
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
2407
2796
|
**psp_order_id** | **String**| A unique reference code assigned by the developer to identify this order in their system. | [optional]
|
|
2408
|
-
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
2797
|
+
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details) | [optional]
|
|
2409
2798
|
|
|
2410
2799
|
### Return type
|
|
2411
2800
|
|
|
@@ -2521,6 +2910,124 @@ Name | Type | Description | Notes
|
|
|
2521
2910
|
- **Accept**: application/json
|
|
2522
2911
|
|
|
2523
2912
|
|
|
2913
|
+
## listPayoutItems
|
|
2914
|
+
|
|
2915
|
+
> ListPayoutItems200Response listPayoutItems(opts)
|
|
2916
|
+
|
|
2917
|
+
List all payout items
|
|
2918
|
+
|
|
2919
|
+
This operation retrieves the information of all payout items. You can filter the result by merchant ID or status.
|
|
2920
|
+
|
|
2921
|
+
### Example
|
|
2922
|
+
|
|
2923
|
+
```javascript
|
|
2924
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2925
|
+
// Initialize the API client
|
|
2926
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2927
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2928
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2929
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2930
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2931
|
+
// Call the API
|
|
2932
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2933
|
+
const opts = {
|
|
2934
|
+
'limit': 10,
|
|
2935
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2936
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2937
|
+
'source_account': "source_account_example",
|
|
2938
|
+
'statuses': "Pending,Processing"
|
|
2939
|
+
};
|
|
2940
|
+
apiInstance.listPayoutItems(opts).then((data) => {
|
|
2941
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2942
|
+
}, (error) => {
|
|
2943
|
+
console.error(error);
|
|
2944
|
+
});
|
|
2945
|
+
|
|
2946
|
+
```
|
|
2947
|
+
|
|
2948
|
+
### Parameters
|
|
2949
|
+
|
|
2950
|
+
|
|
2951
|
+
Name | Type | Description | Notes
|
|
2952
|
+
------------- | ------------- | ------------- | -------------
|
|
2953
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2954
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
2955
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2956
|
+
**source_account** | **String**| | [optional]
|
|
2957
|
+
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details) | [optional]
|
|
2958
|
+
|
|
2959
|
+
### Return type
|
|
2960
|
+
|
|
2961
|
+
[**ListPayoutItems200Response**](ListPayoutItems200Response.md)
|
|
2962
|
+
|
|
2963
|
+
### Authorization
|
|
2964
|
+
|
|
2965
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
2966
|
+
|
|
2967
|
+
### HTTP request headers
|
|
2968
|
+
|
|
2969
|
+
- **Content-Type**: Not defined
|
|
2970
|
+
- **Accept**: application/json
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
## listPayouts
|
|
2974
|
+
|
|
2975
|
+
> ListPayouts200Response listPayouts(opts)
|
|
2976
|
+
|
|
2977
|
+
List all payouts
|
|
2978
|
+
|
|
2979
|
+
This operation retrieves the information of all payouts.
|
|
2980
|
+
|
|
2981
|
+
### Example
|
|
2982
|
+
|
|
2983
|
+
```javascript
|
|
2984
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2985
|
+
// Initialize the API client
|
|
2986
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2987
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2988
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2989
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2990
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2991
|
+
// Call the API
|
|
2992
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2993
|
+
const opts = {
|
|
2994
|
+
'limit': 10,
|
|
2995
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2996
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2997
|
+
'request_id': "random_request_id"
|
|
2998
|
+
};
|
|
2999
|
+
apiInstance.listPayouts(opts).then((data) => {
|
|
3000
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
3001
|
+
}, (error) => {
|
|
3002
|
+
console.error(error);
|
|
3003
|
+
});
|
|
3004
|
+
|
|
3005
|
+
```
|
|
3006
|
+
|
|
3007
|
+
### Parameters
|
|
3008
|
+
|
|
3009
|
+
|
|
3010
|
+
Name | Type | Description | Notes
|
|
3011
|
+
------------- | ------------- | ------------- | -------------
|
|
3012
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
3013
|
+
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
3014
|
+
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
3015
|
+
**request_id** | **String**| The request ID. | [optional]
|
|
3016
|
+
|
|
3017
|
+
### Return type
|
|
3018
|
+
|
|
3019
|
+
[**ListPayouts200Response**](ListPayouts200Response.md)
|
|
3020
|
+
|
|
3021
|
+
### Authorization
|
|
3022
|
+
|
|
3023
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
3024
|
+
|
|
3025
|
+
### HTTP request headers
|
|
3026
|
+
|
|
3027
|
+
- **Content-Type**: Not defined
|
|
3028
|
+
- **Accept**: application/json
|
|
3029
|
+
|
|
3030
|
+
|
|
2524
3031
|
## listSettlementDetails
|
|
2525
3032
|
|
|
2526
3033
|
> ListSettlementDetails200Response listSettlementDetails(opts)
|
|
@@ -2565,7 +3072,7 @@ Name | Type | Description | Notes
|
|
|
2565
3072
|
**before** | **String**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional]
|
|
2566
3073
|
**after** | **String**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional]
|
|
2567
3074
|
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
2568
|
-
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/
|
|
3075
|
+
**statuses** | **String**| A list of order, refund or settlement statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/payments/en/api-references/payment/list-all-settlement-details) | [optional]
|
|
2569
3076
|
|
|
2570
3077
|
### Return type
|
|
2571
3078
|
|