Payment Information
Use the Payment Information endpoint to retrieve the details of a specific payment by its TrackId. After creating an invoice, you will receive a TrackId, which you can use to make payment information requests.
POST https://api.oxapay.com/merchants/inquiry
Request Body
merchant*
string
Your merchant API key for authentication and authorization.
trackId*
integer
The unique identifier of each payment session in the OxaPay payment gateway. Use this TrackId to query the payment status and obtain detailed payment information.
{
"result": integer, // The result code indicates the success or failure of the request.
"message": string, // A message providing additional information about the result.
"trackId": string, // The unique identifier of the payment session.
"status": string, // The current status of the payment (e.g., \"New,\" \"Waiting,\" \"Confirming,\" \"Paid,\" \"Expired,\" etc.).
"type": string, // The invoive type(Invoice or White-Label)
"amount": string, // The total amount of the payment.
"currency": string, // The currency in which the payment was made.
"payAmount": string, // The actual amount paid by the payer.
"payCurrency": string, // The currency in which the payment was made by the payer.
"network": string, // The blockchain network on which the payment was made.
"address": string, // The payment address where the payment was received.
"txID": string, // The payment txID
"email": string, // The customer email
"orderId": string, // The invoice order id
"description": string, // The invoice description
"feePaidByPayer": integer, // feePaidByPayer of the invoice
"underPaidCover": interger, // underPaidCover of the invoice
"date": string, // Creation time of the invoice.
"payDate": string // Payment time of the invoice.
}Please note that a successful request will return a result code 100. In case of any issues or validation problems, refer to the corresponding result codes for further details.
Example codes
curl -X POST https://api.oxapay.com/merchants/inquiry \
-d '{
"merchant": "YOUR_MERCHANT_API_KEY",
"trackId": TRACK_ID
}'<?php
$url = 'https://api.oxapay.com/merchants/inquiry';
$data = array(
'merchant' => 'YOUR_MERCHANT_API_KEY',
'trackId' => 'TRACK_ID'
);
$options = array(
'http' => array(
'header' => 'Content-Type: application/json',
'method' => 'POST',
'content' => json_encode($data),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$result = json_decode($response);
var_dump($result);
?>const axios = require('axios');
const url = 'https://api.oxapay.com/merchants/inquiry';
const data = JSON.stringify({
merchant: 'YOUR_MERCHANT_API_KEY',
trackId: TRACK_ID
});
axios.post(url, data)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});import requests
import json
url = 'https://api.oxapay.com/merchants/inquiry'
data = {
'merchant': 'YOUR_MERCHANT_API_KEY',
'trackId': TRACK_ID
}
response = requests.post(url, data=json.dumps(data))
result = response.json()
print(result)Please replace YOUR_MERCHANT_API_KEY with your actual merchant API key, and PAYMENT_TRACK_ID with the unique identifier of the payment session (TrackId) you want to inquire about. These code snippets demonstrate how to make a POST request to the Payment Information endpoint and handle the response in each respective programming language.
Last updated