Every order can have an associated receipt. The order must be created in Take a NAP using the Orders API. Receipts are an essential part of the order process and provide a detailed summary of the transaction. The digital receipt contains information about the company behind the store, customer details, details of the products in the order, and a QR code in compliance with Article 18, ensuring all necessary information is captured and presented in a standardized format.

Generating Receipts

Use the following endpoint to generate a receipt for a specific order:

POST https://api.takeanap.bg/public-api/v1/order/{id}/receipt
const axios = require('axios');

axios
  .post(
    'https://api.takeanap.bg/public-api/v1/order/27f48fed-17ba-47a1-89fc-6314af015e4a/receipt',
  )
  .then((response) => {
    console.log('Receipt generated:', response.data);
  })
  .catch((error) => {
    console.error('Error generating receipt:', error);
  });

Headers

  • x-api-key: Take a NAP API key
  • x-signature: Signed payload with Take a NAP API secret

Request Body

None

Response

Refer to the CreateReceiptResponseDto schema in the API reference.


Sending Receipts

Once generated, the receipt will be sent to the customer’s email address provided in the order details. It’s essential to include the customer’s email address if you want the receipt to be sent.

Note: If no email address is provided in the order, the receipt will not be sent.

Deleting Receipts

Receipts cannot be deleted directly. However, if you delete an order using the Orders API, its associated receipt will be deleted too. This action is irreversible, so make sure to confirm the deletion of an order if you want to remove the associated receipt.