@cobo/cobo-waas2 1.26.0 → 1.27.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 +64 -4
- package/dist/ApiClient.js +1 -1
- package/dist/api/DevelopersWebhooksApi.js +2 -2
- package/dist/api/PaymentApi.js +1298 -200
- package/dist/api/TransactionsApi.js +2 -2
- package/dist/index.js +266 -7
- package/dist/model/BankAccountStatus.js +66 -0
- package/dist/model/ContractCallDestination.js +38 -10
- package/dist/model/ContractCallDestinationType.js +5 -0
- package/dist/model/Counterparty.js +195 -0
- package/dist/model/CounterpartyDetail.js +228 -0
- package/dist/model/CounterpartyType.js +61 -0
- package/dist/model/CounterpartyWalletAddressDetail.js +192 -0
- package/dist/model/CreateCounterpartyRequest.js +193 -0
- package/dist/model/CreateCounterpartyWalletAddressRequest.js +140 -0
- package/dist/model/CreateDestinationBankAccount.js +257 -0
- package/dist/model/CreateDestinationBankAccountRequest.js +272 -0
- package/dist/model/CreateDestinationRequest.js +235 -0
- package/dist/model/CreateDestinationWalletAddressRequest.js +140 -0
- package/dist/model/CreateKeyShareHolder.js +1 -1
- package/dist/model/CreatePaymentOrderRequest.js +2 -2
- package/dist/model/CreateSettlement.js +13 -0
- package/dist/model/{ReceivedAmountPerAddress.js → CreateWalletAddress.js} +31 -32
- package/dist/model/DeleteCounterparty200Response.js +110 -0
- package/dist/model/DeleteCounterpartyWalletAddress200Response.js +110 -0
- package/dist/model/DeleteDestination200Response.js +110 -0
- package/dist/model/DeleteDestinationBankAccount200Response.js +110 -0
- package/dist/model/DeleteDestinationWalletAddress200Response.js +110 -0
- package/dist/model/Destination.js +208 -0
- package/dist/model/DestinationBankAccount.js +301 -0
- package/dist/model/DestinationBankAccountDetail.js +394 -0
- package/dist/model/DestinationDetail.js +272 -0
- package/dist/model/DestinationType.js +61 -0
- package/dist/model/DestinationWalletAddressDetail.js +205 -0
- package/dist/model/EnableDestinationWhitelistRequest.js +106 -0
- package/dist/model/EvmContractCallDestination.js +2 -2
- package/dist/model/ExchangeRate.js +140 -0
- package/dist/model/IntermediaryBankInfo.js +140 -0
- package/dist/model/Link.js +4 -4
- package/dist/model/LinkDisplayInfo.js +2 -2
- package/dist/model/ListCounterparties200Response.js +123 -0
- package/dist/model/ListCounterpartyWalletAddress200Response.js +123 -0
- package/dist/model/ListDestinationBankAccounts200Response.js +123 -0
- package/dist/model/ListDestinationWalletAddresses200Response.js +123 -0
- package/dist/model/ListDestinations200Response.js +123 -0
- package/dist/model/PaymentTransaction.js +32 -0
- package/dist/model/PaymentTransactionEventData.js +2 -2
- package/dist/model/QueryDestinationWhitelistEnabled200Response.js +106 -0
- package/dist/model/RefundLinkBusinessInfo.js +6 -6
- package/dist/model/SettlementDetail.js +13 -0
- package/dist/model/SwapActivityTimeline.js +1 -1
- package/dist/model/Transaction.js +1 -1
- package/dist/model/TransactionDestination.js +38 -10
- package/dist/model/TransactionDestinationType.js +5 -0
- package/dist/model/TransactionDetail.js +2 -2
- package/dist/model/TransactionDetails.js +2 -2
- package/dist/model/TransactionTronContractDestination.js +150 -0
- package/dist/model/TransactionWebhookEventData.js +2 -2
- package/dist/model/TronContractCallDestination.js +150 -0
- package/dist/model/UpdateCounterpartyByIdRequest.js +160 -0
- package/dist/model/UpdateDestinationBankAccount.js +257 -0
- package/dist/model/UpdateDestinationByIdRequest.js +173 -0
- package/dist/model/WalletAddress.js +151 -0
- package/dist/model/WebhookEventData.js +1 -1
- package/docs/BankAccountStatus.md +14 -0
- package/docs/ContractCallDestination.md +2 -2
- package/docs/ContractCallDestinationType.md +2 -0
- package/docs/Counterparty.md +16 -0
- package/docs/CounterpartyDetail.md +17 -0
- package/docs/CounterpartyType.md +12 -0
- package/docs/CounterpartyWalletAddressDetail.md +15 -0
- package/docs/CreateCounterpartyRequest.md +14 -0
- package/docs/CreateCounterpartyWalletAddressRequest.md +11 -0
- package/docs/CreateDestinationBankAccount.md +19 -0
- package/docs/CreateDestinationBankAccountRequest.md +20 -0
- package/docs/CreateDestinationRequest.md +16 -0
- package/docs/CreateDestinationWalletAddressRequest.md +11 -0
- package/docs/CreateKeyShareHolder.md +1 -1
- package/docs/CreatePaymentOrderRequest.md +1 -1
- package/docs/CreateSettlement.md +1 -0
- package/docs/CreateWalletAddress.md +10 -0
- package/docs/DeleteCounterparty200Response.md +9 -0
- package/docs/DeleteCounterpartyWalletAddress200Response.md +9 -0
- package/docs/DeleteDestination200Response.md +9 -0
- package/docs/DeleteDestinationBankAccount200Response.md +9 -0
- package/docs/DeleteDestinationWalletAddress200Response.md +9 -0
- package/docs/Destination.md +17 -0
- package/docs/DestinationBankAccount.md +23 -0
- package/docs/DestinationBankAccountDetail.md +30 -0
- package/docs/DestinationDetail.md +19 -0
- package/docs/DestinationType.md +12 -0
- package/docs/DestinationWalletAddressDetail.md +16 -0
- package/docs/DevelopersWebhooksApi.md +1 -1
- package/docs/EnableDestinationWhitelistRequest.md +9 -0
- package/docs/EvmContractCallDestination.md +1 -1
- package/docs/ExchangeRate.md +11 -0
- package/docs/IntermediaryBankInfo.md +11 -0
- package/docs/Link.md +2 -2
- package/docs/LinkDisplayInfo.md +2 -2
- package/docs/ListCounterparties200Response.md +10 -0
- package/docs/ListCounterpartyWalletAddress200Response.md +10 -0
- package/docs/ListDestinationBankAccounts200Response.md +10 -0
- package/docs/ListDestinationWalletAddresses200Response.md +10 -0
- package/docs/ListDestinations200Response.md +10 -0
- package/docs/PaymentApi.md +1459 -208
- package/docs/PaymentTransaction.md +2 -0
- package/docs/PaymentTransactionEventData.md +1 -1
- package/docs/QueryDestinationWhitelistEnabled200Response.md +9 -0
- package/docs/RefundLinkBusinessInfo.md +4 -4
- package/docs/SettlementDetail.md +1 -0
- package/docs/SwapActivityTimeline.md +1 -1
- package/docs/Transaction.md +1 -1
- package/docs/TransactionDestination.md +2 -2
- package/docs/TransactionDestinationType.md +2 -0
- package/docs/TransactionDetail.md +1 -1
- package/docs/TransactionDetails.md +1 -1
- package/docs/TransactionTronContractDestination.md +12 -0
- package/docs/TransactionWebhookEventData.md +1 -1
- package/docs/TransactionsApi.md +1 -1
- package/docs/TronContractCallDestination.md +12 -0
- package/docs/UpdateCounterpartyByIdRequest.md +13 -0
- package/docs/UpdateDestinationBankAccount.md +19 -0
- package/docs/UpdateDestinationByIdRequest.md +14 -0
- package/docs/WalletAddress.md +12 -0
- package/docs/WebhookEventData.md +1 -1
- package/package.json +1 -1
- package/docs/ReceivedAmountPerAddress.md +0 -10
package/docs/PaymentApi.md
CHANGED
|
@@ -4,8 +4,14 @@ All URIs are relative to *https://api.dev.cobo.com/v2*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**batchGetExchangeRates**](PaymentApi.md#batchGetExchangeRates) | **GET** /payments/exchange_rates | Batch get exchange rates
|
|
7
8
|
[**cancelRefundById**](PaymentApi.md#cancelRefundById) | **PUT** /payments/refunds/{refund_id}/cancel | Cancel refund order
|
|
9
|
+
[**createCounterparty**](PaymentApi.md#createCounterparty) | **POST** /payments/counterparty | Create counterparty
|
|
10
|
+
[**createCounterpartyWalletAddress**](PaymentApi.md#createCounterpartyWalletAddress) | **POST** /payments/counterparty/wallet_address | Create counterparty wallet address
|
|
8
11
|
[**createCryptoAddress**](PaymentApi.md#createCryptoAddress) | **POST** /payments/crypto_addresses | Create crypto address
|
|
12
|
+
[**createDestination**](PaymentApi.md#createDestination) | **POST** /payments/destination | Create destination
|
|
13
|
+
[**createDestinationBankAccount**](PaymentApi.md#createDestinationBankAccount) | **POST** /payments/destination/bank_account | Create destination bank account
|
|
14
|
+
[**createDestinationWalletAddress**](PaymentApi.md#createDestinationWalletAddress) | **POST** /payments/destination/wallet_address | Create destination wallet address
|
|
9
15
|
[**createForcedSweepRequest**](PaymentApi.md#createForcedSweepRequest) | **POST** /payments/force_sweep_requests | Create forced sweep
|
|
10
16
|
[**createMerchant**](PaymentApi.md#createMerchant) | **POST** /payments/merchants | Create merchant
|
|
11
17
|
[**createOrderLink**](PaymentApi.md#createOrderLink) | **POST** /payments/links/orders | Create order link
|
|
@@ -13,18 +19,31 @@ Method | HTTP request | Description
|
|
|
13
19
|
[**createRefund**](PaymentApi.md#createRefund) | **POST** /payments/refunds | Create refund order
|
|
14
20
|
[**createRefundLink**](PaymentApi.md#createRefundLink) | **POST** /payments/links/refunds | Create refund link
|
|
15
21
|
[**createSettlementRequest**](PaymentApi.md#createSettlementRequest) | **POST** /payments/settlement_requests | Create settlement request
|
|
22
|
+
[**deleteCounterparty**](PaymentApi.md#deleteCounterparty) | **PUT** /payments/counterparty/{counterparty_id}/delete | Delete counterparty
|
|
23
|
+
[**deleteCounterpartyWalletAddress**](PaymentApi.md#deleteCounterpartyWalletAddress) | **PUT** /payments/counterparty/wallet_address/{wallet_address_id}/delete | Delete counterparty wallet address
|
|
16
24
|
[**deleteCryptoAddress**](PaymentApi.md#deleteCryptoAddress) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address
|
|
25
|
+
[**deleteDestination**](PaymentApi.md#deleteDestination) | **PUT** /payments/destination/{destination_id}/delete | Delete destination
|
|
26
|
+
[**deleteDestinationBankAccount**](PaymentApi.md#deleteDestinationBankAccount) | **PUT** /payments/destination/bank_account/{bank_account_id}/delete | Delete destination bank account
|
|
27
|
+
[**deleteDestinationWalletAddress**](PaymentApi.md#deleteDestinationWalletAddress) | **PUT** /payments/destination/wallet_address/{wallet_address_id}/delete | Delete destination wallet address
|
|
28
|
+
[**enableDestinationWhitelist**](PaymentApi.md#enableDestinationWhitelist) | **POST** /payments/destination/enable_whitelist | Enable or disable destination whitelist
|
|
29
|
+
[**getCounterpartyDetailById**](PaymentApi.md#getCounterpartyDetailById) | **GET** /payments/counterparty/{counterparty_id}/detail | Get counterparty information
|
|
30
|
+
[**getDestinationBankAccountDetailById**](PaymentApi.md#getDestinationBankAccountDetailById) | **GET** /payments/destination/bank_account/{bank_account_id}/detail | Get destination bank account information
|
|
31
|
+
[**getDestinationDetailById**](PaymentApi.md#getDestinationDetailById) | **GET** /payments/destination/{destination_id}/detail | Get destination information
|
|
17
32
|
[**getExchangeRate**](PaymentApi.md#getExchangeRate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate
|
|
18
|
-
[**getPayerBalanceByAddress**](PaymentApi.md#getPayerBalanceByAddress) | **GET** /payments/balance/payer/address | Get payer balance
|
|
19
33
|
[**getPaymentOrderDetailById**](PaymentApi.md#getPaymentOrderDetailById) | **GET** /payments/orders/{order_id} | Get pay-in order information
|
|
20
34
|
[**getPspBalance**](PaymentApi.md#getPspBalance) | **GET** /payments/balance/psp | Get developer balance
|
|
21
35
|
[**getRefundDetailById**](PaymentApi.md#getRefundDetailById) | **GET** /payments/refunds/{refund_id} | Get refund order information
|
|
22
36
|
[**getRefunds**](PaymentApi.md#getRefunds) | **GET** /payments/refunds | List all refund orders
|
|
23
37
|
[**getSettlementById**](PaymentApi.md#getSettlementById) | **GET** /payments/settlement_requests/{settlement_request_id} | Get settlement request information
|
|
24
38
|
[**getSettlementInfoByIds**](PaymentApi.md#getSettlementInfoByIds) | **GET** /payments/settlement_info | Get withdrawable balances
|
|
25
|
-
[**getTopUpAddress**](PaymentApi.md#getTopUpAddress) | **GET** /payments/topup/address | Get top-up address
|
|
39
|
+
[**getTopUpAddress**](PaymentApi.md#getTopUpAddress) | **GET** /payments/topup/address | Create/Get top-up address
|
|
26
40
|
[**listBankAccounts**](PaymentApi.md#listBankAccounts) | **GET** /payments/bank_accounts | List all bank accounts
|
|
41
|
+
[**listCounterparties**](PaymentApi.md#listCounterparties) | **GET** /payments/counterparty | List all counterparties
|
|
42
|
+
[**listCounterpartyWalletAddress**](PaymentApi.md#listCounterpartyWalletAddress) | **GET** /payments/counterparty/wallet_address | List counterparty wallet addresses
|
|
27
43
|
[**listCryptoAddresses**](PaymentApi.md#listCryptoAddresses) | **GET** /payments/crypto_addresses | List crypto addresses
|
|
44
|
+
[**listDestinationBankAccounts**](PaymentApi.md#listDestinationBankAccounts) | **GET** /payments/destination/bank_account | List destination bank accounts
|
|
45
|
+
[**listDestinationWalletAddresses**](PaymentApi.md#listDestinationWalletAddresses) | **GET** /payments/destination/wallet_address | List destination wallet addresses
|
|
46
|
+
[**listDestinations**](PaymentApi.md#listDestinations) | **GET** /payments/destination | List all destinations
|
|
28
47
|
[**listForcedSweepRequests**](PaymentApi.md#listForcedSweepRequests) | **GET** /payments/force_sweep_requests | List forced sweeps
|
|
29
48
|
[**listMerchantBalances**](PaymentApi.md#listMerchantBalances) | **GET** /payments/balance/merchants | List merchant balances
|
|
30
49
|
[**listMerchants**](PaymentApi.md#listMerchants) | **GET** /payments/merchants | List all merchants
|
|
@@ -36,7 +55,11 @@ Method | HTTP request | Description
|
|
|
36
55
|
[**listTopUpPayerAccounts**](PaymentApi.md#listTopUpPayerAccounts) | **GET** /payments/topup/payer_accounts | List top-up payer accounts
|
|
37
56
|
[**listTopUpPayers**](PaymentApi.md#listTopUpPayers) | **GET** /payments/topup/payers | List payers
|
|
38
57
|
[**paymentEstimateFee**](PaymentApi.md#paymentEstimateFee) | **POST** /payments/estimate_fee | Estimate fees
|
|
58
|
+
[**queryDestinationWhitelistEnabled**](PaymentApi.md#queryDestinationWhitelistEnabled) | **GET** /payments/destination/enable_whitelist | Query destination whitelist enabled status
|
|
39
59
|
[**updateBankAccountById**](PaymentApi.md#updateBankAccountById) | **PUT** /payments/bank_accounts/{bank_account_id} | Update bank account
|
|
60
|
+
[**updateCounterpartyById**](PaymentApi.md#updateCounterpartyById) | **PUT** /payments/counterparty/{counterparty_id}/update | Update counterparty
|
|
61
|
+
[**updateDestinationBankAccountById**](PaymentApi.md#updateDestinationBankAccountById) | **PUT** /payments/destination/bank_account/{bank_account_id}/update | Update destination bank account
|
|
62
|
+
[**updateDestinationById**](PaymentApi.md#updateDestinationById) | **PUT** /payments/destination/{destination_id}/update | Update destination
|
|
40
63
|
[**updateMerchantById**](PaymentApi.md#updateMerchantById) | **PUT** /payments/merchants/{merchant_id} | Update merchant
|
|
41
64
|
[**updatePaymentOrder**](PaymentApi.md#updatePaymentOrder) | **PUT** /payments/orders/{order_id} | Update pay-in order
|
|
42
65
|
[**updateRefundById**](PaymentApi.md#updateRefundById) | **PUT** /payments/refunds/{refund_id} | Update refund order
|
|
@@ -44,13 +67,13 @@ Method | HTTP request | Description
|
|
|
44
67
|
|
|
45
68
|
|
|
46
69
|
|
|
47
|
-
##
|
|
70
|
+
## batchGetExchangeRates
|
|
48
71
|
|
|
49
|
-
>
|
|
72
|
+
> [ExchangeRate] batchGetExchangeRates(token_ids, currencies)
|
|
50
73
|
|
|
51
|
-
|
|
74
|
+
Batch get exchange rates
|
|
52
75
|
|
|
53
|
-
This operation
|
|
76
|
+
This operation retrieves the current exchange rates between a specified currency and a list of token IDs.
|
|
54
77
|
|
|
55
78
|
### Example
|
|
56
79
|
|
|
@@ -64,8 +87,9 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
64
87
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
65
88
|
// Call the API
|
|
66
89
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
67
|
-
const
|
|
68
|
-
|
|
90
|
+
const token_ids = "ETH_USDT,ETH_USDC,BTC_USDT";
|
|
91
|
+
const currencies = "USD";
|
|
92
|
+
apiInstance.batchGetExchangeRates(token_ids, currencies).then((data) => {
|
|
69
93
|
console.log('API called successfully. Returned data: ' + data);
|
|
70
94
|
}, (error) => {
|
|
71
95
|
console.error(error);
|
|
@@ -78,15 +102,16 @@ apiInstance.cancelRefundById(refund_id).then((data) => {
|
|
|
78
102
|
|
|
79
103
|
Name | Type | Description | Notes
|
|
80
104
|
------------- | ------------- | ------------- | -------------
|
|
81
|
-
**
|
|
105
|
+
**token_ids** | **String**| A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). |
|
|
106
|
+
**currencies** | **String**| List of the fiat currencies, separated by comma. Currently, only `USD` is supported. |
|
|
82
107
|
|
|
83
108
|
### Return type
|
|
84
109
|
|
|
85
|
-
[**
|
|
110
|
+
[**[ExchangeRate]**](ExchangeRate.md)
|
|
86
111
|
|
|
87
112
|
### Authorization
|
|
88
113
|
|
|
89
|
-
[
|
|
114
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
90
115
|
|
|
91
116
|
### HTTP request headers
|
|
92
117
|
|
|
@@ -94,13 +119,13 @@ Name | Type | Description | Notes
|
|
|
94
119
|
- **Accept**: application/json
|
|
95
120
|
|
|
96
121
|
|
|
97
|
-
##
|
|
122
|
+
## cancelRefundById
|
|
98
123
|
|
|
99
|
-
>
|
|
124
|
+
> Refund cancelRefundById(refund_id)
|
|
100
125
|
|
|
101
|
-
|
|
126
|
+
Cancel refund order
|
|
102
127
|
|
|
103
|
-
This operation
|
|
128
|
+
This operation cancels a specified refund order. You can only cancel refund orders that have not been processed yet.
|
|
104
129
|
|
|
105
130
|
### Example
|
|
106
131
|
|
|
@@ -114,10 +139,8 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
114
139
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
115
140
|
// Call the API
|
|
116
141
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
};
|
|
120
|
-
apiInstance.createCryptoAddress(opts).then((data) => {
|
|
142
|
+
const refund_id = "R20250304-M1001-1001";
|
|
143
|
+
apiInstance.cancelRefundById(refund_id).then((data) => {
|
|
121
144
|
console.log('API called successfully. Returned data: ' + data);
|
|
122
145
|
}, (error) => {
|
|
123
146
|
console.error(error);
|
|
@@ -130,11 +153,11 @@ apiInstance.createCryptoAddress(opts).then((data) => {
|
|
|
130
153
|
|
|
131
154
|
Name | Type | Description | Notes
|
|
132
155
|
------------- | ------------- | ------------- | -------------
|
|
133
|
-
**
|
|
156
|
+
**refund_id** | **String**| The refund order ID. |
|
|
134
157
|
|
|
135
158
|
### Return type
|
|
136
159
|
|
|
137
|
-
[**
|
|
160
|
+
[**Refund**](Refund.md)
|
|
138
161
|
|
|
139
162
|
### Authorization
|
|
140
163
|
|
|
@@ -142,17 +165,17 @@ Name | Type | Description | Notes
|
|
|
142
165
|
|
|
143
166
|
### HTTP request headers
|
|
144
167
|
|
|
145
|
-
- **Content-Type**:
|
|
168
|
+
- **Content-Type**: Not defined
|
|
146
169
|
- **Accept**: application/json
|
|
147
170
|
|
|
148
171
|
|
|
149
|
-
##
|
|
172
|
+
## createCounterparty
|
|
150
173
|
|
|
151
|
-
>
|
|
174
|
+
> CounterpartyDetail createCounterparty(opts)
|
|
152
175
|
|
|
153
|
-
Create
|
|
176
|
+
Create counterparty
|
|
154
177
|
|
|
155
|
-
|
|
178
|
+
This operation creates a counterparty.
|
|
156
179
|
|
|
157
180
|
### Example
|
|
158
181
|
|
|
@@ -167,9 +190,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
167
190
|
// Call the API
|
|
168
191
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
169
192
|
const opts = {
|
|
170
|
-
'
|
|
193
|
+
'CreateCounterpartyRequest': new CoboWaas2.CreateCounterpartyRequest()
|
|
171
194
|
};
|
|
172
|
-
apiInstance.
|
|
195
|
+
apiInstance.createCounterparty(opts).then((data) => {
|
|
173
196
|
console.log('API called successfully. Returned data: ' + data);
|
|
174
197
|
}, (error) => {
|
|
175
198
|
console.error(error);
|
|
@@ -182,11 +205,11 @@ apiInstance.createForcedSweepRequest(opts).then((data) => {
|
|
|
182
205
|
|
|
183
206
|
Name | Type | Description | Notes
|
|
184
207
|
------------- | ------------- | ------------- | -------------
|
|
185
|
-
**
|
|
208
|
+
**CreateCounterpartyRequest** | [**CreateCounterpartyRequest**](CreateCounterpartyRequest.md)| The request body to create a counterparty. | [optional]
|
|
186
209
|
|
|
187
210
|
### Return type
|
|
188
211
|
|
|
189
|
-
[**
|
|
212
|
+
[**CounterpartyDetail**](CounterpartyDetail.md)
|
|
190
213
|
|
|
191
214
|
### Authorization
|
|
192
215
|
|
|
@@ -198,13 +221,13 @@ Name | Type | Description | Notes
|
|
|
198
221
|
- **Accept**: application/json
|
|
199
222
|
|
|
200
223
|
|
|
201
|
-
##
|
|
224
|
+
## createCounterpartyWalletAddress
|
|
202
225
|
|
|
203
|
-
>
|
|
226
|
+
> WalletAddress createCounterpartyWalletAddress(opts)
|
|
204
227
|
|
|
205
|
-
Create
|
|
228
|
+
Create counterparty wallet address
|
|
206
229
|
|
|
207
|
-
This operation creates a
|
|
230
|
+
This operation creates a counterparty wallet address.
|
|
208
231
|
|
|
209
232
|
### Example
|
|
210
233
|
|
|
@@ -219,9 +242,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
219
242
|
// Call the API
|
|
220
243
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
221
244
|
const opts = {
|
|
222
|
-
'
|
|
245
|
+
'CreateCounterpartyWalletAddressRequest': new CoboWaas2.CreateCounterpartyWalletAddressRequest()
|
|
223
246
|
};
|
|
224
|
-
apiInstance.
|
|
247
|
+
apiInstance.createCounterpartyWalletAddress(opts).then((data) => {
|
|
225
248
|
console.log('API called successfully. Returned data: ' + data);
|
|
226
249
|
}, (error) => {
|
|
227
250
|
console.error(error);
|
|
@@ -234,11 +257,11 @@ apiInstance.createMerchant(opts).then((data) => {
|
|
|
234
257
|
|
|
235
258
|
Name | Type | Description | Notes
|
|
236
259
|
------------- | ------------- | ------------- | -------------
|
|
237
|
-
**
|
|
260
|
+
**CreateCounterpartyWalletAddressRequest** | [**CreateCounterpartyWalletAddressRequest**](CreateCounterpartyWalletAddressRequest.md)| The request body to create a counterparty wallet address. | [optional]
|
|
238
261
|
|
|
239
262
|
### Return type
|
|
240
263
|
|
|
241
|
-
[**
|
|
264
|
+
[**WalletAddress**](WalletAddress.md)
|
|
242
265
|
|
|
243
266
|
### Authorization
|
|
244
267
|
|
|
@@ -250,13 +273,13 @@ Name | Type | Description | Notes
|
|
|
250
273
|
- **Accept**: application/json
|
|
251
274
|
|
|
252
275
|
|
|
253
|
-
##
|
|
276
|
+
## createCryptoAddress
|
|
254
277
|
|
|
255
|
-
>
|
|
278
|
+
> CryptoAddress createCryptoAddress(opts)
|
|
256
279
|
|
|
257
|
-
Create
|
|
280
|
+
Create crypto address
|
|
258
281
|
|
|
259
|
-
This operation
|
|
282
|
+
This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests.
|
|
260
283
|
|
|
261
284
|
### Example
|
|
262
285
|
|
|
@@ -271,9 +294,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
271
294
|
// Call the API
|
|
272
295
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
273
296
|
const opts = {
|
|
274
|
-
'
|
|
297
|
+
'CreateCryptoAddressRequest': new CoboWaas2.CreateCryptoAddressRequest()
|
|
275
298
|
};
|
|
276
|
-
apiInstance.
|
|
299
|
+
apiInstance.createCryptoAddress(opts).then((data) => {
|
|
277
300
|
console.log('API called successfully. Returned data: ' + data);
|
|
278
301
|
}, (error) => {
|
|
279
302
|
console.error(error);
|
|
@@ -286,15 +309,15 @@ apiInstance.createOrderLink(opts).then((data) => {
|
|
|
286
309
|
|
|
287
310
|
Name | Type | Description | Notes
|
|
288
311
|
------------- | ------------- | ------------- | -------------
|
|
289
|
-
**
|
|
312
|
+
**CreateCryptoAddressRequest** | [**CreateCryptoAddressRequest**](CreateCryptoAddressRequest.md)| The request body to register a crypto address. | [optional]
|
|
290
313
|
|
|
291
314
|
### Return type
|
|
292
315
|
|
|
293
|
-
[**
|
|
316
|
+
[**CryptoAddress**](CryptoAddress.md)
|
|
294
317
|
|
|
295
318
|
### Authorization
|
|
296
319
|
|
|
297
|
-
[CoboAuth](../README.md#CoboAuth)
|
|
320
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
298
321
|
|
|
299
322
|
### HTTP request headers
|
|
300
323
|
|
|
@@ -302,13 +325,13 @@ Name | Type | Description | Notes
|
|
|
302
325
|
- **Accept**: application/json
|
|
303
326
|
|
|
304
327
|
|
|
305
|
-
##
|
|
328
|
+
## createDestination
|
|
306
329
|
|
|
307
|
-
>
|
|
330
|
+
> DestinationDetail createDestination(opts)
|
|
308
331
|
|
|
309
|
-
Create
|
|
332
|
+
Create destination
|
|
310
333
|
|
|
311
|
-
This operation creates a
|
|
334
|
+
This operation creates a destination.
|
|
312
335
|
|
|
313
336
|
### Example
|
|
314
337
|
|
|
@@ -323,9 +346,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
323
346
|
// Call the API
|
|
324
347
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
325
348
|
const opts = {
|
|
326
|
-
'
|
|
349
|
+
'CreateDestinationRequest': new CoboWaas2.CreateDestinationRequest()
|
|
327
350
|
};
|
|
328
|
-
apiInstance.
|
|
351
|
+
apiInstance.createDestination(opts).then((data) => {
|
|
329
352
|
console.log('API called successfully. Returned data: ' + data);
|
|
330
353
|
}, (error) => {
|
|
331
354
|
console.error(error);
|
|
@@ -338,11 +361,11 @@ apiInstance.createPaymentOrder(opts).then((data) => {
|
|
|
338
361
|
|
|
339
362
|
Name | Type | Description | Notes
|
|
340
363
|
------------- | ------------- | ------------- | -------------
|
|
341
|
-
**
|
|
364
|
+
**CreateDestinationRequest** | [**CreateDestinationRequest**](CreateDestinationRequest.md)| The request body to create a destination. | [optional]
|
|
342
365
|
|
|
343
366
|
### Return type
|
|
344
367
|
|
|
345
|
-
[**
|
|
368
|
+
[**DestinationDetail**](DestinationDetail.md)
|
|
346
369
|
|
|
347
370
|
### Authorization
|
|
348
371
|
|
|
@@ -354,13 +377,13 @@ Name | Type | Description | Notes
|
|
|
354
377
|
- **Accept**: application/json
|
|
355
378
|
|
|
356
379
|
|
|
357
|
-
##
|
|
380
|
+
## createDestinationBankAccount
|
|
358
381
|
|
|
359
|
-
>
|
|
382
|
+
> DestinationBankAccount createDestinationBankAccount(opts)
|
|
360
383
|
|
|
361
|
-
Create
|
|
384
|
+
Create destination bank account
|
|
362
385
|
|
|
363
|
-
This operation creates a
|
|
386
|
+
This operation creates a destination bank account.
|
|
364
387
|
|
|
365
388
|
### Example
|
|
366
389
|
|
|
@@ -375,9 +398,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
375
398
|
// Call the API
|
|
376
399
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
377
400
|
const opts = {
|
|
378
|
-
'
|
|
401
|
+
'CreateDestinationBankAccountRequest': new CoboWaas2.CreateDestinationBankAccountRequest()
|
|
379
402
|
};
|
|
380
|
-
apiInstance.
|
|
403
|
+
apiInstance.createDestinationBankAccount(opts).then((data) => {
|
|
381
404
|
console.log('API called successfully. Returned data: ' + data);
|
|
382
405
|
}, (error) => {
|
|
383
406
|
console.error(error);
|
|
@@ -390,11 +413,11 @@ apiInstance.createRefund(opts).then((data) => {
|
|
|
390
413
|
|
|
391
414
|
Name | Type | Description | Notes
|
|
392
415
|
------------- | ------------- | ------------- | -------------
|
|
393
|
-
**
|
|
416
|
+
**CreateDestinationBankAccountRequest** | [**CreateDestinationBankAccountRequest**](CreateDestinationBankAccountRequest.md)| The request body to create a destination bank account. | [optional]
|
|
394
417
|
|
|
395
418
|
### Return type
|
|
396
419
|
|
|
397
|
-
[**
|
|
420
|
+
[**DestinationBankAccount**](DestinationBankAccount.md)
|
|
398
421
|
|
|
399
422
|
### Authorization
|
|
400
423
|
|
|
@@ -406,13 +429,13 @@ Name | Type | Description | Notes
|
|
|
406
429
|
- **Accept**: application/json
|
|
407
430
|
|
|
408
431
|
|
|
409
|
-
##
|
|
432
|
+
## createDestinationWalletAddress
|
|
410
433
|
|
|
411
|
-
>
|
|
434
|
+
> WalletAddress createDestinationWalletAddress(opts)
|
|
412
435
|
|
|
413
|
-
Create
|
|
436
|
+
Create destination wallet address
|
|
414
437
|
|
|
415
|
-
This operation creates a
|
|
438
|
+
This operation creates a destination wallet address.
|
|
416
439
|
|
|
417
440
|
### Example
|
|
418
441
|
|
|
@@ -427,9 +450,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
427
450
|
// Call the API
|
|
428
451
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
429
452
|
const opts = {
|
|
430
|
-
'
|
|
453
|
+
'CreateDestinationWalletAddressRequest': new CoboWaas2.CreateDestinationWalletAddressRequest()
|
|
431
454
|
};
|
|
432
|
-
apiInstance.
|
|
455
|
+
apiInstance.createDestinationWalletAddress(opts).then((data) => {
|
|
433
456
|
console.log('API called successfully. Returned data: ' + data);
|
|
434
457
|
}, (error) => {
|
|
435
458
|
console.error(error);
|
|
@@ -442,15 +465,15 @@ apiInstance.createRefundLink(opts).then((data) => {
|
|
|
442
465
|
|
|
443
466
|
Name | Type | Description | Notes
|
|
444
467
|
------------- | ------------- | ------------- | -------------
|
|
445
|
-
**
|
|
468
|
+
**CreateDestinationWalletAddressRequest** | [**CreateDestinationWalletAddressRequest**](CreateDestinationWalletAddressRequest.md)| The request body to create a destination wallet address. | [optional]
|
|
446
469
|
|
|
447
470
|
### Return type
|
|
448
471
|
|
|
449
|
-
[**
|
|
472
|
+
[**WalletAddress**](WalletAddress.md)
|
|
450
473
|
|
|
451
474
|
### Authorization
|
|
452
475
|
|
|
453
|
-
[CoboAuth](../README.md#CoboAuth)
|
|
476
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
454
477
|
|
|
455
478
|
### HTTP request headers
|
|
456
479
|
|
|
@@ -458,13 +481,13 @@ Name | Type | Description | Notes
|
|
|
458
481
|
- **Accept**: application/json
|
|
459
482
|
|
|
460
483
|
|
|
461
|
-
##
|
|
484
|
+
## createForcedSweepRequest
|
|
462
485
|
|
|
463
|
-
>
|
|
486
|
+
> ForcedSweep createForcedSweepRequest(opts)
|
|
464
487
|
|
|
465
|
-
Create
|
|
488
|
+
Create forced sweep
|
|
466
489
|
|
|
467
|
-
This operation creates a
|
|
490
|
+
<Warning>This operation has been deprecated.</Warning> This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address.
|
|
468
491
|
|
|
469
492
|
### Example
|
|
470
493
|
|
|
@@ -479,9 +502,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
479
502
|
// Call the API
|
|
480
503
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
481
504
|
const opts = {
|
|
482
|
-
'
|
|
505
|
+
'ForcedSweepRequest': new CoboWaas2.ForcedSweepRequest()
|
|
483
506
|
};
|
|
484
|
-
apiInstance.
|
|
507
|
+
apiInstance.createForcedSweepRequest(opts).then((data) => {
|
|
485
508
|
console.log('API called successfully. Returned data: ' + data);
|
|
486
509
|
}, (error) => {
|
|
487
510
|
console.error(error);
|
|
@@ -494,11 +517,11 @@ apiInstance.createSettlementRequest(opts).then((data) => {
|
|
|
494
517
|
|
|
495
518
|
Name | Type | Description | Notes
|
|
496
519
|
------------- | ------------- | ------------- | -------------
|
|
497
|
-
**
|
|
520
|
+
**ForcedSweepRequest** | [**ForcedSweepRequest**](ForcedSweepRequest.md)| The request body for forced sweep. | [optional]
|
|
498
521
|
|
|
499
522
|
### Return type
|
|
500
523
|
|
|
501
|
-
[**
|
|
524
|
+
[**ForcedSweep**](ForcedSweep.md)
|
|
502
525
|
|
|
503
526
|
### Authorization
|
|
504
527
|
|
|
@@ -510,13 +533,13 @@ Name | Type | Description | Notes
|
|
|
510
533
|
- **Accept**: application/json
|
|
511
534
|
|
|
512
535
|
|
|
513
|
-
##
|
|
536
|
+
## createMerchant
|
|
514
537
|
|
|
515
|
-
>
|
|
538
|
+
> Merchant createMerchant(opts)
|
|
516
539
|
|
|
517
|
-
|
|
540
|
+
Create merchant
|
|
518
541
|
|
|
519
|
-
This operation
|
|
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/developers/v2/payments/preparation#create-merchant).
|
|
520
543
|
|
|
521
544
|
### Example
|
|
522
545
|
|
|
@@ -530,8 +553,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
530
553
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
531
554
|
// Call the API
|
|
532
555
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
533
|
-
const
|
|
534
|
-
|
|
556
|
+
const opts = {
|
|
557
|
+
'CreateMerchantRequest': new CoboWaas2.CreateMerchantRequest()
|
|
558
|
+
};
|
|
559
|
+
apiInstance.createMerchant(opts).then((data) => {
|
|
535
560
|
console.log('API called successfully. Returned data: ' + data);
|
|
536
561
|
}, (error) => {
|
|
537
562
|
console.error(error);
|
|
@@ -544,11 +569,11 @@ apiInstance.deleteCryptoAddress(crypto_address_id).then((data) => {
|
|
|
544
569
|
|
|
545
570
|
Name | Type | Description | Notes
|
|
546
571
|
------------- | ------------- | ------------- | -------------
|
|
547
|
-
**
|
|
572
|
+
**CreateMerchantRequest** | [**CreateMerchantRequest**](CreateMerchantRequest.md)| The request body to create a merchant. | [optional]
|
|
548
573
|
|
|
549
574
|
### Return type
|
|
550
575
|
|
|
551
|
-
[**
|
|
576
|
+
[**Merchant**](Merchant.md)
|
|
552
577
|
|
|
553
578
|
### Authorization
|
|
554
579
|
|
|
@@ -556,17 +581,17 @@ Name | Type | Description | Notes
|
|
|
556
581
|
|
|
557
582
|
### HTTP request headers
|
|
558
583
|
|
|
559
|
-
- **Content-Type**:
|
|
584
|
+
- **Content-Type**: application/json
|
|
560
585
|
- **Accept**: application/json
|
|
561
586
|
|
|
562
587
|
|
|
563
|
-
##
|
|
588
|
+
## createOrderLink
|
|
564
589
|
|
|
565
|
-
>
|
|
590
|
+
> Link createOrderLink(opts)
|
|
566
591
|
|
|
567
|
-
|
|
592
|
+
Create order link
|
|
568
593
|
|
|
569
|
-
This operation
|
|
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/developers/v2/payments/payment-link).
|
|
570
595
|
|
|
571
596
|
### Example
|
|
572
597
|
|
|
@@ -580,9 +605,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
580
605
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
581
606
|
// Call the API
|
|
582
607
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
608
|
+
const opts = {
|
|
609
|
+
'CreateOrderLinkRequest': new CoboWaas2.CreateOrderLinkRequest()
|
|
610
|
+
};
|
|
611
|
+
apiInstance.createOrderLink(opts).then((data) => {
|
|
586
612
|
console.log('API called successfully. Returned data: ' + data);
|
|
587
613
|
}, (error) => {
|
|
588
614
|
console.error(error);
|
|
@@ -595,12 +621,11 @@ apiInstance.getExchangeRate(token_id, currency).then((data) => {
|
|
|
595
621
|
|
|
596
622
|
Name | Type | Description | Notes
|
|
597
623
|
------------- | ------------- | ------------- | -------------
|
|
598
|
-
**
|
|
599
|
-
**currency** | **String**| The fiat currency. Currently, only `USD` is supported. | [default to 'USD']
|
|
624
|
+
**CreateOrderLinkRequest** | [**CreateOrderLinkRequest**](CreateOrderLinkRequest.md)| The request body to create a payment link for a pay-in order. | [optional]
|
|
600
625
|
|
|
601
626
|
### Return type
|
|
602
627
|
|
|
603
|
-
[**
|
|
628
|
+
[**Link**](Link.md)
|
|
604
629
|
|
|
605
630
|
### Authorization
|
|
606
631
|
|
|
@@ -608,17 +633,17 @@ Name | Type | Description | Notes
|
|
|
608
633
|
|
|
609
634
|
### HTTP request headers
|
|
610
635
|
|
|
611
|
-
- **Content-Type**:
|
|
636
|
+
- **Content-Type**: application/json
|
|
612
637
|
- **Accept**: application/json
|
|
613
638
|
|
|
614
639
|
|
|
615
|
-
##
|
|
640
|
+
## createPaymentOrder
|
|
616
641
|
|
|
617
|
-
>
|
|
642
|
+
> Order createPaymentOrder(opts)
|
|
618
643
|
|
|
619
|
-
|
|
644
|
+
Create pay-in order
|
|
620
645
|
|
|
621
|
-
This operation
|
|
646
|
+
This operation creates a pay-in order.
|
|
622
647
|
|
|
623
648
|
### Example
|
|
624
649
|
|
|
@@ -632,12 +657,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
632
657
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
633
658
|
// Call the API
|
|
634
659
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
635
|
-
const payer_id = "P20250619T0310056d7aa";
|
|
636
|
-
const token_id = "ETH_USDT";
|
|
637
660
|
const opts = {
|
|
638
|
-
'
|
|
661
|
+
'CreatePaymentOrderRequest': new CoboWaas2.CreatePaymentOrderRequest()
|
|
639
662
|
};
|
|
640
|
-
apiInstance.
|
|
663
|
+
apiInstance.createPaymentOrder(opts).then((data) => {
|
|
641
664
|
console.log('API called successfully. Returned data: ' + data);
|
|
642
665
|
}, (error) => {
|
|
643
666
|
console.error(error);
|
|
@@ -650,13 +673,11 @@ apiInstance.getPayerBalanceByAddress(payer_id, token_id, opts).then((data) => {
|
|
|
650
673
|
|
|
651
674
|
Name | Type | Description | Notes
|
|
652
675
|
------------- | ------------- | ------------- | -------------
|
|
653
|
-
**
|
|
654
|
-
**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` |
|
|
655
|
-
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
676
|
+
**CreatePaymentOrderRequest** | [**CreatePaymentOrderRequest**](CreatePaymentOrderRequest.md)| The request body to create a pay-in order. | [optional]
|
|
656
677
|
|
|
657
678
|
### Return type
|
|
658
679
|
|
|
659
|
-
[**
|
|
680
|
+
[**Order**](Order.md)
|
|
660
681
|
|
|
661
682
|
### Authorization
|
|
662
683
|
|
|
@@ -664,17 +685,17 @@ Name | Type | Description | Notes
|
|
|
664
685
|
|
|
665
686
|
### HTTP request headers
|
|
666
687
|
|
|
667
|
-
- **Content-Type**:
|
|
688
|
+
- **Content-Type**: application/json
|
|
668
689
|
- **Accept**: application/json
|
|
669
690
|
|
|
670
691
|
|
|
671
|
-
##
|
|
692
|
+
## createRefund
|
|
672
693
|
|
|
673
|
-
>
|
|
694
|
+
> Refund createRefund(opts)
|
|
674
695
|
|
|
675
|
-
|
|
696
|
+
Create refund order
|
|
676
697
|
|
|
677
|
-
This operation
|
|
698
|
+
This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes.
|
|
678
699
|
|
|
679
700
|
### Example
|
|
680
701
|
|
|
@@ -688,8 +709,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
688
709
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
689
710
|
// Call the API
|
|
690
711
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
691
|
-
const
|
|
692
|
-
|
|
712
|
+
const opts = {
|
|
713
|
+
'CreateRefundRequest': new CoboWaas2.CreateRefundRequest()
|
|
714
|
+
};
|
|
715
|
+
apiInstance.createRefund(opts).then((data) => {
|
|
693
716
|
console.log('API called successfully. Returned data: ' + data);
|
|
694
717
|
}, (error) => {
|
|
695
718
|
console.error(error);
|
|
@@ -702,11 +725,11 @@ apiInstance.getPaymentOrderDetailById(order_id).then((data) => {
|
|
|
702
725
|
|
|
703
726
|
Name | Type | Description | Notes
|
|
704
727
|
------------- | ------------- | ------------- | -------------
|
|
705
|
-
**
|
|
728
|
+
**CreateRefundRequest** | [**CreateRefundRequest**](CreateRefundRequest.md)| The request body to create a refund order. | [optional]
|
|
706
729
|
|
|
707
730
|
### Return type
|
|
708
731
|
|
|
709
|
-
[**
|
|
732
|
+
[**Refund**](Refund.md)
|
|
710
733
|
|
|
711
734
|
### Authorization
|
|
712
735
|
|
|
@@ -714,17 +737,17 @@ Name | Type | Description | Notes
|
|
|
714
737
|
|
|
715
738
|
### HTTP request headers
|
|
716
739
|
|
|
717
|
-
- **Content-Type**:
|
|
740
|
+
- **Content-Type**: application/json
|
|
718
741
|
- **Accept**: application/json
|
|
719
742
|
|
|
720
743
|
|
|
721
|
-
##
|
|
744
|
+
## createRefundLink
|
|
722
745
|
|
|
723
|
-
>
|
|
746
|
+
> Link createRefundLink(opts)
|
|
724
747
|
|
|
725
|
-
|
|
748
|
+
Create refund link
|
|
726
749
|
|
|
727
|
-
This operation
|
|
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/developers/v2/payments/create-refund-link).
|
|
728
751
|
|
|
729
752
|
### Example
|
|
730
753
|
|
|
@@ -738,8 +761,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
738
761
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
739
762
|
// Call the API
|
|
740
763
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
741
|
-
const
|
|
742
|
-
|
|
764
|
+
const opts = {
|
|
765
|
+
'CreateRefundLinkRequest': new CoboWaas2.CreateRefundLinkRequest()
|
|
766
|
+
};
|
|
767
|
+
apiInstance.createRefundLink(opts).then((data) => {
|
|
743
768
|
console.log('API called successfully. Returned data: ' + data);
|
|
744
769
|
}, (error) => {
|
|
745
770
|
console.error(error);
|
|
@@ -752,29 +777,29 @@ apiInstance.getPspBalance(token_id).then((data) => {
|
|
|
752
777
|
|
|
753
778
|
Name | Type | Description | Notes
|
|
754
779
|
------------- | ------------- | ------------- | -------------
|
|
755
|
-
**
|
|
780
|
+
**CreateRefundLinkRequest** | [**CreateRefundLinkRequest**](CreateRefundLinkRequest.md)| The request body to create a refund link. | [optional]
|
|
756
781
|
|
|
757
782
|
### Return type
|
|
758
783
|
|
|
759
|
-
[**
|
|
784
|
+
[**Link**](Link.md)
|
|
760
785
|
|
|
761
786
|
### Authorization
|
|
762
787
|
|
|
763
|
-
[
|
|
788
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
764
789
|
|
|
765
790
|
### HTTP request headers
|
|
766
791
|
|
|
767
|
-
- **Content-Type**:
|
|
792
|
+
- **Content-Type**: application/json
|
|
768
793
|
- **Accept**: application/json
|
|
769
794
|
|
|
770
795
|
|
|
771
|
-
##
|
|
796
|
+
## createSettlementRequest
|
|
772
797
|
|
|
773
|
-
>
|
|
798
|
+
> Settlement createSettlementRequest(opts)
|
|
774
799
|
|
|
775
|
-
|
|
800
|
+
Create settlement request
|
|
776
801
|
|
|
777
|
-
This operation
|
|
802
|
+
This operation creates a settlement request to withdraw available balances.
|
|
778
803
|
|
|
779
804
|
### Example
|
|
780
805
|
|
|
@@ -788,8 +813,10 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
788
813
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
789
814
|
// Call the API
|
|
790
815
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
791
|
-
const
|
|
792
|
-
|
|
816
|
+
const opts = {
|
|
817
|
+
'CreateSettlementRequestRequest': new CoboWaas2.CreateSettlementRequestRequest()
|
|
818
|
+
};
|
|
819
|
+
apiInstance.createSettlementRequest(opts).then((data) => {
|
|
793
820
|
console.log('API called successfully. Returned data: ' + data);
|
|
794
821
|
}, (error) => {
|
|
795
822
|
console.error(error);
|
|
@@ -802,11 +829,11 @@ apiInstance.getRefundDetailById(refund_id).then((data) => {
|
|
|
802
829
|
|
|
803
830
|
Name | Type | Description | Notes
|
|
804
831
|
------------- | ------------- | ------------- | -------------
|
|
805
|
-
**
|
|
832
|
+
**CreateSettlementRequestRequest** | [**CreateSettlementRequestRequest**](CreateSettlementRequestRequest.md)| The request body to create a settlement request. | [optional]
|
|
806
833
|
|
|
807
834
|
### Return type
|
|
808
835
|
|
|
809
|
-
[**
|
|
836
|
+
[**Settlement**](Settlement.md)
|
|
810
837
|
|
|
811
838
|
### Authorization
|
|
812
839
|
|
|
@@ -814,17 +841,17 @@ Name | Type | Description | Notes
|
|
|
814
841
|
|
|
815
842
|
### HTTP request headers
|
|
816
843
|
|
|
817
|
-
- **Content-Type**:
|
|
844
|
+
- **Content-Type**: application/json
|
|
818
845
|
- **Accept**: application/json
|
|
819
846
|
|
|
820
847
|
|
|
821
|
-
##
|
|
848
|
+
## deleteCounterparty
|
|
822
849
|
|
|
823
|
-
>
|
|
850
|
+
> DeleteCounterparty200Response deleteCounterparty(counterparty_id)
|
|
824
851
|
|
|
825
|
-
|
|
852
|
+
Delete counterparty
|
|
826
853
|
|
|
827
|
-
This operation
|
|
854
|
+
This operation deletes a counterparty.
|
|
828
855
|
|
|
829
856
|
### Example
|
|
830
857
|
|
|
@@ -838,15 +865,8 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
838
865
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
839
866
|
// Call the API
|
|
840
867
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
841
|
-
const
|
|
842
|
-
|
|
843
|
-
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
844
|
-
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
845
|
-
'merchant_id': "M1001",
|
|
846
|
-
'request_id': "random_request_id",
|
|
847
|
-
'statuses': "Pending,Processing"
|
|
848
|
-
};
|
|
849
|
-
apiInstance.getRefunds(opts).then((data) => {
|
|
868
|
+
const counterparty_id = "5b0ed293-f728-40b4-b1f6-86b88cd51384";
|
|
869
|
+
apiInstance.deleteCounterparty(counterparty_id).then((data) => {
|
|
850
870
|
console.log('API called successfully. Returned data: ' + data);
|
|
851
871
|
}, (error) => {
|
|
852
872
|
console.error(error);
|
|
@@ -859,16 +879,11 @@ apiInstance.getRefunds(opts).then((data) => {
|
|
|
859
879
|
|
|
860
880
|
Name | Type | Description | Notes
|
|
861
881
|
------------- | ------------- | ------------- | -------------
|
|
862
|
-
**
|
|
863
|
-
**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]
|
|
864
|
-
**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]
|
|
865
|
-
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
866
|
-
**request_id** | **String**| The request ID. | [optional]
|
|
867
|
-
**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/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details) | [optional]
|
|
882
|
+
**counterparty_id** | **String**| The counterparty ID. |
|
|
868
883
|
|
|
869
884
|
### Return type
|
|
870
885
|
|
|
871
|
-
[**
|
|
886
|
+
[**DeleteCounterparty200Response**](DeleteCounterparty200Response.md)
|
|
872
887
|
|
|
873
888
|
### Authorization
|
|
874
889
|
|
|
@@ -880,13 +895,13 @@ Name | Type | Description | Notes
|
|
|
880
895
|
- **Accept**: application/json
|
|
881
896
|
|
|
882
897
|
|
|
883
|
-
##
|
|
898
|
+
## deleteCounterpartyWalletAddress
|
|
884
899
|
|
|
885
|
-
>
|
|
900
|
+
> DeleteCounterpartyWalletAddress200Response deleteCounterpartyWalletAddress(wallet_address_id)
|
|
886
901
|
|
|
887
|
-
|
|
902
|
+
Delete counterparty wallet address
|
|
888
903
|
|
|
889
|
-
This operation
|
|
904
|
+
This operation deletes a counterparty wallet address.
|
|
890
905
|
|
|
891
906
|
### Example
|
|
892
907
|
|
|
@@ -900,8 +915,1001 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
900
915
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
901
916
|
// Call the API
|
|
902
917
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
903
|
-
const
|
|
904
|
-
apiInstance.
|
|
918
|
+
const wallet_address_id = "445bac57-7428-4d25-bce1-b3cd017f47a1";
|
|
919
|
+
apiInstance.deleteCounterpartyWalletAddress(wallet_address_id).then((data) => {
|
|
920
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
921
|
+
}, (error) => {
|
|
922
|
+
console.error(error);
|
|
923
|
+
});
|
|
924
|
+
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
### Parameters
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
Name | Type | Description | Notes
|
|
931
|
+
------------- | ------------- | ------------- | -------------
|
|
932
|
+
**wallet_address_id** | **String**| The wallet address ID. |
|
|
933
|
+
|
|
934
|
+
### Return type
|
|
935
|
+
|
|
936
|
+
[**DeleteCounterpartyWalletAddress200Response**](DeleteCounterpartyWalletAddress200Response.md)
|
|
937
|
+
|
|
938
|
+
### Authorization
|
|
939
|
+
|
|
940
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
941
|
+
|
|
942
|
+
### HTTP request headers
|
|
943
|
+
|
|
944
|
+
- **Content-Type**: Not defined
|
|
945
|
+
- **Accept**: application/json
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
## deleteCryptoAddress
|
|
949
|
+
|
|
950
|
+
> DeleteCryptoAddress201Response deleteCryptoAddress(crypto_address_id)
|
|
951
|
+
|
|
952
|
+
Delete crypto address
|
|
953
|
+
|
|
954
|
+
This operation unregisters a crypto address from being used for crypto payouts.
|
|
955
|
+
|
|
956
|
+
### Example
|
|
957
|
+
|
|
958
|
+
```javascript
|
|
959
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
960
|
+
// Initialize the API client
|
|
961
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
962
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
963
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
964
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
965
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
966
|
+
// Call the API
|
|
967
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
968
|
+
const crypto_address_id = "addr_ethusdt_20250506T123456_ab12cd";
|
|
969
|
+
apiInstance.deleteCryptoAddress(crypto_address_id).then((data) => {
|
|
970
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
971
|
+
}, (error) => {
|
|
972
|
+
console.error(error);
|
|
973
|
+
});
|
|
974
|
+
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
### Parameters
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
Name | Type | Description | Notes
|
|
981
|
+
------------- | ------------- | ------------- | -------------
|
|
982
|
+
**crypto_address_id** | **String**| The crypto address ID. |
|
|
983
|
+
|
|
984
|
+
### Return type
|
|
985
|
+
|
|
986
|
+
[**DeleteCryptoAddress201Response**](DeleteCryptoAddress201Response.md)
|
|
987
|
+
|
|
988
|
+
### Authorization
|
|
989
|
+
|
|
990
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
991
|
+
|
|
992
|
+
### HTTP request headers
|
|
993
|
+
|
|
994
|
+
- **Content-Type**: Not defined
|
|
995
|
+
- **Accept**: application/json
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
## deleteDestination
|
|
999
|
+
|
|
1000
|
+
> DeleteDestination200Response deleteDestination(destination_id)
|
|
1001
|
+
|
|
1002
|
+
Delete destination
|
|
1003
|
+
|
|
1004
|
+
This operation deletes a destination.
|
|
1005
|
+
|
|
1006
|
+
### Example
|
|
1007
|
+
|
|
1008
|
+
```javascript
|
|
1009
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1010
|
+
// Initialize the API client
|
|
1011
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1012
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1013
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1014
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1015
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1016
|
+
// Call the API
|
|
1017
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1018
|
+
const destination_id = "46beeab4-6a8e-476e-bc69-99b89aacbc6f";
|
|
1019
|
+
apiInstance.deleteDestination(destination_id).then((data) => {
|
|
1020
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1021
|
+
}, (error) => {
|
|
1022
|
+
console.error(error);
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
```
|
|
1026
|
+
|
|
1027
|
+
### Parameters
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
Name | Type | Description | Notes
|
|
1031
|
+
------------- | ------------- | ------------- | -------------
|
|
1032
|
+
**destination_id** | **String**| The destination ID. |
|
|
1033
|
+
|
|
1034
|
+
### Return type
|
|
1035
|
+
|
|
1036
|
+
[**DeleteDestination200Response**](DeleteDestination200Response.md)
|
|
1037
|
+
|
|
1038
|
+
### Authorization
|
|
1039
|
+
|
|
1040
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1041
|
+
|
|
1042
|
+
### HTTP request headers
|
|
1043
|
+
|
|
1044
|
+
- **Content-Type**: Not defined
|
|
1045
|
+
- **Accept**: application/json
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
## deleteDestinationBankAccount
|
|
1049
|
+
|
|
1050
|
+
> DeleteDestinationBankAccount200Response deleteDestinationBankAccount(bank_account_id)
|
|
1051
|
+
|
|
1052
|
+
Delete destination bank account
|
|
1053
|
+
|
|
1054
|
+
This operation deletes a destination bank account.
|
|
1055
|
+
|
|
1056
|
+
### Example
|
|
1057
|
+
|
|
1058
|
+
```javascript
|
|
1059
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1060
|
+
// Initialize the API client
|
|
1061
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1062
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1063
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1064
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1065
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1066
|
+
// Call the API
|
|
1067
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1068
|
+
const bank_account_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
1069
|
+
apiInstance.deleteDestinationBankAccount(bank_account_id).then((data) => {
|
|
1070
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1071
|
+
}, (error) => {
|
|
1072
|
+
console.error(error);
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Parameters
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
Name | Type | Description | Notes
|
|
1081
|
+
------------- | ------------- | ------------- | -------------
|
|
1082
|
+
**bank_account_id** | **String**| The bank account ID. |
|
|
1083
|
+
|
|
1084
|
+
### Return type
|
|
1085
|
+
|
|
1086
|
+
[**DeleteDestinationBankAccount200Response**](DeleteDestinationBankAccount200Response.md)
|
|
1087
|
+
|
|
1088
|
+
### Authorization
|
|
1089
|
+
|
|
1090
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1091
|
+
|
|
1092
|
+
### HTTP request headers
|
|
1093
|
+
|
|
1094
|
+
- **Content-Type**: Not defined
|
|
1095
|
+
- **Accept**: application/json
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
## deleteDestinationWalletAddress
|
|
1099
|
+
|
|
1100
|
+
> DeleteDestinationWalletAddress200Response deleteDestinationWalletAddress(wallet_address_id)
|
|
1101
|
+
|
|
1102
|
+
Delete destination wallet address
|
|
1103
|
+
|
|
1104
|
+
This operation deletes a destination wallet address.
|
|
1105
|
+
|
|
1106
|
+
### Example
|
|
1107
|
+
|
|
1108
|
+
```javascript
|
|
1109
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1110
|
+
// Initialize the API client
|
|
1111
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1112
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1113
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1114
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1115
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1116
|
+
// Call the API
|
|
1117
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1118
|
+
const wallet_address_id = "445bac57-7428-4d25-bce1-b3cd017f47a1";
|
|
1119
|
+
apiInstance.deleteDestinationWalletAddress(wallet_address_id).then((data) => {
|
|
1120
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1121
|
+
}, (error) => {
|
|
1122
|
+
console.error(error);
|
|
1123
|
+
});
|
|
1124
|
+
|
|
1125
|
+
```
|
|
1126
|
+
|
|
1127
|
+
### Parameters
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
Name | Type | Description | Notes
|
|
1131
|
+
------------- | ------------- | ------------- | -------------
|
|
1132
|
+
**wallet_address_id** | **String**| The wallet address ID. |
|
|
1133
|
+
|
|
1134
|
+
### Return type
|
|
1135
|
+
|
|
1136
|
+
[**DeleteDestinationWalletAddress200Response**](DeleteDestinationWalletAddress200Response.md)
|
|
1137
|
+
|
|
1138
|
+
### Authorization
|
|
1139
|
+
|
|
1140
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1141
|
+
|
|
1142
|
+
### HTTP request headers
|
|
1143
|
+
|
|
1144
|
+
- **Content-Type**: Not defined
|
|
1145
|
+
- **Accept**: application/json
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
## enableDestinationWhitelist
|
|
1149
|
+
|
|
1150
|
+
> QueryDestinationWhitelistEnabled200Response enableDestinationWhitelist(opts)
|
|
1151
|
+
|
|
1152
|
+
Enable or disable destination whitelist
|
|
1153
|
+
|
|
1154
|
+
This operation enables or disables the whitelist for a destination.
|
|
1155
|
+
|
|
1156
|
+
### Example
|
|
1157
|
+
|
|
1158
|
+
```javascript
|
|
1159
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1160
|
+
// Initialize the API client
|
|
1161
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1162
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1163
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1164
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1165
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1166
|
+
// Call the API
|
|
1167
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1168
|
+
const opts = {
|
|
1169
|
+
'EnableDestinationWhitelistRequest': new CoboWaas2.EnableDestinationWhitelistRequest()
|
|
1170
|
+
};
|
|
1171
|
+
apiInstance.enableDestinationWhitelist(opts).then((data) => {
|
|
1172
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1173
|
+
}, (error) => {
|
|
1174
|
+
console.error(error);
|
|
1175
|
+
});
|
|
1176
|
+
|
|
1177
|
+
```
|
|
1178
|
+
|
|
1179
|
+
### Parameters
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
Name | Type | Description | Notes
|
|
1183
|
+
------------- | ------------- | ------------- | -------------
|
|
1184
|
+
**EnableDestinationWhitelistRequest** | [**EnableDestinationWhitelistRequest**](EnableDestinationWhitelistRequest.md)| The request body to enable or disable the destination whitelist. | [optional]
|
|
1185
|
+
|
|
1186
|
+
### Return type
|
|
1187
|
+
|
|
1188
|
+
[**QueryDestinationWhitelistEnabled200Response**](QueryDestinationWhitelistEnabled200Response.md)
|
|
1189
|
+
|
|
1190
|
+
### Authorization
|
|
1191
|
+
|
|
1192
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1193
|
+
|
|
1194
|
+
### HTTP request headers
|
|
1195
|
+
|
|
1196
|
+
- **Content-Type**: application/json
|
|
1197
|
+
- **Accept**: application/json
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
## getCounterpartyDetailById
|
|
1201
|
+
|
|
1202
|
+
> CounterpartyDetail getCounterpartyDetailById(counterparty_id)
|
|
1203
|
+
|
|
1204
|
+
Get counterparty information
|
|
1205
|
+
|
|
1206
|
+
This operation retrieves the detailed information about a specified counterparty.
|
|
1207
|
+
|
|
1208
|
+
### Example
|
|
1209
|
+
|
|
1210
|
+
```javascript
|
|
1211
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1212
|
+
// Initialize the API client
|
|
1213
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1214
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1215
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1216
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1217
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1218
|
+
// Call the API
|
|
1219
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1220
|
+
const counterparty_id = "5b0ed293-f728-40b4-b1f6-86b88cd51384";
|
|
1221
|
+
apiInstance.getCounterpartyDetailById(counterparty_id).then((data) => {
|
|
1222
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1223
|
+
}, (error) => {
|
|
1224
|
+
console.error(error);
|
|
1225
|
+
});
|
|
1226
|
+
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
### Parameters
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
Name | Type | Description | Notes
|
|
1233
|
+
------------- | ------------- | ------------- | -------------
|
|
1234
|
+
**counterparty_id** | **String**| The counterparty ID. |
|
|
1235
|
+
|
|
1236
|
+
### Return type
|
|
1237
|
+
|
|
1238
|
+
[**CounterpartyDetail**](CounterpartyDetail.md)
|
|
1239
|
+
|
|
1240
|
+
### Authorization
|
|
1241
|
+
|
|
1242
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1243
|
+
|
|
1244
|
+
### HTTP request headers
|
|
1245
|
+
|
|
1246
|
+
- **Content-Type**: Not defined
|
|
1247
|
+
- **Accept**: application/json
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
## getDestinationBankAccountDetailById
|
|
1251
|
+
|
|
1252
|
+
> DestinationBankAccountDetail getDestinationBankAccountDetailById(bank_account_id)
|
|
1253
|
+
|
|
1254
|
+
Get destination bank account information
|
|
1255
|
+
|
|
1256
|
+
This operation retrieves the detailed information about a specified destination bank account.
|
|
1257
|
+
|
|
1258
|
+
### Example
|
|
1259
|
+
|
|
1260
|
+
```javascript
|
|
1261
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1262
|
+
// Initialize the API client
|
|
1263
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1264
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1265
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1266
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1267
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1268
|
+
// Call the API
|
|
1269
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1270
|
+
const bank_account_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
1271
|
+
apiInstance.getDestinationBankAccountDetailById(bank_account_id).then((data) => {
|
|
1272
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1273
|
+
}, (error) => {
|
|
1274
|
+
console.error(error);
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
```
|
|
1278
|
+
|
|
1279
|
+
### Parameters
|
|
1280
|
+
|
|
1281
|
+
|
|
1282
|
+
Name | Type | Description | Notes
|
|
1283
|
+
------------- | ------------- | ------------- | -------------
|
|
1284
|
+
**bank_account_id** | **String**| The bank account ID. |
|
|
1285
|
+
|
|
1286
|
+
### Return type
|
|
1287
|
+
|
|
1288
|
+
[**DestinationBankAccountDetail**](DestinationBankAccountDetail.md)
|
|
1289
|
+
|
|
1290
|
+
### Authorization
|
|
1291
|
+
|
|
1292
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1293
|
+
|
|
1294
|
+
### HTTP request headers
|
|
1295
|
+
|
|
1296
|
+
- **Content-Type**: Not defined
|
|
1297
|
+
- **Accept**: application/json
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
## getDestinationDetailById
|
|
1301
|
+
|
|
1302
|
+
> DestinationDetail getDestinationDetailById(destination_id)
|
|
1303
|
+
|
|
1304
|
+
Get destination information
|
|
1305
|
+
|
|
1306
|
+
This operation retrieves the detailed information about a specified destination.
|
|
1307
|
+
|
|
1308
|
+
### Example
|
|
1309
|
+
|
|
1310
|
+
```javascript
|
|
1311
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1312
|
+
// Initialize the API client
|
|
1313
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1314
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1315
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1316
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1317
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1318
|
+
// Call the API
|
|
1319
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1320
|
+
const destination_id = "46beeab4-6a8e-476e-bc69-99b89aacbc6f";
|
|
1321
|
+
apiInstance.getDestinationDetailById(destination_id).then((data) => {
|
|
1322
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1323
|
+
}, (error) => {
|
|
1324
|
+
console.error(error);
|
|
1325
|
+
});
|
|
1326
|
+
|
|
1327
|
+
```
|
|
1328
|
+
|
|
1329
|
+
### Parameters
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
Name | Type | Description | Notes
|
|
1333
|
+
------------- | ------------- | ------------- | -------------
|
|
1334
|
+
**destination_id** | **String**| The destination ID. |
|
|
1335
|
+
|
|
1336
|
+
### Return type
|
|
1337
|
+
|
|
1338
|
+
[**DestinationDetail**](DestinationDetail.md)
|
|
1339
|
+
|
|
1340
|
+
### Authorization
|
|
1341
|
+
|
|
1342
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1343
|
+
|
|
1344
|
+
### HTTP request headers
|
|
1345
|
+
|
|
1346
|
+
- **Content-Type**: Not defined
|
|
1347
|
+
- **Accept**: application/json
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
## getExchangeRate
|
|
1351
|
+
|
|
1352
|
+
> GetExchangeRate200Response getExchangeRate(token_id, currency)
|
|
1353
|
+
|
|
1354
|
+
Get exchange rate
|
|
1355
|
+
|
|
1356
|
+
This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. <Note>This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors.</Note>
|
|
1357
|
+
|
|
1358
|
+
### Example
|
|
1359
|
+
|
|
1360
|
+
```javascript
|
|
1361
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1362
|
+
// Initialize the API client
|
|
1363
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1364
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1365
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1366
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1367
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1368
|
+
// Call the API
|
|
1369
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1370
|
+
const token_id = "ETH_USDT";
|
|
1371
|
+
const currency = "USD";
|
|
1372
|
+
apiInstance.getExchangeRate(token_id, currency).then((data) => {
|
|
1373
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1374
|
+
}, (error) => {
|
|
1375
|
+
console.error(error);
|
|
1376
|
+
});
|
|
1377
|
+
|
|
1378
|
+
```
|
|
1379
|
+
|
|
1380
|
+
### Parameters
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
Name | Type | Description | Notes
|
|
1384
|
+
------------- | ------------- | ------------- | -------------
|
|
1385
|
+
**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` |
|
|
1386
|
+
**currency** | **String**| The fiat currency. Currently, only `USD` is supported. | [default to 'USD']
|
|
1387
|
+
|
|
1388
|
+
### Return type
|
|
1389
|
+
|
|
1390
|
+
[**GetExchangeRate200Response**](GetExchangeRate200Response.md)
|
|
1391
|
+
|
|
1392
|
+
### Authorization
|
|
1393
|
+
|
|
1394
|
+
[CoboAuth](../README.md#CoboAuth)
|
|
1395
|
+
|
|
1396
|
+
### HTTP request headers
|
|
1397
|
+
|
|
1398
|
+
- **Content-Type**: Not defined
|
|
1399
|
+
- **Accept**: application/json
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
## getPaymentOrderDetailById
|
|
1403
|
+
|
|
1404
|
+
> Order getPaymentOrderDetailById(order_id)
|
|
1405
|
+
|
|
1406
|
+
Get pay-in order information
|
|
1407
|
+
|
|
1408
|
+
This operation retrieves details of a specific pay-in order.
|
|
1409
|
+
|
|
1410
|
+
### Example
|
|
1411
|
+
|
|
1412
|
+
```javascript
|
|
1413
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1414
|
+
// Initialize the API client
|
|
1415
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1416
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1417
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1418
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1419
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1420
|
+
// Call the API
|
|
1421
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1422
|
+
const order_id = "O20250304-M1001-1001";
|
|
1423
|
+
apiInstance.getPaymentOrderDetailById(order_id).then((data) => {
|
|
1424
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1425
|
+
}, (error) => {
|
|
1426
|
+
console.error(error);
|
|
1427
|
+
});
|
|
1428
|
+
|
|
1429
|
+
```
|
|
1430
|
+
|
|
1431
|
+
### Parameters
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
Name | Type | Description | Notes
|
|
1435
|
+
------------- | ------------- | ------------- | -------------
|
|
1436
|
+
**order_id** | **String**| The pay-in order ID. |
|
|
1437
|
+
|
|
1438
|
+
### Return type
|
|
1439
|
+
|
|
1440
|
+
[**Order**](Order.md)
|
|
1441
|
+
|
|
1442
|
+
### Authorization
|
|
1443
|
+
|
|
1444
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1445
|
+
|
|
1446
|
+
### HTTP request headers
|
|
1447
|
+
|
|
1448
|
+
- **Content-Type**: Not defined
|
|
1449
|
+
- **Accept**: application/json
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
## getPspBalance
|
|
1453
|
+
|
|
1454
|
+
> PspBalance getPspBalance(token_id)
|
|
1455
|
+
|
|
1456
|
+
Get developer balance
|
|
1457
|
+
|
|
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/developers/v2/payments/amounts-and-balances).
|
|
1459
|
+
|
|
1460
|
+
### Example
|
|
1461
|
+
|
|
1462
|
+
```javascript
|
|
1463
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1464
|
+
// Initialize the API client
|
|
1465
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1466
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1467
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1468
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1469
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1470
|
+
// Call the API
|
|
1471
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1472
|
+
const token_id = "ETH_USDT";
|
|
1473
|
+
apiInstance.getPspBalance(token_id).then((data) => {
|
|
1474
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1475
|
+
}, (error) => {
|
|
1476
|
+
console.error(error);
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
### Parameters
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
Name | Type | Description | Notes
|
|
1485
|
+
------------- | ------------- | ------------- | -------------
|
|
1486
|
+
**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` |
|
|
1487
|
+
|
|
1488
|
+
### Return type
|
|
1489
|
+
|
|
1490
|
+
[**PspBalance**](PspBalance.md)
|
|
1491
|
+
|
|
1492
|
+
### Authorization
|
|
1493
|
+
|
|
1494
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1495
|
+
|
|
1496
|
+
### HTTP request headers
|
|
1497
|
+
|
|
1498
|
+
- **Content-Type**: Not defined
|
|
1499
|
+
- **Accept**: application/json
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
## getRefundDetailById
|
|
1503
|
+
|
|
1504
|
+
> Refund getRefundDetailById(refund_id)
|
|
1505
|
+
|
|
1506
|
+
Get refund order information
|
|
1507
|
+
|
|
1508
|
+
This operation retrieves the detailed information about a specified refund order.
|
|
1509
|
+
|
|
1510
|
+
### Example
|
|
1511
|
+
|
|
1512
|
+
```javascript
|
|
1513
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1514
|
+
// Initialize the API client
|
|
1515
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1516
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1517
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1518
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1519
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1520
|
+
// Call the API
|
|
1521
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1522
|
+
const refund_id = "R20250304-M1001-1001";
|
|
1523
|
+
apiInstance.getRefundDetailById(refund_id).then((data) => {
|
|
1524
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1525
|
+
}, (error) => {
|
|
1526
|
+
console.error(error);
|
|
1527
|
+
});
|
|
1528
|
+
|
|
1529
|
+
```
|
|
1530
|
+
|
|
1531
|
+
### Parameters
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
Name | Type | Description | Notes
|
|
1535
|
+
------------- | ------------- | ------------- | -------------
|
|
1536
|
+
**refund_id** | **String**| The refund order ID. |
|
|
1537
|
+
|
|
1538
|
+
### Return type
|
|
1539
|
+
|
|
1540
|
+
[**Refund**](Refund.md)
|
|
1541
|
+
|
|
1542
|
+
### Authorization
|
|
1543
|
+
|
|
1544
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1545
|
+
|
|
1546
|
+
### HTTP request headers
|
|
1547
|
+
|
|
1548
|
+
- **Content-Type**: Not defined
|
|
1549
|
+
- **Accept**: application/json
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
## getRefunds
|
|
1553
|
+
|
|
1554
|
+
> GetRefunds200Response getRefunds(opts)
|
|
1555
|
+
|
|
1556
|
+
List all refund orders
|
|
1557
|
+
|
|
1558
|
+
This operation retrieves the information of all refund orders.
|
|
1559
|
+
|
|
1560
|
+
### Example
|
|
1561
|
+
|
|
1562
|
+
```javascript
|
|
1563
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1564
|
+
// Initialize the API client
|
|
1565
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1566
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1567
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1568
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1569
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1570
|
+
// Call the API
|
|
1571
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1572
|
+
const opts = {
|
|
1573
|
+
'limit': 10,
|
|
1574
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
1575
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
1576
|
+
'merchant_id': "M1001",
|
|
1577
|
+
'request_id': "random_request_id",
|
|
1578
|
+
'statuses': "Pending,Processing"
|
|
1579
|
+
};
|
|
1580
|
+
apiInstance.getRefunds(opts).then((data) => {
|
|
1581
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1582
|
+
}, (error) => {
|
|
1583
|
+
console.error(error);
|
|
1584
|
+
});
|
|
1585
|
+
|
|
1586
|
+
```
|
|
1587
|
+
|
|
1588
|
+
### Parameters
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
Name | Type | Description | Notes
|
|
1592
|
+
------------- | ------------- | ------------- | -------------
|
|
1593
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
1594
|
+
**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]
|
|
1595
|
+
**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
|
+
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
1597
|
+
**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/developers/v2/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/developers/v2/api-references/payment/get-refund-order-information) - [List all settlement details](https://www.cobo.com/developers/v2/api-references/payment/list-all-settlement-details) | [optional]
|
|
1599
|
+
|
|
1600
|
+
### Return type
|
|
1601
|
+
|
|
1602
|
+
[**GetRefunds200Response**](GetRefunds200Response.md)
|
|
1603
|
+
|
|
1604
|
+
### Authorization
|
|
1605
|
+
|
|
1606
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1607
|
+
|
|
1608
|
+
### HTTP request headers
|
|
1609
|
+
|
|
1610
|
+
- **Content-Type**: Not defined
|
|
1611
|
+
- **Accept**: application/json
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
## getSettlementById
|
|
1615
|
+
|
|
1616
|
+
> Settlement getSettlementById(settlement_request_id)
|
|
1617
|
+
|
|
1618
|
+
Get settlement request information
|
|
1619
|
+
|
|
1620
|
+
This operation retrieves the information of a specific settlement request.
|
|
1621
|
+
|
|
1622
|
+
### Example
|
|
1623
|
+
|
|
1624
|
+
```javascript
|
|
1625
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1626
|
+
// Initialize the API client
|
|
1627
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1628
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1629
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1630
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1631
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1632
|
+
// Call the API
|
|
1633
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1634
|
+
const settlement_request_id = "S20250304-1001";
|
|
1635
|
+
apiInstance.getSettlementById(settlement_request_id).then((data) => {
|
|
1636
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1637
|
+
}, (error) => {
|
|
1638
|
+
console.error(error);
|
|
1639
|
+
});
|
|
1640
|
+
|
|
1641
|
+
```
|
|
1642
|
+
|
|
1643
|
+
### Parameters
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
Name | Type | Description | Notes
|
|
1647
|
+
------------- | ------------- | ------------- | -------------
|
|
1648
|
+
**settlement_request_id** | **String**| The settlement request ID. |
|
|
1649
|
+
|
|
1650
|
+
### Return type
|
|
1651
|
+
|
|
1652
|
+
[**Settlement**](Settlement.md)
|
|
1653
|
+
|
|
1654
|
+
### Authorization
|
|
1655
|
+
|
|
1656
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1657
|
+
|
|
1658
|
+
### HTTP request headers
|
|
1659
|
+
|
|
1660
|
+
- **Content-Type**: Not defined
|
|
1661
|
+
- **Accept**: application/json
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
## getSettlementInfoByIds
|
|
1665
|
+
|
|
1666
|
+
> GetSettlementInfoByIds200Response getSettlementInfoByIds(opts)
|
|
1667
|
+
|
|
1668
|
+
Get withdrawable balances
|
|
1669
|
+
|
|
1670
|
+
<Warning>This operation has been deprecated.</Warning> This operation retrieves the balances of specified merchants or the developer.
|
|
1671
|
+
|
|
1672
|
+
### Example
|
|
1673
|
+
|
|
1674
|
+
```javascript
|
|
1675
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1676
|
+
// Initialize the API client
|
|
1677
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1678
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1679
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1680
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1681
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1682
|
+
// Call the API
|
|
1683
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1684
|
+
const opts = {
|
|
1685
|
+
'merchant_ids': "M1001,M1002,M1003",
|
|
1686
|
+
'currency': "USD",
|
|
1687
|
+
'acquiring_type': new CoboWaas2.AcquiringType()
|
|
1688
|
+
};
|
|
1689
|
+
apiInstance.getSettlementInfoByIds(opts).then((data) => {
|
|
1690
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1691
|
+
}, (error) => {
|
|
1692
|
+
console.error(error);
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
```
|
|
1696
|
+
|
|
1697
|
+
### Parameters
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
Name | Type | Description | Notes
|
|
1701
|
+
------------- | ------------- | ------------- | -------------
|
|
1702
|
+
**merchant_ids** | **String**| A list of merchant IDs to query. | [optional]
|
|
1703
|
+
**currency** | **String**| The currency for the operation. Currently, only `USD` is supported. | [optional] [default to 'USD']
|
|
1704
|
+
**acquiring_type** | [**AcquiringType**](.md)| | [optional]
|
|
1705
|
+
|
|
1706
|
+
### Return type
|
|
1707
|
+
|
|
1708
|
+
[**GetSettlementInfoByIds200Response**](GetSettlementInfoByIds200Response.md)
|
|
1709
|
+
|
|
1710
|
+
### Authorization
|
|
1711
|
+
|
|
1712
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1713
|
+
|
|
1714
|
+
### HTTP request headers
|
|
1715
|
+
|
|
1716
|
+
- **Content-Type**: Not defined
|
|
1717
|
+
- **Accept**: application/json
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
## getTopUpAddress
|
|
1721
|
+
|
|
1722
|
+
> TopUpAddress getTopUpAddress(token_id, custom_payer_id, opts)
|
|
1723
|
+
|
|
1724
|
+
Create/Get top-up address
|
|
1725
|
+
|
|
1726
|
+
This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used.
|
|
1727
|
+
|
|
1728
|
+
### Example
|
|
1729
|
+
|
|
1730
|
+
```javascript
|
|
1731
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1732
|
+
// Initialize the API client
|
|
1733
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1734
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1735
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1736
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1737
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1738
|
+
// Call the API
|
|
1739
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1740
|
+
const token_id = "ETH_USDT";
|
|
1741
|
+
const custom_payer_id = "payer_0001";
|
|
1742
|
+
const opts = {
|
|
1743
|
+
'merchant_id': "M1001"
|
|
1744
|
+
};
|
|
1745
|
+
apiInstance.getTopUpAddress(token_id, custom_payer_id, opts).then((data) => {
|
|
1746
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1747
|
+
}, (error) => {
|
|
1748
|
+
console.error(error);
|
|
1749
|
+
});
|
|
1750
|
+
|
|
1751
|
+
```
|
|
1752
|
+
|
|
1753
|
+
### Parameters
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
Name | Type | Description | Notes
|
|
1757
|
+
------------- | ------------- | ------------- | -------------
|
|
1758
|
+
**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` |
|
|
1759
|
+
**custom_payer_id** | **String**| A unique identifier to track and identify individual payers in your system. |
|
|
1760
|
+
**merchant_id** | **String**| The merchant ID. | [optional]
|
|
1761
|
+
|
|
1762
|
+
### Return type
|
|
1763
|
+
|
|
1764
|
+
[**TopUpAddress**](TopUpAddress.md)
|
|
1765
|
+
|
|
1766
|
+
### Authorization
|
|
1767
|
+
|
|
1768
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1769
|
+
|
|
1770
|
+
### HTTP request headers
|
|
1771
|
+
|
|
1772
|
+
- **Content-Type**: Not defined
|
|
1773
|
+
- **Accept**: application/json
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
## listBankAccounts
|
|
1777
|
+
|
|
1778
|
+
> [BankAccount] listBankAccounts()
|
|
1779
|
+
|
|
1780
|
+
List all bank accounts
|
|
1781
|
+
|
|
1782
|
+
This operation retrieves the information of all bank accounts you have registered for payment settlement. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new bank account.
|
|
1783
|
+
|
|
1784
|
+
### Example
|
|
1785
|
+
|
|
1786
|
+
```javascript
|
|
1787
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1788
|
+
// Initialize the API client
|
|
1789
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1790
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1791
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1792
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1793
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1794
|
+
// Call the API
|
|
1795
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1796
|
+
apiInstance.listBankAccounts().then((data) => {
|
|
1797
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1798
|
+
}, (error) => {
|
|
1799
|
+
console.error(error);
|
|
1800
|
+
});
|
|
1801
|
+
|
|
1802
|
+
```
|
|
1803
|
+
|
|
1804
|
+
### Parameters
|
|
1805
|
+
|
|
1806
|
+
This endpoint does not need any parameter.
|
|
1807
|
+
|
|
1808
|
+
### Return type
|
|
1809
|
+
|
|
1810
|
+
[**[BankAccount]**](BankAccount.md)
|
|
1811
|
+
|
|
1812
|
+
### Authorization
|
|
1813
|
+
|
|
1814
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1815
|
+
|
|
1816
|
+
### HTTP request headers
|
|
1817
|
+
|
|
1818
|
+
- **Content-Type**: Not defined
|
|
1819
|
+
- **Accept**: application/json
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
## listCounterparties
|
|
1823
|
+
|
|
1824
|
+
> ListCounterparties200Response listCounterparties(opts)
|
|
1825
|
+
|
|
1826
|
+
List all counterparties
|
|
1827
|
+
|
|
1828
|
+
This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names.
|
|
1829
|
+
|
|
1830
|
+
### Example
|
|
1831
|
+
|
|
1832
|
+
```javascript
|
|
1833
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1834
|
+
// Initialize the API client
|
|
1835
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1836
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1837
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1838
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1839
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1840
|
+
// Call the API
|
|
1841
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1842
|
+
const opts = {
|
|
1843
|
+
'limit': 10,
|
|
1844
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
1845
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
1846
|
+
'keyword': "keyword",
|
|
1847
|
+
'counterparty_type': new CoboWaas2.CounterpartyType(),
|
|
1848
|
+
'country': "USA"
|
|
1849
|
+
};
|
|
1850
|
+
apiInstance.listCounterparties(opts).then((data) => {
|
|
1851
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
1852
|
+
}, (error) => {
|
|
1853
|
+
console.error(error);
|
|
1854
|
+
});
|
|
1855
|
+
|
|
1856
|
+
```
|
|
1857
|
+
|
|
1858
|
+
### Parameters
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
Name | Type | Description | Notes
|
|
1862
|
+
------------- | ------------- | ------------- | -------------
|
|
1863
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
1864
|
+
**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]
|
|
1865
|
+
**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]
|
|
1866
|
+
**keyword** | **String**| A search term used for fuzzy matching of merchant names. | [optional]
|
|
1867
|
+
**counterparty_type** | [**CounterpartyType**](.md)| CounterpartyType defines the type of the counterparty: - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. | [optional]
|
|
1868
|
+
**country** | **String**| The country of the destination, in ISO 3166-1 alpha-3 format. | [optional]
|
|
1869
|
+
|
|
1870
|
+
### Return type
|
|
1871
|
+
|
|
1872
|
+
[**ListCounterparties200Response**](ListCounterparties200Response.md)
|
|
1873
|
+
|
|
1874
|
+
### Authorization
|
|
1875
|
+
|
|
1876
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
1877
|
+
|
|
1878
|
+
### HTTP request headers
|
|
1879
|
+
|
|
1880
|
+
- **Content-Type**: Not defined
|
|
1881
|
+
- **Accept**: application/json
|
|
1882
|
+
|
|
1883
|
+
|
|
1884
|
+
## listCounterpartyWalletAddress
|
|
1885
|
+
|
|
1886
|
+
> ListCounterpartyWalletAddress200Response listCounterpartyWalletAddress(opts)
|
|
1887
|
+
|
|
1888
|
+
List counterparty wallet addresses
|
|
1889
|
+
|
|
1890
|
+
This operation retrieves the information of counterparty wallet addresses.
|
|
1891
|
+
|
|
1892
|
+
### Example
|
|
1893
|
+
|
|
1894
|
+
```javascript
|
|
1895
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
1896
|
+
// Initialize the API client
|
|
1897
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
1898
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
1899
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
1900
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
1901
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1902
|
+
// Call the API
|
|
1903
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1904
|
+
const opts = {
|
|
1905
|
+
'limit': 10,
|
|
1906
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
1907
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
1908
|
+
'counterparty_id': "5b0ed293-f728-40b4-b1f6-86b88cd51384",
|
|
1909
|
+
'chain_ids': "BTC,ETH",
|
|
1910
|
+
'wallet_address': "0x1234567890abcdef..."
|
|
1911
|
+
};
|
|
1912
|
+
apiInstance.listCounterpartyWalletAddress(opts).then((data) => {
|
|
905
1913
|
console.log('API called successfully. Returned data: ' + data);
|
|
906
1914
|
}, (error) => {
|
|
907
1915
|
console.error(error);
|
|
@@ -914,11 +1922,16 @@ apiInstance.getSettlementById(settlement_request_id).then((data) => {
|
|
|
914
1922
|
|
|
915
1923
|
Name | Type | Description | Notes
|
|
916
1924
|
------------- | ------------- | ------------- | -------------
|
|
917
|
-
**
|
|
1925
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
1926
|
+
**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
|
+
**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
|
+
**counterparty_id** | **String**| The counterparty ID. | [optional]
|
|
1929
|
+
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). | [optional]
|
|
1930
|
+
**wallet_address** | **String**| The wallet address. | [optional]
|
|
918
1931
|
|
|
919
1932
|
### Return type
|
|
920
1933
|
|
|
921
|
-
[**
|
|
1934
|
+
[**ListCounterpartyWalletAddress200Response**](ListCounterpartyWalletAddress200Response.md)
|
|
922
1935
|
|
|
923
1936
|
### Authorization
|
|
924
1937
|
|
|
@@ -930,13 +1943,13 @@ Name | Type | Description | Notes
|
|
|
930
1943
|
- **Accept**: application/json
|
|
931
1944
|
|
|
932
1945
|
|
|
933
|
-
##
|
|
1946
|
+
## listCryptoAddresses
|
|
934
1947
|
|
|
935
|
-
>
|
|
1948
|
+
> [CryptoAddress] listCryptoAddresses(opts)
|
|
936
1949
|
|
|
937
|
-
|
|
1950
|
+
List crypto addresses
|
|
938
1951
|
|
|
939
|
-
|
|
1952
|
+
This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address.
|
|
940
1953
|
|
|
941
1954
|
### Example
|
|
942
1955
|
|
|
@@ -951,11 +1964,9 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
951
1964
|
// Call the API
|
|
952
1965
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
953
1966
|
const opts = {
|
|
954
|
-
'
|
|
955
|
-
'currency': "USD",
|
|
956
|
-
'acquiring_type': new CoboWaas2.AcquiringType()
|
|
1967
|
+
'token_id': "ETH_USDT"
|
|
957
1968
|
};
|
|
958
|
-
apiInstance.
|
|
1969
|
+
apiInstance.listCryptoAddresses(opts).then((data) => {
|
|
959
1970
|
console.log('API called successfully. Returned data: ' + data);
|
|
960
1971
|
}, (error) => {
|
|
961
1972
|
console.error(error);
|
|
@@ -968,13 +1979,11 @@ apiInstance.getSettlementInfoByIds(opts).then((data) => {
|
|
|
968
1979
|
|
|
969
1980
|
Name | Type | Description | Notes
|
|
970
1981
|
------------- | ------------- | ------------- | -------------
|
|
971
|
-
**
|
|
972
|
-
**currency** | **String**| The currency for the operation. Currently, only `USD` is supported. | [optional] [default to 'USD']
|
|
973
|
-
**acquiring_type** | [**AcquiringType**](.md)| | [optional]
|
|
1982
|
+
**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]
|
|
974
1983
|
|
|
975
1984
|
### Return type
|
|
976
1985
|
|
|
977
|
-
[**
|
|
1986
|
+
[**[CryptoAddress]**](CryptoAddress.md)
|
|
978
1987
|
|
|
979
1988
|
### Authorization
|
|
980
1989
|
|
|
@@ -986,13 +1995,13 @@ Name | Type | Description | Notes
|
|
|
986
1995
|
- **Accept**: application/json
|
|
987
1996
|
|
|
988
1997
|
|
|
989
|
-
##
|
|
1998
|
+
## listDestinationBankAccounts
|
|
990
1999
|
|
|
991
|
-
>
|
|
2000
|
+
> ListDestinationBankAccounts200Response listDestinationBankAccounts(opts)
|
|
992
2001
|
|
|
993
|
-
|
|
2002
|
+
List destination bank accounts
|
|
994
2003
|
|
|
995
|
-
This operation retrieves the information of
|
|
2004
|
+
This operation retrieves the information of destination bank accounts.
|
|
996
2005
|
|
|
997
2006
|
### Example
|
|
998
2007
|
|
|
@@ -1006,12 +2015,15 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
1006
2015
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1007
2016
|
// Call the API
|
|
1008
2017
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1009
|
-
const token_id = "ETH_USDT";
|
|
1010
|
-
const custom_payer_id = "payer_0001";
|
|
1011
2018
|
const opts = {
|
|
1012
|
-
'
|
|
2019
|
+
'limit': 10,
|
|
2020
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2021
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2022
|
+
'keyword': "keyword",
|
|
2023
|
+
'destination_id': "46beeab4-6a8e-476e-bc69-99b89aacbc6f",
|
|
2024
|
+
'bank_account_status': new CoboWaas2.BankAccountStatus()
|
|
1013
2025
|
};
|
|
1014
|
-
apiInstance.
|
|
2026
|
+
apiInstance.listDestinationBankAccounts(opts).then((data) => {
|
|
1015
2027
|
console.log('API called successfully. Returned data: ' + data);
|
|
1016
2028
|
}, (error) => {
|
|
1017
2029
|
console.error(error);
|
|
@@ -1024,13 +2036,16 @@ apiInstance.getTopUpAddress(token_id, custom_payer_id, opts).then((data) => {
|
|
|
1024
2036
|
|
|
1025
2037
|
Name | Type | Description | Notes
|
|
1026
2038
|
------------- | ------------- | ------------- | -------------
|
|
1027
|
-
**
|
|
1028
|
-
**
|
|
1029
|
-
**
|
|
2039
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2040
|
+
**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]
|
|
2041
|
+
**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]
|
|
2042
|
+
**keyword** | **String**| A search term used for fuzzy matching of merchant names. | [optional]
|
|
2043
|
+
**destination_id** | **String**| The destination ID. | [optional]
|
|
2044
|
+
**bank_account_status** | [**BankAccountStatus**](.md)| BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. | [optional]
|
|
1030
2045
|
|
|
1031
2046
|
### Return type
|
|
1032
2047
|
|
|
1033
|
-
[**
|
|
2048
|
+
[**ListDestinationBankAccounts200Response**](ListDestinationBankAccounts200Response.md)
|
|
1034
2049
|
|
|
1035
2050
|
### Authorization
|
|
1036
2051
|
|
|
@@ -1042,13 +2057,13 @@ Name | Type | Description | Notes
|
|
|
1042
2057
|
- **Accept**: application/json
|
|
1043
2058
|
|
|
1044
2059
|
|
|
1045
|
-
##
|
|
2060
|
+
## listDestinationWalletAddresses
|
|
1046
2061
|
|
|
1047
|
-
>
|
|
2062
|
+
> ListDestinationWalletAddresses200Response listDestinationWalletAddresses(opts)
|
|
1048
2063
|
|
|
1049
|
-
List
|
|
2064
|
+
List destination wallet addresses
|
|
1050
2065
|
|
|
1051
|
-
This operation retrieves the information of
|
|
2066
|
+
This operation retrieves the information of destination wallet addresses.
|
|
1052
2067
|
|
|
1053
2068
|
### Example
|
|
1054
2069
|
|
|
@@ -1062,7 +2077,15 @@ apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
|
1062
2077
|
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
1063
2078
|
// Call the API
|
|
1064
2079
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1065
|
-
|
|
2080
|
+
const opts = {
|
|
2081
|
+
'limit': 10,
|
|
2082
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2083
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2084
|
+
'destination_id': "46beeab4-6a8e-476e-bc69-99b89aacbc6f",
|
|
2085
|
+
'chain_ids': "BTC,ETH",
|
|
2086
|
+
'wallet_address': "0x1234567890abcdef..."
|
|
2087
|
+
};
|
|
2088
|
+
apiInstance.listDestinationWalletAddresses(opts).then((data) => {
|
|
1066
2089
|
console.log('API called successfully. Returned data: ' + data);
|
|
1067
2090
|
}, (error) => {
|
|
1068
2091
|
console.error(error);
|
|
@@ -1072,11 +2095,19 @@ apiInstance.listBankAccounts().then((data) => {
|
|
|
1072
2095
|
|
|
1073
2096
|
### Parameters
|
|
1074
2097
|
|
|
1075
|
-
|
|
2098
|
+
|
|
2099
|
+
Name | Type | Description | Notes
|
|
2100
|
+
------------- | ------------- | ------------- | -------------
|
|
2101
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2102
|
+
**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
|
+
**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
|
+
**destination_id** | **String**| The destination ID. | [optional]
|
|
2105
|
+
**chain_ids** | **String**| The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). | [optional]
|
|
2106
|
+
**wallet_address** | **String**| The wallet address. | [optional]
|
|
1076
2107
|
|
|
1077
2108
|
### Return type
|
|
1078
2109
|
|
|
1079
|
-
[**
|
|
2110
|
+
[**ListDestinationWalletAddresses200Response**](ListDestinationWalletAddresses200Response.md)
|
|
1080
2111
|
|
|
1081
2112
|
### Authorization
|
|
1082
2113
|
|
|
@@ -1088,13 +2119,13 @@ This endpoint does not need any parameter.
|
|
|
1088
2119
|
- **Accept**: application/json
|
|
1089
2120
|
|
|
1090
2121
|
|
|
1091
|
-
##
|
|
2122
|
+
## listDestinations
|
|
1092
2123
|
|
|
1093
|
-
>
|
|
2124
|
+
> ListDestinations200Response listDestinations(opts)
|
|
1094
2125
|
|
|
1095
|
-
List
|
|
2126
|
+
List all destinations
|
|
1096
2127
|
|
|
1097
|
-
This operation retrieves
|
|
2128
|
+
This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names.
|
|
1098
2129
|
|
|
1099
2130
|
### Example
|
|
1100
2131
|
|
|
@@ -1109,9 +2140,15 @@ apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
|
1109
2140
|
// Call the API
|
|
1110
2141
|
const apiInstance = new CoboWaas2.PaymentApi();
|
|
1111
2142
|
const opts = {
|
|
1112
|
-
'
|
|
2143
|
+
'limit': 10,
|
|
2144
|
+
'before': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1",
|
|
2145
|
+
'after': "RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk",
|
|
2146
|
+
'keyword': "keyword",
|
|
2147
|
+
'destination_type': new CoboWaas2.DestinationType(),
|
|
2148
|
+
'country': "USA",
|
|
2149
|
+
'merchant_ids': "M1001,M1002,M1003"
|
|
1113
2150
|
};
|
|
1114
|
-
apiInstance.
|
|
2151
|
+
apiInstance.listDestinations(opts).then((data) => {
|
|
1115
2152
|
console.log('API called successfully. Returned data: ' + data);
|
|
1116
2153
|
}, (error) => {
|
|
1117
2154
|
console.error(error);
|
|
@@ -1124,11 +2161,17 @@ apiInstance.listCryptoAddresses(opts).then((data) => {
|
|
|
1124
2161
|
|
|
1125
2162
|
Name | Type | Description | Notes
|
|
1126
2163
|
------------- | ------------- | ------------- | -------------
|
|
1127
|
-
**
|
|
2164
|
+
**limit** | **Number**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10]
|
|
2165
|
+
**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]
|
|
2166
|
+
**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]
|
|
2167
|
+
**keyword** | **String**| A search term used for fuzzy matching of merchant names. | [optional]
|
|
2168
|
+
**destination_type** | [**DestinationType**](.md)| DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. | [optional]
|
|
2169
|
+
**country** | **String**| The country of the destination, in ISO 3166-1 alpha-3 format. | [optional]
|
|
2170
|
+
**merchant_ids** | **String**| A list of merchant IDs to query. | [optional]
|
|
1128
2171
|
|
|
1129
2172
|
### Return type
|
|
1130
2173
|
|
|
1131
|
-
[**
|
|
2174
|
+
[**ListDestinations200Response**](ListDestinations200Response.md)
|
|
1132
2175
|
|
|
1133
2176
|
### Authorization
|
|
1134
2177
|
|
|
@@ -1768,6 +2811,52 @@ Name | Type | Description | Notes
|
|
|
1768
2811
|
- **Accept**: application/json
|
|
1769
2812
|
|
|
1770
2813
|
|
|
2814
|
+
## queryDestinationWhitelistEnabled
|
|
2815
|
+
|
|
2816
|
+
> QueryDestinationWhitelistEnabled200Response queryDestinationWhitelistEnabled()
|
|
2817
|
+
|
|
2818
|
+
Query destination whitelist enabled status
|
|
2819
|
+
|
|
2820
|
+
This operation retrieves the information of whether the destination whitelist is enabled.
|
|
2821
|
+
|
|
2822
|
+
### Example
|
|
2823
|
+
|
|
2824
|
+
```javascript
|
|
2825
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2826
|
+
// Initialize the API client
|
|
2827
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2828
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2829
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2830
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2831
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2832
|
+
// Call the API
|
|
2833
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2834
|
+
apiInstance.queryDestinationWhitelistEnabled().then((data) => {
|
|
2835
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2836
|
+
}, (error) => {
|
|
2837
|
+
console.error(error);
|
|
2838
|
+
});
|
|
2839
|
+
|
|
2840
|
+
```
|
|
2841
|
+
|
|
2842
|
+
### Parameters
|
|
2843
|
+
|
|
2844
|
+
This endpoint does not need any parameter.
|
|
2845
|
+
|
|
2846
|
+
### Return type
|
|
2847
|
+
|
|
2848
|
+
[**QueryDestinationWhitelistEnabled200Response**](QueryDestinationWhitelistEnabled200Response.md)
|
|
2849
|
+
|
|
2850
|
+
### Authorization
|
|
2851
|
+
|
|
2852
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
2853
|
+
|
|
2854
|
+
### HTTP request headers
|
|
2855
|
+
|
|
2856
|
+
- **Content-Type**: Not defined
|
|
2857
|
+
- **Accept**: application/json
|
|
2858
|
+
|
|
2859
|
+
|
|
1771
2860
|
## updateBankAccountById
|
|
1772
2861
|
|
|
1773
2862
|
> BankAccount updateBankAccountById(bank_account_id, opts)
|
|
@@ -1822,6 +2911,168 @@ Name | Type | Description | Notes
|
|
|
1822
2911
|
- **Accept**: application/json
|
|
1823
2912
|
|
|
1824
2913
|
|
|
2914
|
+
## updateCounterpartyById
|
|
2915
|
+
|
|
2916
|
+
> Counterparty updateCounterpartyById(counterparty_id, opts)
|
|
2917
|
+
|
|
2918
|
+
Update counterparty
|
|
2919
|
+
|
|
2920
|
+
This operation updates the information of a specified counterparty.
|
|
2921
|
+
|
|
2922
|
+
### Example
|
|
2923
|
+
|
|
2924
|
+
```javascript
|
|
2925
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2926
|
+
// Initialize the API client
|
|
2927
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2928
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2929
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2930
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2931
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2932
|
+
// Call the API
|
|
2933
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2934
|
+
const counterparty_id = "5b0ed293-f728-40b4-b1f6-86b88cd51384";
|
|
2935
|
+
const opts = {
|
|
2936
|
+
'UpdateCounterpartyByIdRequest': new CoboWaas2.UpdateCounterpartyByIdRequest()
|
|
2937
|
+
};
|
|
2938
|
+
apiInstance.updateCounterpartyById(counterparty_id, opts).then((data) => {
|
|
2939
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2940
|
+
}, (error) => {
|
|
2941
|
+
console.error(error);
|
|
2942
|
+
});
|
|
2943
|
+
|
|
2944
|
+
```
|
|
2945
|
+
|
|
2946
|
+
### Parameters
|
|
2947
|
+
|
|
2948
|
+
|
|
2949
|
+
Name | Type | Description | Notes
|
|
2950
|
+
------------- | ------------- | ------------- | -------------
|
|
2951
|
+
**counterparty_id** | **String**| The counterparty ID. |
|
|
2952
|
+
**UpdateCounterpartyByIdRequest** | [**UpdateCounterpartyByIdRequest**](UpdateCounterpartyByIdRequest.md)| The request body to update a counterparty. | [optional]
|
|
2953
|
+
|
|
2954
|
+
### Return type
|
|
2955
|
+
|
|
2956
|
+
[**Counterparty**](Counterparty.md)
|
|
2957
|
+
|
|
2958
|
+
### Authorization
|
|
2959
|
+
|
|
2960
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
2961
|
+
|
|
2962
|
+
### HTTP request headers
|
|
2963
|
+
|
|
2964
|
+
- **Content-Type**: application/json
|
|
2965
|
+
- **Accept**: application/json
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
## updateDestinationBankAccountById
|
|
2969
|
+
|
|
2970
|
+
> DestinationBankAccount updateDestinationBankAccountById(bank_account_id, opts)
|
|
2971
|
+
|
|
2972
|
+
Update destination bank account
|
|
2973
|
+
|
|
2974
|
+
This operation updates the information of a specified destination bank account.
|
|
2975
|
+
|
|
2976
|
+
### Example
|
|
2977
|
+
|
|
2978
|
+
```javascript
|
|
2979
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
2980
|
+
// Initialize the API client
|
|
2981
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
2982
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
2983
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
2984
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
2985
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
2986
|
+
// Call the API
|
|
2987
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
2988
|
+
const bank_account_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
|
|
2989
|
+
const opts = {
|
|
2990
|
+
'UpdateDestinationBankAccount': new CoboWaas2.UpdateDestinationBankAccount()
|
|
2991
|
+
};
|
|
2992
|
+
apiInstance.updateDestinationBankAccountById(bank_account_id, opts).then((data) => {
|
|
2993
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
2994
|
+
}, (error) => {
|
|
2995
|
+
console.error(error);
|
|
2996
|
+
});
|
|
2997
|
+
|
|
2998
|
+
```
|
|
2999
|
+
|
|
3000
|
+
### Parameters
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
Name | Type | Description | Notes
|
|
3004
|
+
------------- | ------------- | ------------- | -------------
|
|
3005
|
+
**bank_account_id** | **String**| The bank account ID. |
|
|
3006
|
+
**UpdateDestinationBankAccount** | [**UpdateDestinationBankAccount**](UpdateDestinationBankAccount.md)| The request body to update a destination bank account. | [optional]
|
|
3007
|
+
|
|
3008
|
+
### Return type
|
|
3009
|
+
|
|
3010
|
+
[**DestinationBankAccount**](DestinationBankAccount.md)
|
|
3011
|
+
|
|
3012
|
+
### Authorization
|
|
3013
|
+
|
|
3014
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
3015
|
+
|
|
3016
|
+
### HTTP request headers
|
|
3017
|
+
|
|
3018
|
+
- **Content-Type**: application/json
|
|
3019
|
+
- **Accept**: application/json
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
## updateDestinationById
|
|
3023
|
+
|
|
3024
|
+
> Destination updateDestinationById(destination_id, opts)
|
|
3025
|
+
|
|
3026
|
+
Update destination
|
|
3027
|
+
|
|
3028
|
+
This operation updates the information of a specified destination.
|
|
3029
|
+
|
|
3030
|
+
### Example
|
|
3031
|
+
|
|
3032
|
+
```javascript
|
|
3033
|
+
const CoboWaas2 = require('@cobo/cobo-waas2');
|
|
3034
|
+
// Initialize the API client
|
|
3035
|
+
const apiClient = CoboWaas2.ApiClient.instance
|
|
3036
|
+
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
|
|
3037
|
+
apiClient.setEnv(CoboWaas2.Env.DEV);
|
|
3038
|
+
// Replace `<YOUR_PRIVATE_KEY>` with your private key
|
|
3039
|
+
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
|
|
3040
|
+
// Call the API
|
|
3041
|
+
const apiInstance = new CoboWaas2.PaymentApi();
|
|
3042
|
+
const destination_id = "46beeab4-6a8e-476e-bc69-99b89aacbc6f";
|
|
3043
|
+
const opts = {
|
|
3044
|
+
'UpdateDestinationByIdRequest': new CoboWaas2.UpdateDestinationByIdRequest()
|
|
3045
|
+
};
|
|
3046
|
+
apiInstance.updateDestinationById(destination_id, opts).then((data) => {
|
|
3047
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
3048
|
+
}, (error) => {
|
|
3049
|
+
console.error(error);
|
|
3050
|
+
});
|
|
3051
|
+
|
|
3052
|
+
```
|
|
3053
|
+
|
|
3054
|
+
### Parameters
|
|
3055
|
+
|
|
3056
|
+
|
|
3057
|
+
Name | Type | Description | Notes
|
|
3058
|
+
------------- | ------------- | ------------- | -------------
|
|
3059
|
+
**destination_id** | **String**| The destination ID. |
|
|
3060
|
+
**UpdateDestinationByIdRequest** | [**UpdateDestinationByIdRequest**](UpdateDestinationByIdRequest.md)| The request body to create a destination. | [optional]
|
|
3061
|
+
|
|
3062
|
+
### Return type
|
|
3063
|
+
|
|
3064
|
+
[**Destination**](Destination.md)
|
|
3065
|
+
|
|
3066
|
+
### Authorization
|
|
3067
|
+
|
|
3068
|
+
[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth)
|
|
3069
|
+
|
|
3070
|
+
### HTTP request headers
|
|
3071
|
+
|
|
3072
|
+
- **Content-Type**: application/json
|
|
3073
|
+
- **Accept**: application/json
|
|
3074
|
+
|
|
3075
|
+
|
|
1825
3076
|
## updateMerchantById
|
|
1826
3077
|
|
|
1827
3078
|
> Merchant updateMerchantById(merchant_id, opts)
|