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
https://api.oxapay.com/v1/payment
Authentication
You must include the Merchant API Key in the request header to authenticate your access to the API.
merchant_api_key*
string
Your merchant API Key for authentication and authorization.
Request Params
track_id
integer
Filter payments by a specific invoice ID.
type
string
Filter payments by type (e.g. "invoice", "white_label", "static_address").
status
string
Filter payments by status (e.g., "Paid", "Confirming").
pay_currency
string
currency
string
network
string
address
string
Filter payments by the expected address. It’s better to filter static addresses.
from_date
integer
The start of the date window to query for payments in unix format.
to_date
integer
The start of the date window to query for payments in unix format.
from_amount
decimal
Filter payments with amounts greater than or equal to the specified value.
to_amount
decimal
Filter payments with amounts less than or equal to the specified value.
sort_by
string
Sort the received list by a parameter. Set to 'create_date' by default. Possible values: 'create_date', 'pay_date', 'amount' [default 'create_date'].
sort_type
string
Display the list in ascending or descending order. Possible values: 'asc', 'desc' [default 'desc'].
page
integer
The page number of the results you want to retrieve. Possible values: from 1 to the total number of pages - default 1.
size
integer
Number of records to display per page. Possible values: from 1 to 200. Default: 10.
{
"data": {
"list":
{
"track_id": string, // Unique identifier for each payment session in the OxaPay payment gateway. It is used to track the payment status and generate reports.
"type": string, // Describes the payment type, e.g., invoice, white-label, etc.
"amount": decimal, // The total amount of the invoice in the specified currency.
"currency": string, // The currency of the payment, e.g., USD, EUR, BTC.
"status": string, // The current status of the invoice, such as pending, completed, failed, etc.
"mixed_payment": boolean, // A flag indicating whether the payment is mixed (involving multiple payment currencies).
"callback_url": string, // The URL to which payment status updates will be sent
"description": string, // A description for the invoice
"email": string, // The email address of the payer
"fee_paid_by_payer": decimal, // Indicates if the payer is responsible for paying the network fees (1 = yes, 0 = no)
"lifetime": integer, // The lifetime of the invoice in minutes before it expires
"order_id": string, // A unique identifier for the order associated with this invoice
"under_paid_coverage": decimal, // The percentage of underpayment that will still be considered valid
"return_url": string, // The URL the user will be redirected to after completing the payment.
"thanks_message": string, // A custom message to thank the user for the payment.
"expired_at": integer, // Timestamp (UNIX epoch) when the invoice will expire
"date": integer // Timestamp (UNIX epoch) of when the invoice was created
"txs":
{
"tx_hash": string, // Unique hash of the transaction on the blockchain, used to identify the transaction.
"amount": decimal, // The amount involved in the transaction.
"currency": string, // The currency of the transaction.
"network": string, // The blockchain network on which the transaction was made (e.g., Bitcoin, Ethereum).
"address": string, // The receiver wallet address.
"status": string, // The current status of the transaction, such as confirming, confirmed, failed, etc.
"confirmations": integer, // The number of confirmations the transaction has received on the network.
"auto_convert": {
"processed": boolean, // Indicates whether the transaction was automatically converted to another currency.
"amount": decimal, // The amount of currency that was converted.
"currency": string // The currency to which the amount was converted.
},
"auto_withdrawal": {
"processed": boolean // Indicates whether the funds were automatically withdrawn after the transaction.
},
"date": integer // The timestamp when the transaction occurred.
}[]
}[],
"meta": {
"page": integer, // The current page number of the result set.
"last_page": integer, // The total number of pages available based on the number of records and page size.
"total": integer // The total number of payments available for the specified criteria.
},
},
"message": string, // A message containing additional information about the result of the request.
"error": {
"type": string,
"key": string,
"message": string
} || {}, // An object that provides details about any errors that occurred.
"status": integer, // The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors).
"version": string // The version of the API being used.
}
Please note that a successful request will return status 200. In case of any issues or validation problems, refer to the corresponding error for further details.
API Request Sample Codes
curl -X GET "https://api.oxapay.com/v1/payment/?size=20&page=1" \
-H "merchant_api_key: YOUR_MERCHANT_API_KEY" \
-H "Content-Type: application/json"
These example code snippets demonstrate how to request the "Payment History" endpoint using different programming languages. You can customize the data parameters according to your specific requirements.
API Response Example
{
"data": {
"list": [
{
"track_id": "168931368",
"type": "invoice",
"amount": 15,
"currency": "USD",
"status": "paid",
"mixed_payment": true,
"fee_paid_by_payer": 0,
"under_paid_coverage": 21.5,
"lifetime": 60,
"callback_url": "https://example.com/callback",
"return_url": "https://example.com/success",
"email": "customer@oxapay.com",
"order_id": "ORD-12345",
"description": "Order #12345",
"thanks_message": "Thanks Message",
"expired_at": 1728121075,
"date": 1728117475,
"txs": [
{
"tx_hash": "0x2DehmnxMDFMhS3KHXCPpGSx41NeLBjH34q5vjN1oGbUDFFAMC9rG3",
"amount": 0.00613418,
"currency": "ETH",
"network": "Ethereum Network",
"address": "HEHCVjnxD8cQrFwfo4k9WXJXErpmK9Ym1nRaEiJJ8DP3",
"status": "confirmed",
"confirmations": 11,
"auto_convert": {
"processed": true,
"amount": 14.73130872,
"currency": "USDT"
},
"auto_withdrawal": {
"processed": false
},
"date": 1728117736
}
]
}
],
"meta": {
"page": 1,
"last_page": 1,
"total": 1
}
},
"message": "Operation completed successfully!",
"error": {},
"status": 200,
"version": "1.0.0"
}
The response example above is provided to help you understand the format and structure of the response. If you have any further questions or need assistance, please feel free to contact to your account manager.
Last updated