🔍Fatura Durumu API'si
Fatura Durumu API'si, belirli bir faturanın mevcut durumunu almanızı sağlar. Bu API, fatura durumu, tutar, para birimi, protokol ve daha fazlası gibi ayrıntıları döndürebilir.
Geçerli bir geçiş yaptığınızdan emin oluninvoice_idbir talepte bulunurken. Fatura mevcut değilse veya bulunamazsa, size bir e-posta gönderilecektir.404 Not Foundhata.
- 🔹 API bir gerektirirAPI Anahtarıkimlik doğrulama için.
- 🔹 invoice_idistekte sorgu parametresi olarak iletilmelidir.
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);💡 Örnek İstek
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.
🔍 Örnek Yanıt
{
"status": true,
"statusCode": 200,
"data": {
"invoiceStatus": "paid",
"amount": "1000.000000000000",
"symbol": "USDT",
"protocol": "TRC20",
"reference_id": "abc123",
"created_at": "2025-02-16T12:00:00Z"
}
}
⚠️ Hata İşleme
API aşağıdaki hata yanıtlarını sağlar:
{
"status": false,
"statusCode": 400,
"message": "Invalid invoice_id parameter"
}
400 Bad Request:invoice_id parametresi geçersiz. Doğru kimlik biçimini kullandığınızdan emin olun.
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:Girilen ID'ye sahip fatura sistemde mevcut değil. Fatura kimliğini bir kez daha kontrol edin.
{
"status": false,
"statusCode": 500,
"message": "Internal server error"
}
500 Internal Server Error:Sunucuda beklenmeyen bir hata oluştu. Daha sonra tekrar deneyin veya destek ekibiyle iletişime geçin.