{"id":13588994,"url":"https://github.com/Invoice-Generator/invoice-generator-api","last_synced_at":"2025-04-08T07:31:32.203Z","repository":{"id":27249612,"uuid":"30721796","full_name":"Invoice-Generator/invoice-generator-api","owner":"Invoice-Generator","description":"A free API for generating invoice PDFs and e-Invoices.","archived":false,"fork":false,"pushed_at":"2024-06-07T19:50:46.000Z","size":183,"stargazers_count":407,"open_issues_count":20,"forks_count":55,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-14T22:02:29.825Z","etag":null,"topics":["einvoicing","invoice","invoice-generator","invoice-pdf","invoice-template","ubl"],"latest_commit_sha":null,"homepage":"https://invoice-generator.com/developers","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Invoice-Generator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-12T20:20:35.000Z","updated_at":"2024-09-13T02:51:04.000Z","dependencies_parsed_at":"2024-11-06T08:34:29.841Z","dependency_job_id":"2e4c5c4b-caec-4886-89ff-f20b8eeb398b","html_url":"https://github.com/Invoice-Generator/invoice-generator-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invoice-Generator%2Finvoice-generator-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invoice-Generator%2Finvoice-generator-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invoice-Generator%2Finvoice-generator-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invoice-Generator%2Finvoice-generator-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Invoice-Generator","download_url":"https://codeload.github.com/Invoice-Generator/invoice-generator-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247796144,"owners_count":20997520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["einvoicing","invoice","invoice-generator","invoice-pdf","invoice-template","ubl"],"created_at":"2024-08-01T16:00:17.983Z","updated_at":"2025-04-08T07:31:31.915Z","avatar_url":"https://github.com/Invoice-Generator.png","language":null,"readme":"# Invoice Generator API\n\nWe created a simple API at Invoice-Generator.com to generate invoice PDFs on the fly. This service has been used internally by us for some time. We believe this could be helpful in your project as well.\n\nThe API has a primary endpoint that returns a PDF given details of an invoice. We don't store any of your invoice data.\n\nIn addition to PDF, the API can also generate e-invoices in UBL (Universal Business Language) with the invoice PDF embedded. This is useful as the world shifts to e-invoicing because UBL invoices are tricky to generate.\n\n### Use Cases\n- Creating invoices for VAT compliance\n- Generate a PDF of an invoice that you have the details to (recipient, line items, etc)\n- Produce invoices for B2B buyers from an order or receipt\n- Selling products or services on credit terms\n- Creating e-invoices in UBL (Universal Business Language)\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Examples](#examples)\n  - [Simple Invoice](#simple-invoice)\n  - [JSON Input](#json-input)\n  - [VAT Invoice](#vat-invoice)\n  - [Localization](#localization)\n  - [Custom Fields](#custom-fields)\n  - [E-invoice](#e-invoice)\n  - [Sample Projects](#sample-projects)\n- [API Reference](#api-reference)\n  - [Create Invoice PDF](#create-invoice-pdf)\n  - [Create E-invoice](#create-e-invoice)\n- [Support](#support)\n\n## Getting Started\n\nIn order to begin using the Invoice-Generator.com API, you first need to create an API key. The process for obtaining an API key is as follows.\n\n1. Create a free Invoice-Generator.com account [here](https://invoice-generator.com/signup), or sign in if you already have one.\n2. Go to the **Settings** page.\n3. In the \"API Keys\" section, click **New API Key**.\n\nNow you have an API key and are ready to start invoicing!\n\n## Examples\n\n### Simple Invoice\n\n```bash\ncurl https://invoice-generator.com \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -d from=\"Nikolaus Ltd\" \\\n  -d to=\"Acme, Corp.\" \\\n  -d logo=\"https://example.com/img/logo-invoice.png\" \\\n  -d number=1 \\\n  -d date=\"Feb 9, 2015\" \\\n  -d due_date=\"Feb 16, 2015\" \\\n  -d \"items[0][name]\"=\"Starter plan monthly\" \\\n  -d \"items[0][quantity]\"=1 \\\n  -d \"items[0][unit_cost]\"=99 \\\n  -d notes=\"Thanks for being an awesome customer\\!\" \\\n  -d terms=\"Please pay by the due date.\" \\\n\u003e invoice.pdf\n```\n\n### VAT Invoice\n\nHere's a simple cURL example for generating invoices with VAT:\n\n```bash\ncurl https://invoice-generator.com \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -d from=\"Nikolaus Ltd%0AVAT ID: 1234\" \\\n  -d to=\"Foster Moen%0AVAT ID: 4567\" \\\n  -d logo=\"https://example.com/img/logo-invoice.png\" \\\n  -d number=1 \\\n  -d date=\"Feb 9, 2015\" \\\n  -d payment_terms=\"Charged - Do Not Pay\" \\\n  -d \"items[0][name]\"=\"Starter Plan Monthly\" \\\n  -d \"items[0][quantity]\"=1 \\\n  -d \"items[0][unit_cost]\"=99 \\\n  -d tax_title=\"VAT\" \\\n  -d \"fields[tax]\"=\"%\" \\\n  -d tax=8 \\\n  -d notes=\"Thanks for being an awesome customer\\!\" \\\n  -d terms=\"No need to submit payment. You will be auto-billed for this invoice.\" \\\n\u003e invoice.vat.pdf\n```\n\n### JSON Input\n\nJSON input is also accepted with the `Content-Type` header set to `application/json`\n\n```bash\ncurl https://invoice-generator.com \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"from\":\"Nikolaus Ltd\",\"to\":\"Acme, Corp.\",\"logo\":\"https://example.com/img/logo-invoice.png\",\"number\":1,\"items\":[{\"name\":\"Starter plan\",\"quantity\":1,\"unit_cost\":99}],\"notes\":\"Thanks for your business!\"}' \\\n\u003e invoice.pdf\n```\n\n### Localization\n\nIt is possible to change the localization used to generate the invoice by supplying a locale in the `Accept-Language` header. The default locale is `en-US`.\n\n```bash\ncurl https://invoice-generator.com \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -H \"Accept-Language: fr-FR\" \\\n  -d from=\"Nikolaus Ltd\" \\\n  -d to=\"Acme Corp.\" \\\n  -d logo=\"https://example.com/img/logo-invoice.png\" \\\n  -d number=1 \\\n  -d currency=eur \\\n  -d date=\"Feb 9, 2015\" \\\n  -d due_date=\"Feb 16, 2015\" \\\n  -d \"items[0][name]\"=\"Starter plan monthly\" \\\n  -d \"items[0][quantity]\"=1 \\\n  -d \"items[0][unit_cost]\"=99 \\\n\u003e invoice.pdf\n```\n\n#### Supported Languages\n\nWe currently have translations available in English, French, German, Spanish, and Thai.\n\n### Custom Fields\n\n```bash\ncurl https://invoice-generator.com \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -d from=\"Nikolaus Ltd\" \\\n  -d to=\"My Customer\" \\\n  -d ship_to=\"Shipping Address\" \\\n  -d logo=\"https://example.com/img/logo-invoice.png\" \\\n  -d number=1 \\\n  -d date=\"Feb 9, 2015\" \\\n  -d \"custom_fields[0][name]\"=\"My Custom Field\" \\\n  -d \"custom_fields[0][value]\"=\"Some Value\" \\\n  -d \"items[0][name]\"=\"Starter Plan Monthly\" \\\n  -d \"items[0][quantity]\"=1 \\\n  -d \"items[0][unit_cost]\"=99 \\\n\u003e invoice.custom_fields.pdf\n```\n\n### E-invoice\n\nHere's a simple cURL example for generating e-invoices in UBL XML:\n\n```bash\ncurl https://invoice-generator.com/ubl \\\n  -H \"Authorization: Bearer myApiKey\" \\\n  -d from=\"Nikolaus Ltd%0AVAT ID: 1234\" \\\n  -d to=\"Foster Moen%0AVAT ID: 4567\" \\\n  -d logo=\"https://example.com/img/logo-invoice.png\" \\\n  -d number=1 \\\n  -d date=\"Feb 9, 2015\" \\\n  -d date=\"Mar 9, 2015\" \\\n  -d payment_terms=\"NET 30\" \\\n  -d \"items[0][name]\"=\"Starter Plan Monthly\" \\\n  -d \"items[0][quantity]\"=1 \\\n  -d \"items[0][unit_cost]\"=99 \\\n  -d tax_title=\"VAT\" \\\n  -d \"fields[tax]\"=\"%\" \\\n  -d tax=8 \\\n  -d notes=\"Thanks for being an awesome customer\\!\" \\\n\u003e invoice.xml\n```\n\n### Sample Projects\n\n- Go: [generate invoices programmatically](https://github.com/Invoice-Generator/go-invoice-generator-connector)\n- Ruby: [generate invoices from Stripe webhooks](https://github.com/Invoice-Generator/ruby-stripe-invoice-generator)\n- Node.js: [invoice-generator.js](https://github.com/Invoice-Generator/invoice-generator.js)\n- Python: [python-invoice-generator](https://github.com/aleaforny/python-invoice-generator)\n\n************\n\n## API Reference\n\n### Create Invoice PDF\n\n```text\nPOST https://invoice-generator.com\n```\n\n#### Invoice Parameters\n\nWhen a value is null or zero, the field will not be shown on the invoice. The exception to this are the required fields `from`, `to`, `date`, and `items`.\n\n|Parameter|Description|Default Value\n|:--------|:----------|:------------\n`logo`|URL of your logo|*null*\n`from`|Your organization billing address and contact info|*null*\n`to`|Entity being billed - multiple lines ok|*null*\n`ship_to`|Shipping address - multiple lines ok|*null*\n`number`|Invoice number|*null*\n`currency`|ISO 4217 3-digit currency code|USD\n`custom_fields`|Array of objects - see [Custom Fields](#custom-fields) below|*[]*\n`date`|Invoice date|current date\n`payment_terms`|Payment terms summary (i.e. NET 30)|*null*\n`due_date`|Invoice due date|*null*\n`items`|Array of objects - see [Line Items](#line-items) below|`[]`\n`fields`|Object - see [Subtotal Lines](#subtotal-lines) below|`{\"tax\":\"%\",\"discounts\":false,\"shipping\":false}`\n`discounts`|Subtotal discounts - numbers only|0\n`tax`|Tax - numbers only|0\n`shipping`|Shipping - numbers only|0\n`amount_paid`|Amount paid - numbers only|0\n`notes`|Notes - any extra information not included elsewhere|*null*\n`terms`|Terms and conditions - all the details|*null*\n\n#### Line Item Parameters\n\nLine items are represented as an array of objects. Here's an example:\n\n```json\n{\n  \"items\": [\n    {\n      \"name\": \"Gizmo\",\n      \"quantity\": 10,\n      \"unit_cost\": 99.99,\n      \"description\": \"The best gizmos there are around.\"\n    },\n    {\n      \"name\": \"Gizmo v2\",\n      \"quantity\": 5,\n      \"unit_cost\": 199.99\n    }\n  ]\n}\n```\n\n#### Subtotal Line Parameters\n\nThe `fields` object toggles the `discounts`, `tax`, and `shipping` subtotal lines. Each setting can have a value of `%`, `true`, or `false`. For example to add a percent tax rate and flat shipping to your invoice you would send this:\n\n```json\n{\n  \"fields\": {\n    \"tax\": \"%\",\n    \"discounts\": false,\n    \"shipping\": true\n  },\n  \"tax\": 7,\n  \"shipping\": 15\n}\n```\n\n#### Custom Field Parameters\n\nCustom fields allow you to add additional fields to the invoice details in the top-right. Here's an example:\n\n```json\n{\n  \"custom_fields\": [\n    {\n      \"name\": \"Gizmo\",\n      \"value\": \"PO-1234\"\n    },\n    {\n      \"name\": \"Account Number\",\n      \"value\": \"CUST-456\"\n    }\n  ]\n}\n```\n\n#### Invoice Template Parameters\n\nThese parameters control the titles of the fields on the invoice template. If localization is used, the default values are translated to the specified language. Any invoice template parameter given will override the localized default.\n\n|Parameter|Default Value\n|:--------|:------------\n`header`|INVOICE\n`to_title`|Bill To\n`ship_to_title`|Ship To\n`invoice_number_title`|#\n`date_title`|Date\n`payment_terms_title`|Payment Terms\n`due_date_title`|Due Date\n`purchase_order_title`|Purchase Order\n`quantity_header`|Quantity\n`item_header`|Item\n`unit_cost_header`|Rate\n`amount_header`|Amount\n`subtotal_title`|Subtotal\n`discounts_title`|Discounts\n`tax_title`|Tax\n`shipping_title`|Shipping\n`total_title`|Total\n`amount_paid_title`|Amount Paid\n`balance_title`|Balance\n`terms_title`|Terms\n`notes_title`|Notes\n\n### Create E-invoice\n\n```text\nPOST https://invoice-generator.com/ubl\n```\n\n#### Parameters\n\nCreating an invoice with universal business language uses the same parameters as the [Create Invoice PDF](#create-invoice-pdf) endpoint.\n\n## Support\n\nHave a feature request or bug report? We would love to hear your thoughts! You can [create an issue](https://github.com/Invoice-Generator/invoice-generator-api/issues) on GitHub for any issues you encounter or feature requests.\n\nUsing invoice-generator.com is subject to the [Privacy Policy and Terms of Use](https://invoice-generator.com/terms).","funding_links":[],"categories":["GO"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInvoice-Generator%2Finvoice-generator-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FInvoice-Generator%2Finvoice-generator-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInvoice-Generator%2Finvoice-generator-api/lists"}