# Payment History

Use this endpoint to retrieve a list of payments associated with your account, determined by your Merchant API Key. You can filter the results using various criteria, including time range, payment status, amount, payment type, and more. Additionally, the endpoint supports pagination with page and size parameters, allowing you to customize the number of results per request.

## GET /payment

>

```json
{"openapi":"3.0.0","info":{"title":"Payments","version":"1.0.0"},"servers":[{"url":"https://api.oxapay.com/v1"}],"security":[],"paths":{"/payment":{"get":{"operationId":"paymentHistory","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"list":{"type":"array","items":{"type":"object","properties":{"track_id":{"type":"string","description":"Unique identifier for each payment session in the OxaPay payment gateway. It is used to track the payment status and generate reports."},"type":{"type":"string","description":"Describes the payment type, e.g., invoice, white-label, etc."},"amount":{"type":"number","format":"decimal","description":"The total amount of the invoice in the specified currency."},"currency":{"type":"string","description":"The currency of the payment, e.g., USD, EUR, BTC."},"status":{"type":"string","description":"The current status of the invoice, such as pending, completed, failed, etc."},"mixed_payment":{"type":"boolean","description":"A flag indicating whether the payment is mixed (involving multiple payment currencies)."},"callback_url":{"type":"string","description":"The URL to which payment status updates will be sent."},"description":{"type":"string","description":"A description for the invoice."},"email":{"type":"string","description":"The email address of the payer."},"fee_paid_by_payer":{"type":"number","format":"decimal","description":"Indicates if the payer is responsible for paying the network fees (1 = yes, 0 = no)."},"lifetime":{"type":"integer","description":"The lifetime of the invoice in minutes before it expires."},"order_id":{"type":"string","description":"A unique identifier for the order associated with this invoice."},"under_paid_coverage":{"type":"number","format":"decimal","description":"The percentage of underpayment that will still be considered valid."},"return_url":{"type":"string","description":"The URL the user will be redirected to after completing the payment."},"thanks_message":{"type":"string","description":"A custom message to thank the user for the payment."},"expired_at":{"type":"integer","description":"Timestamp (UNIX epoch) when the invoice will expire."},"date":{"type":"integer","description":"Timestamp (UNIX epoch) of when the invoice was created."},"txs":{"type":"array","items":{"type":"object","properties":{"tx_hash":{"type":"string","description":"Unique hash of the transaction on the blockchain, used to identify the transaction."},"amount":{"type":"number","format":"decimal","description":"The amount involved in the transaction."},"currency":{"type":"string","description":"The currency of the transaction."},"network":{"type":"string","description":"The blockchain network on which the transaction was made (e.g., Bitcoin, Ethereum)."},"address":{"type":"string","description":"The receiver wallet address."},"status":{"type":"string","description":"The current status of the transaction, such as confirming, confirmed, failed, etc."},"confirmations":{"type":"integer","description":"The number of confirmations the transaction has received on the network."},"auto_convert":{"type":"object","properties":{"processed":{"type":"boolean","description":"Indicates whether the transaction was automatically converted to another currency."},"amount":{"type":"number","format":"decimal","description":"The amount of currency that was converted."},"currency":{"type":"string","description":"The currency to which the amount was converted."}}},"auto_withdrawal":{"type":"object","properties":{"processed":{"type":"boolean","description":"Indicates whether the funds were automatically withdrawn after the transaction."}}},"date":{"type":"integer","description":"The timestamp when the transaction occurred."}}}}}}},"meta":{"type":"object","properties":{"page":{"type":"integer","description":"The current page number of the result set."},"last_page":{"type":"integer","description":"The total number of pages available based on the number of records and page size."},"total":{"type":"integer","description":"The total number of payments available for the specified criteria."}}}}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error"},"key":{"type":"string","description":"Key related to the error"},"message":{"type":"string","description":"Error message"}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors)."},"version":{"type":"string","description":"The version of the API being used."}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error"},"key":{"type":"string","description":"Key related to the error"},"message":{"type":"string","description":"Error message"}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors)."},"version":{"type":"string","description":"The version of the API being used."}}}}}}},"tags":["payment-history"],"parameters":[{"in":"header","name":"merchant_api_key","required":true,"schema":{"type":"string"},"description":"Your Merchant API Key for authentication and authorization."},{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","default":"application/json"}},{"name":"track_id","in":"query","description":"Filter payments by a specific invoice ID.","required":false,"schema":{"type":"integer"}},{"name":"type","in":"query","description":"Filter payments by type.","required":false,"schema":{"type":"string","enum":["invoice","white_label","static_address"]}},{"name":"status","in":"query","description":"Filter payments by status.","required":false,"schema":{"type":"string","enum":["Paying","Paid"]}},{"name":"pay_currency","in":"query","description":"Filter payments by a specific crypto currency symbol in which the pay amount is specified.","required":false,"schema":{"type":"string"}},{"name":"currency","in":"query","description":"Filter payments by a specific currency symbol.","required":false,"schema":{"type":"string"}},{"name":"network","in":"query","description":"Filter payments by the expected blockchain network for the specified crypto currency.","required":false,"schema":{"type":"string"}},{"name":"address","in":"query","description":"Filter payments by the expected address. It’s better to filter static addresses.","required":false,"schema":{"type":"string"}},{"name":"from_date","in":"query","description":"The start of the date window to query for payments in UNIX format.","required":false,"schema":{"type":"integer"}},{"name":"to_date","in":"query","description":"The end of the date window to query for payments in UNIX format.","required":false,"schema":{"type":"integer"}},{"name":"from_amount","in":"query","description":"Filter payments with amounts greater than or equal to the specified value.","required":false,"schema":{"type":"number","format":"decimal"}},{"name":"to_amount","in":"query","description":"Filter payments with amounts less than or equal to the specified value.","required":false,"schema":{"type":"number","format":"decimal"}},{"name":"sort_by","in":"query","description":"Sort the received list by a parameter.","required":false,"schema":{"type":"string","enum":["create_date","pay_date","amount"],"default":"create_date"}},{"name":"sort_type","in":"query","description":"Display the list in ascending or descending order.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","description":"The page number of the results you want to retrieve.","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"size","in":"query","description":"Number of records to display per page.","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":10}}]}}}}
```
