# Transactions API

**Transactions API**  is an API which provides a list of all user's gameplay transactions, including their status and unique transaction IDs, which are crucial for processing transactions as well as troubleshooting any issues during gameplays.&#x20;

***

## Get user's gameplay transactions&#x20;

## POST /operator/generic/v2/transactions/list

> Allows retrieval of a list of gameplay transactions. The list can be filtered by datetime fields (\`start\_time\` and \`end\_time\`) or by \`round\`. At least one of these filters must be included for the request to be valid.

```json
{"openapi":"3.1.1","info":{"title":"Hub88","version":"2.0"},"tags":[],"paths":{"/operator/generic/v2/transactions/list":{"post":{"tags":["Transactions API"],"summary":"","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transactions"}}}}},"parameters":[{"schema":{"type":"string"},"required":true,"name":"X-Hub88-Signature","in":"header","description":"RSA-SHA256 is used to sign the request body using the private key. The signature is validated using the public key associated with the provided `operator_id`."}],"operationId":"/operator/generic/v2/transactions/list","description":"Allows retrieval of a list of gameplay transactions. The list can be filtered by datetime fields (`start_time` and `end_time`) or by `round`. At least one of these filters must be included for the request to be valid.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["operator_id"],"properties":{"user":{"type":"string","description":""},"sub_partner_id":{"description":"","$ref":"#/components/schemas/sub_partner_id"},"start_time":{"description":"","$ref":"#/components/schemas/datetime"},"operator_id":{"description":"","$ref":"#/components/schemas/operator_id"},"end_time":{"description":"","$ref":"#/components/schemas/datetime"},"currency":{"description":"","$ref":"#/components/schemas/currency"},"round":{"description":"Allows to specify the round for which transactions data and list is needed. Value for a `round` must be added when `end_time` and `start_time` aren't specified. Values can be either string or null.","$ref":"#/components/schemas/round"}}}}},"required":true,"description":""}}}},"components":{"schemas":{"Transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"Transaction":{"type":"object","title":"Transaction","required":["inserted_at","currency","amount","game_code","reference_transaction_uuid","transaction_uuid","status","round","kind","user","id"],"properties":{"user":{"type":"string","description":""},"transaction_uuid":{"description":"","$ref":"#/components/schemas/transaction_uuid"},"status":{"description":"","$ref":"#/components/schemas/transaction_status"},"round":{"description":"","$ref":"#/components/schemas/round"},"round_closed":{"description":"","$ref":"#/components/schemas/round_closed"},"reference_transaction_uuid":{"description":"","$ref":"#/components/schemas/reference_transaction_uuid"},"kind":{"description":"","$ref":"#/components/schemas/transaction_kind"},"inserted_at":{"description":"","$ref":"#/components/schemas/datetime"},"id":{"type":"integer","description":""},"game_code":{"description":"","$ref":"#/components/schemas/game_code"},"currency":{"description":"","$ref":"#/components/schemas/currency"},"amount":{"description":"","$ref":"#/components/schemas/money_amount"}},"description":"Hub88 transaction item"},"transaction_uuid":{"type":"string","description":"The unique transaction identifier. An ID of business logic action (transaction) that <b>needs to be stored</b> on both sides for <b>at least 4 months</b> (for reconciliation purposes). Operator has to respond on each `transaction_uuid`. An action with same `transaction_uuid` shouldn't be processed more than once."},"transaction_status":{"type":"string","enum":["TS_SUCCESS","TS_DECLINED","TS_ROLLEDBACK","TS_RETRY_ATTEMPTS_LIMIT_EXCEEDED"],"description":"The Hub88 transaction status.\n              `TS_SUCCESS` - Transaction completed successfully.\n              `TS_DECLINED` - Transaction was declined by Operator due to error or logical response.\n              `TS_RETRY_ATTEMPTS_LIMIT_EXCEEDED` - Transaction was in retry state and was terminated due to exceeding limit of attempts. Transaction was not finished successfully.\n              `TS_ROLLEDBACK` - Transaction was rolled back by successful transaction of `TK_ROLLBACK` kind. "},"round":{"type":"string","description":"The game round ID used to relate all bets and wins made in one round. All transactions related to the same round have the same value in this field. The ID is not unique through whole system. The value depends on provider’s RGS logic, as it is created from game + user + round combination, resulting in uniqueness. The value can be null or omitted."},"round_closed":{"type":"boolean","description":"Denotes when the round is closed. Can be null."},"reference_transaction_uuid":{"type":"string","description":"Unique identifier of the transaction that this transaction is referencing. In case of a rollback, this field will contain `transaction_uuid` of the transaction which needs to be rolled back. In case of a win, there will be `transaction_uuid` of the bet to which this win is related to."},"transaction_kind":{"type":"string","enum":["TK_BET","TK_WIN","TK_ROLLBACK","TK_FREE_BET","TK_FREE_WIN","TK_JP_WIN","TK_NEG_BET","TK_BONUS_WIN"],"description":"The type of the transaction in Hub88.\n              `TK_BET` - bet/stake/debit.\n              `TK_WIN` - win/credit/deposit.\n              `TK_ROLLBACK` - rollback/cancel of any of other two types (`TK_BET` or `TK_WIN`)."},"datetime":{"type":"string","format":"ISO-8601","description":"The date and time combination in [ISO 8601 Extended format](https://www.iso.org/iso-8601-date-and-time-format.html) (YYYY-MM-DDThh:mm:ss)."},"game_code":{"type":"string","description":"The unique game identifier in Hub88 system in the form of a string. `game_code` can be obtained from the `/game/list` endpoint."},"currency":{"type":"string","enum":["BSD","TTD","ZMW","BMD","USD","BYR","UGX","HKD","MGA","GIP","UZS","MKD","PTS","mLTC","EGP","AWG","CZK","ILS","MZN","TND","XPF","SOS","DOP","RUB","KRW","BTN","KGS","BAM","AOA","SOC","AMS","BND","RSD","FKP","PEN","EOS","GHS","JPY","TRY","SBD","UAH","LTL","FJD","GNF","MDL","AFN","ZAR","MOP","TJS","BOB","JMD","QAR","IRR","SYP","XXX","NAD","MYR","CUP","NOK","BGN","KPW","MNT","NZD","uETH","SGD","PYG","OMR","DZD","EUR","TMT","MMK","PTQ","ANG","TZS","CRC","VES","ETB","THB","ZWD","LYD","CHF","MVR","KES","CVE","LSL","KMF","SZL","KYD","BRL","AED","WST","YER","ALL","TRX","HUF","GTQ","uBTC","IDR","MWK","CUC","DKK","TWD","XCD","BBD","LRD","KZT","JOD","BYN","BIF","PLN","SDG","VUV","SEK","BDT","HNL","BWP","VND","ISK","SLL","BHD","HTG","USDT","ADA","MUR","ERN","uLTC","LKR","COP","GEL","AUD","GBP","CAD","PHP","PAB","DJF","GMD","PKR","NIO","AMD","RWF","RON","NGN","TOP","UYU","AZN","SRD","KWD","PGK","CDF","SAR","IQD","XRP","SCR","mETH","MAD","GYD","INR","LBP","ARS","MXN","CLP","BNB","CNY","KHR","LAK","HRK","BZD","SSP","XOF","X5T","MRO","NPR","mBTC"],"description":"The [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. The following list contains all currencies supported by our system. Note that native gameplay support for these currencies may vary per Provider. Please contact us to know which Provider supports which currencies."},"money_amount":{"type":"integer","description":"The amount of money displayed in integer **(Int64)** format. To convert real float value to integer, it is multiplied by 100000. Example: `$3.56` is represented as `356000`"},"sub_partner_id":{"type":"string","description":"ID of Operator's sub-partner (brand, whitelabel, site, etc.) which uses same integration and credentials as an Operator. Used for detailed reporting and integration type switching. Sites under the same Operator can use different integration types: TransferWallet or SeamlessWallet. A single site (sub_partner_id) can NOT have both kinds of integration at the same time."},"operator_id":{"type":"integer","description":"Unique identifier for the Operator in Hub88 system. Used to authorize incoming requests. You can obtain your `operator_id` from the Hub88 BackOffice after your Operator entity is registered and set up in the Hub88 system by the internal teams."}}}}
```
