npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@epap/receipt-api-sdk

v1.0.3

Published

SDK for epap receipt api

Readme

Receipt API SDK

Our receipt API allows you to easily create digital receipts for your customers. Your customers can view and download their receipts just by scanning a QR code. Demo Receipt: https://link.epap.app/px5rhjTzqEnpDDss9

Getting started

API credentials are required to access the API. You can get your API credentials by registering at epap console and creating a new receipt project.

Usage

Install the sdk using npm i @epap/receipt-api-sdk or yarn add @epap/receipt-api-sdk.

Before making any API calls, you need to specify your credentials using setCredentials. You only need to call this function once per runtime.

import * as receiptApi from '@epap/receipt-api-sdk'

receiptApi.setCredentials({clientId: "your client id", clientSecret: "your client secret"})

Create Receipt
To create a new receipt, you have to specify your receipt data using the EKaBS specification. We've included typescript types to make this process more convenient.

If you have any questions about this process you can take a look at the EKaBS specification or contact us.

Once you gathered your receipt data, you can just call createReceipt to send the receipt to our API:

const createdReceipt = await receiptApi.createReceipt({
    version: "1.0.0",
    type: "INVOICE",
    cash_register: {
        serial_number: "YOUR CASH REGISTER SERIAL NUMBER",
    },
    head: {
        date: new Date().toISOString(),
        number: "YOUR INTERNAL RECEIPT NUMBER",
    },
    data: {
        currency: "EUR",
        full_amount_incl_vat: 3.5,
        payment_types: [
        {
            name: "CASH",
            amount: 3.5,
        },
        ],
        lines: [
        {
            text: "Coffee",
        },
        ],
        vat_amounts: [],
    },
});

The returned object will then contain following information:

{
  "receipt_id": "...", // Use this id to access the receipt later on
  "view_token": {
    "token": "...", // This token can be given to a customer. It is valid for one week and can be used to download the receipt without your api credentials.
    "expires_at": "2022-10-04T10:40:54.707Z"
  },
  "locations": {
    "api": {
      "url": "https://api.epap.app/v1/receipts/.../..."
    },
    "dynamic_link": {
      "url": "https://link.epap.app/...", // Opens receipt in web browser or epap app; Give this link to your customer.
      "qr_code_svg": "<svg> ... <\svg>" // QR Code to url
    }
  }
}

View Receipt
Use the following code to view a previously created receipt:

const receipt = await receiptApi.viewReceipt(receiptId);

The format of the returned receipt is compatible with the EKaBS specification.

Please use receiptApi.viewReceiptUrl if you need to access receipts created by other console receipt projects.

Delete Receipt
If you need to delete a previously created receipt, you can do that using:

await api.deleteReceipt(receiptId)

Please keep in mind that deleted receipts cannot be recovered.

Additional Resources