Stripe PDF Invoice 2.0.0
Render
NB
- Breaking changes
- Support for async/await is needed (Node 7.6)
- Huge modification to generate invoice from a charge with related order. Aims is to gat and export of the paiement tab from stripe UI.
Install
Install the wkhtmltopdf executable And DO NOT USE PACKAGE INSTALLATION OF DISTRIBUTION Copy binaries into /usr/bin or add to PATH: __/installation_path/bin
npm install stripe-pdf-invoice
Usage
Generate invoice in a file
const invoice_id = 'invoice_id';const stripe_key = 'stripe_key'; const fs = ;const path = ; const stripepdfinvoice = stripe_key company_name: 'Trusk' company_address: '14 rue Charles V' company_zipcode: '75004' company_city: 'Paris' company_country: 'France' company_siret: '146-458-246' company_vat_number: '568-3587-345' company_logo: path color: '#2C75FF'; ;
Use with Express
const invoice_id = 'invoice_id';const stripe_key = 'stripe_key'; const express = ;const fs = ;const path = ; const app = ; const stripepdfinvoice = stripe_key company_name: 'Trusk' company_address: '14 rue Charles V' company_zipcode: '75004' company_city: 'Paris' company_country: 'France' company_siret: '146-458-246' company_vat_number: '568-3587-345' company_logo: path color: '#2C75FF'; app; app;
Options
number (Number)
currency_position_before (Bool)
currency_symbol (String)
date_format (String)
due_days (Number)
color (Number)
company_name (String)
company_logo (String)
company_address (String)
company_zipcode (String)
company_city (String)
company_country (String)
company_siret (String)
company_vat_number (String)
client_company_name (String)
client_company_address (String)
client_company_zipcode (String)
client_company_city (String)
client_company_country (String)
label_invoice (String)
label_invoice_to (String)
label_invoice_by (String)
label_due_on (String)
label_invoice_for (String)
label_description (String)
label_unit (String)
label_price (String)
label_amount (String)
label_subtotal (String)
label_total (String)
label_vat (String)
label_invoice_by (String)
label_invoice_date (String)
label_company_siret (String)
label_company_vat_number (String)
label_invoice_number (String)
label_reference_number (String)
label_invoice_due_date (String)