🔍Invoice Status API
The Invoice Status API allows you to retrieve the current status of a specific invoice. This API can return details such as the invoice status, amount, currency, protocol, and more.
Ensure that you pass a validinvoice_idwhen making a request. If the invoice does not exist or is not found, you will receive a404 Not Founderror.
- 🔹 The API requires anAPI Keyfor authentication.
- 🔹 Theinvoice_idshould be passed as a query parameter in the request.
Backend integration examples
Choose your backend language. Every example reads secret credentials only from environment variables.
const response = await fetch("https://api.dinakel.com/api/gateway/v1/invoices/<invoice_id>/status", {
method: "GET"
headers: {
Authorization: `Bearer ${process.env.DINAKEL_API_KEY}`,
Accept: "application/json"
}
});
const result = await response.json();
if (!response.ok) throw new Error(result.message || "Dinakel request failed");
console.log(result);💡 Example Request
GET https://api.dinakel.com/api/gateway/v1/invoices/<invoice_id>/status
Headers:
Authorization: Bearer <your_api_key>
Path Parameters:
- invoice_id (required, UUID): The unique identifier of the invoice you wish to check.
Statuses are draft, published, viewed, paid, and expired. Treat only paid as a successfully finalized order.
🔍 Example Response
{
"status": true,
"statusCode": 200,
"data": {
"invoiceStatus": "paid",
"amount": "1000.000000000000",
"symbol": "USDT",
"protocol": "TRC20",
"reference_id": "abc123",
"created_at": "2025-02-16T12:00:00Z"
}
}
⚠️ Error Handling
The API provides the following error responses:
{
"status": false,
"statusCode": 400,
"message": "Invalid invoice_id parameter"
}
400 Bad Request:The invoice_id parameter is invalid. Ensure the correct ID format is used.
429 Too Many Requests: Up to 60 invoice-status requests per minute per key; honor Retry-After.
{
"status": false,
"statusCode": 404,
"message": "Invoice not found"
}
404 Not Found:The invoice with the provided ID does not exist in the system. Double-check the invoice ID.
{
"status": false,
"statusCode": 500,
"message": "Internal server error"
}
500 Internal Server Error:An unexpected error occurred on the server. Try again later or contact support.