Dinakel
Why Dinakel?How it worksGatewayMerchantUser Guide
User Guide
User GuideGatewayMerchantAPI Key
API key statusMerchant statusCreate invoiceInvoice status

Login

Login

💳Create Invoice API

The Create Invoice API allows you to generate an invoice for a specific merchant. This API handles parameters like the merchant's information, reference ID, currency, and amount to create an invoice for a given transaction.

Note:

Ensure that you pass a validmerchant_id, reference_id, andamountwhen making a request. If the merchant or reference is not found, or the amount is invalid, an error will be returned.

📝 Input Parameters

ParameterTypeRequiredDescription
merchant_idstring✔️Unique identifier for the merchant. This is required for creating an invoice.
reference_idstring✔️The `reference_id` is a unique string used to track the user's order in the issuer's database. It can be the order ID from the issuer's database table.
currency_idstring✔️UUID of the enabled currency configured in the gateway.
amountstring✔️The transaction amount. Must be a valid string representation of the amount (e.g., "10.50").
descriptionstring❌Optional description for the invoice (e.g., for the purpose of the transaction).
  • 🔹 The API requires anAPI Keyfor authentication.
  • 🔹 Themerchant_idshould be passed in the request body.
  • 🔹 Theamountmust be a valid string representation of a number and greater than 1.

💡 Example Request


POST https://core.dinakel.com/api/gateway/v1/invoices

Headers:
Authorization: Bearer <your_api_key>

Body:
{
  "merchant_id": "<merchant_id>",
  "reference_id": "<reference_id>",
  "currency_id": "<currency_id>",
  "amount": "<amount>",
  "description": "<description>"
}
          

🔍 Example Response


{
  "status": true,
  "statusCode": 201,
  "invoice_id": "<invoice_id>",
  "data": {
    "invoice_id": "<invoice_id>"
  }
}
          

⚠️ Error Handling

The API provides the following error responses:


{
  "status": false,
  "statusCode": 400,
  "message": "Amount must be a valid decimal number."
}
            

400 Bad Request:The amount parameter is invalid. Ensure the amount is a valid decimal number and greater than 1.


{
  "status": false,
  "statusCode": 404,
  "message": "Merchant or reference not found"
}
            

404 Not Found:The merchant or reference ID provided does not exist in the system. Double-check the merchant ID and reference.


{
  "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.

📖 Further Documentation

  • Merchant Status API
  • Invoice History
Dinakel

Professional crypto payment infrastructure for modern businesses.

Secure commerce infrastructure

Services

  • Why Dinakel?
  • How it works
  • User Guide
  • Gateway
  • Merchant
  • API Key

Legal

  • Terms of use
  • Crypto policy
  • Privacy policy
  • Cookie policy
© 2026 DinakelSimple · Secure · Trackable