0.1.1 • Published 6 months ago

medusa-plugin-invoiceahoy v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

InvoiceAhoy <> Medusa

A Medusa Commerce plugin to create invoices with InvoiceAhoy.

The plugin subscribes to order events and creates an invoice for the order.


Features

  • Automatically create compliant PDF & HTML invoices from Medusa Orders
  • Invoices are accessible from the Backend portal
  • Benefit from InvoiceAhoy's advanced invoicing features like localization
  • The plugin is in active development. If you have any feature requests, please open an issue.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-invoiceahoy

2. Set the following environment variables in .env:

INVOICEAHOY_API_KEY=<YOUR_INVOICEAHOY_API_KEY>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // ...
  {
    resolve: `medusa-plugin-invoiceahoy`,
    options: {
      logo_url: "https://invoiceahoy.com/ia_logo.svg",  // the logo to add to the invoice
      api_key: process.env.INVOICEAHOY_API_KEY, // required
    },
  },
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

npm run start

2. Place an order using a storefront or the Store APIs. If using the Manual Payment option, visit the Backend Portal and manually capture the payment.

3. Verify that the invoice was created by checking your InvoiceAhoy account or the Order in Medusa Backend Portal.


Events

"invoice.created"

Other channels