🏢Merchant Status API
This endpoint returns the status of the merchant that owns the API key. A key cannot inspect another merchant.
Ensure that you pass a validmerchant_idwhen making a request. If the merchant does not exist or is not found, you will receive a404 Not Founderror.
- 🔹 The API requires anAPI Keyfor authentication.
- 🔹 Themerchant_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/merchants/<merchant_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/merchants/<merchant_id>/status
Headers:
Authorization: Bearer <your_api_key>
🔍 Example Response
{
"status": true,
"statusCode": 200,
"data": {
"merchantStatus": "active"
}
}
⚠️ Error Handling
The API provides the following error responses:
{
"status": false,
"statusCode": 400,
"message": "Invalid or missing merchant_id"
}
400 Bad Request:The merchant_id parameter is invalid. Ensure the correct ID format is used.
{
"status": false,
"statusCode": 403,
"message": "API key is not authorized for this merchant"
}
403 Forbidden: The key does not belong to the requested merchant.
{
"status": false,
"statusCode": 404,
"message": "Merchant not found"
}
404 Not Found:The merchant with the provided ID does not exist in the system. Double-check the merchant 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.