Transactions
Use these methods to manage transaction types defined in the Back Office and transactions (such as deposits, withdrawals, exchanges and transfers) made on client accounts.
GET[host]/api/v2/transactions |
|
GET[host]/api/v2/transactions/{transactionId} |
|
PUT[host]/api/v2/transactions/{transactionId} PATCH[host]/api/v2/transactions/{transactionId} |
GET[host]/api/v2/transactions/types |
|
GET[host]/api/v2/transactions/types/{typeId} |
|
PUT[host]/api/v2/transactions/types/{typeId} PATCH[host]/api/v2/transactions/types/{typeId} |
Use these methods to submit transaction motoring requests and view their results.
POST[host]/api/v2/transactions/{transactionId}/check |
|
GET[host]/api/v2/monitoring/transactions |
|
GET[host]/api/v2/monitoring/transactions/{monitoringId} |
Get a list of transactions
Use this method to obtain a list of transactions made on client accounts.
Note
If such a request is made by an admin user that is only permitted to view clients with certain tags, a response includes only transactions made by clients marked with these tags.
To obtain detailed information about a specific transaction, use a separate method to get transaction details.
When a request doesn’t include a filter parameter indicating the transaction type
, a response includes transactions of all types.
The available filter and sorting parameters are listed in the Request section below.
Note
A response includes transactions with any status, except for those marked as new
.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following filter parameters are available for this method:
- accountId
The identifier of a client account.
- creditAccountNumber
The number of an account to which funds were credited.
- debitAccountNumber
The number of an account from which funds were debited.
- status
The current transaction status. Possible values:
cancelled
done
failed
hold
holdFailed
inProgress
new
partial
pending
rejected
refund
refundFailed
trade
Transactions with the
new
status are not returned.- type
The transaction type. Possible values:
deposit
exchange
external
partner
transfer
withdrawal
- fromCreateTime
The start date and time of a period for which you want to get a list of transactions created in B2Core.
- toCreateTime
The end date and time of a period for which you want to get a list of transactions created in B2Core.
- fromProcessedTime
The start date and time of a period for which you want to get a list of processed transactions.
- toProcessedTime
The end date and time of a period for which you want to get a list of processed transactions.
The following sorting parameter is available for this method:
- createTime
The date and time when a transaction was created in B2Core.
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/transactions
curl --location -g --request GET 'https://host.name/api/v2/transactions?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[accountId]=1&filter[creditAccountNumber]=1&filter[debitAccountNumber]=1&filter[status]=done&filter[type]=withdrawal&filter[fromCreateTime]=2022-01-01T00:00:00+00:00&filter[toCreateTime]=2022-01-01T00:00:00+00:00&filter[fromProcessedTime]=2022-01-01T00:00:00+00:00&filter[toProcessedTime]=2022-01-01T00:00:00+00:00' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Transaction objects providing information about the transactions matching the request parameters.
Get transaction details
Use this method to obtain detailed information about a specified transaction.
To obtain a list of transactions made on a client account, use a separate method to get a list of transactions.
Request
Path parameters:
- transactionId required
The transaction identifier.
GET[host]/v2/transactions/{transactionId}
curl --location --request GET 'https://host.name/api/v2/transactions/1' \
--header 'Authorization: Bearer <token>'
Response
A response contains a Transaction object providing information about the specified transaction.
Update a transaction
Use this method to update a specified transaction.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- transactionId required
The transaction identifier.
Body:
The following field values can be updated for a transaction type:
- verificationStatus string
Applicable only for deposit-type transactions.
Indicates whether a transaction is approved by the Financial Department. Possible values:
approved
declined
pending
- providerCommission string
The commission amount charged by a payment system.
- commission string
The transaction fee amount.
- blockchainTransaction string
The transaction identifier in a blockchain.
- foreignExchangeRate string
The exchange rate at which a transaction was made.
- internalComment string
The text of an internal comment to a transaction.
- resultDate string
Applicable only for deposit- and withdrawal-type transactions.
The date and time when a deposit was credited or a withdrawal was debited from an account.
- dealingStatus string
Applicable only for withdrawal-type transactions.
Indicates whether a transaction is approved by the Dealing Department. Possible values:
approved
declined
pending
- complianceStatus string
Applicable only for withdrawal-type transactions.
Indicates whether a transaction is approved by the Compliance Department. Possible values:
approved
declined
pending
PUT[host]/v2/transactions/{transactionId}
curl --location --request PUT 'https://host.name/api/v2/transactions/1' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"verificationStatus": "approved",
"providerCommission": "1.000000000000000000",
"commission": "1.000000000000000000",
"blockchainTransaction": "Lorem ipsum",
"foreignExchangeRate": "1.000000000000000000",
"internalComment": "Lorem ipsum dolor sit amet",
"resultDate": "2020-01-01 00:00:00",
"dealingStatus": "approved",
"complianceStatus": "approved"
}'
Response
A response includes a Transaction object providing information about the transaction that was updated.
Get a list of transaction types
Use this method to obtain a list of transaction types defined in the Back Office.
To obtain detailed information about a specific transaction type, use a separate method to get transaction type details.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/transactions/types
curl --location --request GET 'https://host.name/api/v2/transactions/types?limit=10&offset=0&sort_order=desc' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains an array of Transaction Type objects providing information about the transaction types matching the request parameters.
Get transaction type details
Use this method to obtain detailed information about a specified transaction type.
To obtain a list of transaction types defined in the Back Office, use a separate method to get a list of transaction types.
Request
Path parameters:
- typeId required
The transaction type identifier.
GET[host]/api/v2/transactions/types/{typeId}
curl --location --request GET 'https://host.name/api/v2/transactions/types/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains a Transaction Type object providing information about the specified transaction type.
Update a transaction type
Use this method to update a specified transaction type.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- typeId required
The transaction type identifier.
Body:
The following field values can be updated for a transaction:
- caption string
The transaction type name.
- enabled boolean
If
true
, clients are allowed to make transactions of this type; otherwise,false
.- options object
The details specific to a transaction type (such as transaction statuses or restrictions applied to a transaction type).
PUT[host]:/api/v2/transactions/types/{typeId}
curl --location --request PUT 'https://host.name/api/v2/transactions/types/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja' \
--data-raw '{
"caption": "transfer",
"enabled": true,
"options": [
{
"operation_status": [
1,
2,
3
]
},
{
"operation_restrictions": [
1,
2,
3
]
}
]
}'
Response
A response includes a Transaction Type object providing information about the transaction type that was updated.
Submit a transaction monitoring request
Use this method to submit a transaction monitoring request and check whether a transaction is suspicious.
Only deposit and withdrawal transactions can be checked.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- transactionId required
The identifier of a transaction that you want to check.
POST[host]/api/v2/transactions/{transactionId}/check
curl --location --request POST 'https://host.name/api/v2/transactions/1/check' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
If a transaction monitoring request has been successfully submitted, no response body is returned.
To view the results of submitted requests, use the following methods:
Get a list of transaction monitoring results
Use this method to view the results of submitted requests for transaction monitoring.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
The following sorting parameter is available for this method:
- createTime
The date and time when a transaction was made.
The following filter parameters are available for this method:
- clientId
The client identifier.
- transactionType
The transaction type. Possible values:
deposit
withdraw
- createTimeFrom
The date and time indicating the beginning of a time period during which a transaction was made.
- createTimeTo
The date and time indicating the end of a time period during during which a transaction was made.
- provider
The name of a method by which a transaction was made.
- reviewResult
The transaction monitoring result returned by a provider. Possible values:
red
green
error
- riskScore
The transaction risk score calculated by a provider.
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/monitoring/transactions
curl --location -g --request GET 'https://host.name/api/v2/monitoring/transactions?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[clientId]=1&filter[transactionType]=withdraw&filter[createTimeFrom]=2022-01-01T00:00:00+00:00&filter[createTimeTo]=2022-01-01T00:00:00+00:00&filter[provider]=manual&filter[reviewResult]=red&filter[riskScore]=1.01' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response includes an array of Transaction Monitoring objects providing information about the transaction monitoring results matching the request parameters.
Get transaction monitoring details
Use this method to obtain detailed information about the result of a specific transaction monitoring request.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- monitoringId required
The identifier of a transaction monitoring request.
GET[host]/api/v2/monitoring/transactions/{monitoringId}
curl --location --request GET 'https://host.name/api/v2/monitoring/transactions/1' \
--header 'Authorization: Bearer <token>'
Response
A response includes a Transaction Monitoring object providing details about the result of a specified transaction monitoring request.