Skip to main content

E-Receipts

An e-receipt is the digital version of a ticket or sales receipt. It is a payment voucher that you can give to your customer without requesting their tax information. This voucher includes all the sales information so that it can be invoiced if the customer requests it or alternatively can be included in a global invoice at the end of the month.

By creating a digital receipt in Facturapi, your customers will have access to a website where they can fill in their tax information and download their invoice (self-invoice portal).

You can also create a global invoice at the end of the month that includes all those receipts that were not invoiced (known as global invoice).

Create a receipt

To see the descriptions of all the parameters, consult the complete reference of the method Create Receipt.

const facturapi = new Facturapi('sk_test_API_KEY');
const receipt = await facturapi.receipts.create({
folio_number: 1234,
payment_form: Facturapi.PaymentForm.DINERO_ELECTRONICO,
items: [{
quantity: 1,
product: {
description: 'Ukelele',
product_key: '60131324',
price: 345.60,
sku: 'ABC1234'
}
}]
});

Self-invoice portal

When you create an e-receipt, you have the option to send it via email to your customer. This email will contain a link to a self-invoice portal where your customer can fill in their tax information and download their invoice.

For more information, see the article on Self-Invoice.

Convert an e-receipt into an invoice

Por medio del método Facturar Recibo puedes convertir un e-receipt en una factura. Para ello, debes enviar los datos del cliente y otros datos que no se solicitan al crear el recibo.

const invoice = await facturapi.receipts.invoice(receipt.id, {
customer: {
legal_name: 'Roger Watters',
tax_id: 'ROWA121212A11',
email: 'roger@pinkfloyd.com'
},
folio_number: 914,
series: 'F'
});