搜索插件、代码仓与 APP 分类

invoiceninja 封面
插件详情v0.0.11

invoiceninja

轻松在Flutter应用中创建PDF发票并接受付款

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
60
喜欢数
76
Pub 分数
130

安装插件

flutter pub add invoiceninja

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

invoiceninja 包使 Flutter 开发者能够在其应用中直接生成 PDF 发票并处理付款。通过与 Invoice Ninja API 集成,该包简化了跨多个平台的发票创建、自定义和收款流程。开发者可以编程生成带有品牌标识的专业发票,发送给客户,并通过集成网关接受付款。该包支持 Android、iOS、Web、macOS、Windows 和 Linux,非常适合跨平台商业应用。它为自由职业者、小型企业和服务提供商简化了财务工作流程。

适合场景

  • 生成客户发票
  • 处理在线付款
  • 自动化计费工作流程
  • 支持多平台应用
  • 发送品牌PDF
  • 跟踪付款状态

主要特点

  • PDF发票生成
  • 支付集成
  • 跨平台支持
  • 基于API的设计
  • 可自定义模板
  • 实时支付追踪

适合对象

  • Freelancers
  • 小型企业应用
  • 基于服务的平台
  • 计费系统
  • 电子商务集成

使用建议

  • 需要 Invoice Ninja 账户
  • 依赖外部API
  • 需要互联网连接
  • 有限的离线功能
  • 可能会应用速率限制
  • 需要设置身份验证

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Invoice Ninja

Create PDF invoices and accept payments in a Flutter app

Sample

YouTube Video

YouTube Video

Features

  • Accept online payment in mobile, web and desktop Flutter apps
  • Supports many payment gateways including Stripe, PayPal and more
  • Create professional PDF invoices
  • Includes a self-service client portal
  • Many more features...

Overview

The package provides two main classes:

  • InvoiceNinja: Supports the public 'Storefront' routes which allow reading the list of products and creating/finding clients and invoices. Using this class works with restricted access to the account.
  • InvoiceNinjaAdmin: Supports the REST Admin API which uses token based security. Using this class requires an API token to access the account.

Storefront API

Configure
InvoiceNinja.configure(
  'KEY', // Set your company key or use 'KEY' to test
  url: 'https://demo.invoiceninja.com', // Set your selfhost app URL
  debugEnabled: true,
);
Load the product list
final products = await InvoiceNinja.products.load();
Find the product by key
final product = await InvoiceNinja.products.findByKey('product_key');
Create/persist the client
var client = Client.forContact(email: 'test@example.com');
client = await InvoiceNinja.clients.save(client);
Create/persist the invoice
var invoice = Invoice.forClient(client, products: [product]);
invoice = await InvoiceNinja.invoices.save(invoice);
Display the PDF invoice
launch(
  'https://docs.google.com/gview?embedded=true&url=${invoice.pdfUrl}',
  forceWebView: true,
);
Accept the payment
var invoiceKey = invoice.key;
launch(invoice.url);

// ...

final invoice = await InvoiceNinja.invoices.findByKey(invoiceKey);
if (invoice.isPaid) {
  // ...
}

You can use the WidgetsBindingObserver interface to run code when the app is resumed.

Consider giving issue #57536 a thumbs up to make this better in the future.

Admin API

Configure
InvoiceNinjaAdmin.configure(
  'TOKEN', // Set your API token or use 'TOKEN' to test
  url: 'https://demo.invoiceninja.com', // Set your selfhost app URL
  debugEnabled: true,
);
Find a client by email
final client = await InvoiceNinjaAdmin.clients.findByEmail(email);
Load all invoices
final payments = await InvoiceNinjaAdmin.payments.load();
Load the payments list
final payments = await InvoiceNinjaAdmin.payments.load();
Find a payment by id
final payment = await InvoiceNinjaAdmin.payments.findById(id);
Create/persist an invoice and auto-bill it
var invoice = Invoice.forClient(client, products: [product]);
invoice = await InvoiceNinjaAdmin.invoices.save(invoice, action: InvoiceAction.autoBill);

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目

暂无相关数据。