NAV
shell ruby php python java .NET go

Introduction

Hello! Invoiced is an API for billing customers and getting paid.

Our API was designed to handle all of the billing needs for your business or application while making the integration process as painless as possible. Through the API we can help you seamlessly manage invoicing, payments, subscription billing, metered billing, estimates, pricing, and much more.

We designed the Invoiced API around REST principles.

Here’s a few pages that might be helpful in addition to this API reference.

API Endpoint

All API calls must be made to https://api.invoiced.com.

We also have a sandbox environment for testing available at https://api.sandbox.invoiced.com.

JSON-only

All responses will be in JSON. Input data passed through the request body can be form-encoded or JSON-encoded. If using a JSON body, please specify the Content-Type header as application/json.

In the API dates are represented as UNIX timestamps. Each entity like customers or invoices has a unique integer ID.

PDFs

A few endpoints support returning a PDF response instead of JSON if you set the Accept header to application/pdf. For example, the retrieve invoice endpoint can return a PDF. The endpoints that support PDFs are notated in the documentation.

Client Libraries

We have client libraries available in several languages. If you don’t see your language listed then please contact us and we would be happy to help.

Getting Help or Contributing

We’ve made this document open source. Please report any issues or suggestions in the API doc issues. Any pull requests to improve this document are welcome too! If you need help using the API or need to discuss anything sensitive please message us at support@invoiced.com.

Authentication

The API uses HTTP Basic Authentication to authenticate users. A valid API key is required for all requests.

Obtaining an API Key

An API key can be obtained by signing in to invoiced.com, and then going to SettingsDevelopersAPI Keys. Each business on Invoiced has its own set of API keys. We recommend creating a separate API key for each application that will be making calls on your behalf.

Usage

curl https://api.invoiced.com/invoices \
  -u {YOUR_API_KEY}:
require "invoiced"
invoiced = Invoiced::Client.new("{YOUR_API_KEY}")
<?php

$invoiced = new Invoiced\Client("{YOUR_API_KEY}");
import invoiced

client = invoiced.Client("{YOUR_API_KEY}")
import com.invoiced.entity.Connection;

Connection invoiced = new Connection("{YOUR_API_KEY}",false);
import Invoiced;

var invoiced = new Connection("{YOUR_API_KEY}", Invoiced.Environment.production);
import (
  "github.com/Invoiced/invoiced-go"
  "github.com/Invoiced/invoiced-go/api"
)

client := api.New("{YOUR_API_KEY}", false)

The API key must be passed in through the username with the password left blank. The right sidebar has an example request with authorization

Sandbox API

curl https://api.sandbox.invoiced.com/invoices \
  -u {YOUR_SANDBOX_API_KEY}:
require "invoiced"
invoiced = Invoiced::Client.new("{YOUR_SANDBOX_API_KEY}", true)
<?php

$invoiced = new Invoiced\Client("{YOUR_SANDBOX_API_KEY}", true);
import invoiced

client = invoiced.Client("{YOUR_SANDBOX_API_KEY}", True)
import com.invoiced.entity.Connection;

Connection invoiced = new Connection("{YOUR_API_KEY}",true);
import Invoiced;

var invoiced = new Connection("{YOUR_API_KEY}", Invoiced.Environment.sandbox);
import (
  "github.com/Invoiced/invoiced-go"
  "github.com/Invoiced/invoiced-go/api"
)

client := api.New("{YOUR_API_KEY}", true)

You can sign up for a sandbox account at sandbox.invoiced.com and request an API key there. The steps for requesting an API key are the same as production.

Errors

Each API call returns an HTTP status code that reflects the nature of the response. We have done our best to follow the HTTP status code conventions.

Any request that did not succeed will return a 4xx or 5xx error. The 4xx range means there was a problem with the request, like a missing parameter. The 5xx range means that something went wrong on our end.

The Invoiced API returns the following HTTP status codes:

200 OK – Request succeeded
201 Created – A resource was created
204 No Content – Request succeeded but there is no response body

400 Bad Request – Invalid request parameters
401 Unauthorized – Incorrect or missing API key
403 Forbidden – You do not have permission to view a resource or perform an action
404 Not Found – The specified resource could not be found
429 Too Many Requests – You’re moving too fast! Slow down!
500 Internal Server Error – There was a problem on our end

All error responses will contain an object with these attributes

Parameter Description
type Type of error, invalid_request or api
message Explanation of the error
param Available when a specific request parameter was responsible

Pagination

Link: <https://api.invoiced.com/customers?page=3&per_page=10>; rel="self",
      <https://api.invoiced.com/customers?page=1&per_page=10>; rel="first",
      <https://api.invoiced.com/customers?page=2&per_page=10>; rel="previous",
      <https://api.invoiced.com/customers?page=4&per_page=10>; rel="next",
      <https://api.invoiced.com/customers?page=5&per_page=10>; rel="last"

All list operations will be paginated in similar fashion as the GitHub API. In most cases we will paginate requests returning more than 100 results. You can control pagination with the page and per_page parameters. Pages start at 1 and the first page will be returned if no page is specified.

When traversing the pages, we recommend using the Link and X-Total-Count headers. The Link header will return URLs that you can use to traverse the API without having to write your own. It’s preferred to use the links from the API because it protects against future updates.

Versioning

Any future changes to the API will be versioned in order to maintain backwards compatibility with existing integrations.

Metadata

curl "https://api.invoiced.com/customers" \
  -u {API_KEY}: \
  -d name="Acme" \
  -d metadata[icp_number]="1234567890" \
  -d metadata[account_rep]="Jan"
invoiced.Customer.create(
  :name => "Acme",
  :metadata => {
    :icp_number => "1234567890",
    :account_rep => "Jan"
  }
)
<?php

$invoiced->Customer->create([
  'name' => "Acme",
  'metadata' => [
    'icp_number' => "1234567890",
    'account_rep' => "Jan"
  ]
]);
client.Customer.create(
  name="Acme",
  metadata={
    'icp_number': "1234567890",
    'account_rep': "Jan"
  }
)
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("icp_number", "1234567890");
params.put("account_rep","Jan");
Customer customer = invoiced.newCustomer();
customer.name = "Acme";
customer.metadata = params;
customer.create();
Dictionary<string, string> params = new Dictionary<string, string>();
params["icp_number"] = "1234567890";
params["account_rep"] = "Jan";
var customer = invoiced.NewCustomer();
customer.Name = "Acme";
customer.Metadata = params;
customer.Create();
customer, err := client.Customer.Create(&invoiced.CustomerRequest{
  Name: invoiced.String("Acme"),
  Metadata: map[string]interface{
    "icp_number": "1234567890",
    "account_rep": "Jan",
  },
})

The above command returns JSON structured like this:

{
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
#<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced\Customer JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at 0x3fdbf95e4d08> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
com.invoiced.entity.Customer@cb8fd59 JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced.Customer<15444> {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at cb8fd59> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}

Most Invoiced objects have a metadata attribute. This parameter allows you to store custom key-value data on supported objects.

There are many use cases for metadata. Any time you want to store custom, structured data on an object, like a Customer or Invoice, then metadata is a great fit. Metadata is only visible within the API and in the dashboard. Customers will not see this data unless you choose to display it with a custom field.

Our custom fields feature is backed by the metadata store. If you are using custom fields then be sure to use the ID of your custom field as the key for your metadata value in order to link it with the right custom field. Custom fields are not required in order to use metadata.

Metadata can include up to 10 keys per object. Each key can be up to 40 characters long and values may be up to 255 characters long.

Special Parameters

Expanding Relations

curl "https://api.invoiced.com/invoices/:id?expand=customer" \
  -u {API_KEY}:
invoice = invoiced.Invoice.retrieve("{INVOICE_ID}", {
  :expand => "customer"
})
<?php

$invoice = $invoiced->Invoice->retrieve("{INVOICE_ID}", [
  'expand' => "customer"
]);
invoice = client.Invoice.retrieve("{INVOICE_ID}", {
  'expand': "customer"
})
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("expand", "customer");
Invoice invoice = invoiced.newInvoice().retrieve("{INVOICE_ID}", params);
Dictionary<string, string> params = new Dictionary<string, string>();
params["expand"] = "customer";
var invoice = invoiced.NewInvoice().Retrieve("{INVOICE_ID}", params);
// Expands in the Go library are not currently supported.

Usually you need to request more than just an invoice. Often, you might want data about the associated customer. There is a built-in way to do this that saves extra API requests.

Certain relational properties can be expanded by passing in a comma-separated list of properties to expand through the expand parameter. For example if you were requesting a payment and wanted to expand the associated customer and invoice objects you would set expand=customer,invoice. This will replace the ID on the customer and invoice properties with expanded objects.

The expand parameter works for any response that has relational properties.

Filter

Example retrieving a list of outstanding invoices for a customer:

curl "https://api.invoiced.com/invoices?filter%5Bpaid%5D=0&filter%5Bclosed%5D=0&filter%5Bcustomer%5D=1234" \
  -u {API_KEY}:
invoices = invoiced.Invoice.list(
  :filter => {
    :paid => false,
    :closed => false,
    :customer => 1234
  }
)
<?php

$invoices = $invoiced->Invoice->all([
  'filter' => [
    'paid' => false,
    'closed' => false,
    'customer' => 1234
  ]
]);
invoices = client.Invoice.list(
  filter={
    'paid': False,
    'closed': False,
    'customer': 1234
  }
)
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("filter[paid]", false);
params.put("filter[closed]", false);
params.put("filter[customer]", 1234);
EntityList<Invoice> invoices = invoiced.newInvoice().listAll(filter);
Dictionary<string, string> params = new Dictionary<string, string>();
params["filter[paid]"] = false;
params["filter[closed]"] = false;
params["filter[customer]"] = 1234;
var invoices = invoiced.NewInvoice().ListAll(params);
filter := invoiced.NewFilter()
filter.Set("paid", false)
filter.Set("closed", false)
filter.Set("customer", 1234)
invoices, err := client.Invoice.ListAll(filter, nil)

The filter parameter allows you to search entities based on an exact match. While it is not meant to replace a search API, the filter parameter can be useful if you need to look up a customer by name or want to list all overdue invoices. It can be used on many of the list endpoints.

The filter parameter is an object whose keys are the properties that should be matched.

Metadata Filter

Example retrieving customers with a matching account-rep metadata value:

curl "https://api.invoiced.com/customers?metadata%5Baccount-rep%5D=Jan" \
  -u {API_KEY}:
customer = invoiced.Customer.list(
  :metadata => {
    'account-rep' => "Jan"
  }
)
<?php

$customer = $invoiced->Customer->all([
  'metadata' => [
    'account-rep' => "Jan"
  ]
]);
customer = client.Customer.list(
  metadata={
    'account-rep': "Jan"
  }
)
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("metadata[account-rep]", "Jan");
EntityList<Customer> customers = invoiced.newCustomer().listAll(params);
Dictionary<string, string> params = new Dictionary<string, string>();
params["metadata[account-rep]"] = "Jan";
var customers = invoiced.NewCustomer().ListAll(params);
filter := invoiced.NewMetadataFilter()
filter.Set("account-rep", "Jan")
customers, err := client.Customer.ListAll(filter, nil)

The metadata parameter behaves in a similar fashion to the filter parameter. It allows you to search entities that have an exactly matching metadata value for each constraint given. It can be used on any of the list endpoints for objects that support metadata.

The metadata parameter is an object whose keys should exactly match the metadata of the objects returned. If an object does not have a metadata value for a given key then the object will not be included in the result set, with no error being thrown.

Customers

Customers represent the entity you are billing, whether this is an organization or a individual. Each customer has an AutoPay setting. When AutoPay is enabled, any invoices issued for this customer will be charged to the customer’s payment source. Currently we support debit / credit cards and bank accounts (via ACH) as payment sources.

Conversely, when AutoPay is disabled we will let your customers pay each invoice issued with one of the payment methods you accept.

Customer Object

Attributes

{
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
#<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced\Customer JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at 0x3fdbf95e4d08> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
com.invoiced.entity.Customer@d72919f JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced.Customer<15444> {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at d72919f> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": true,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {
    "account_rep": "Jan",
    "icp_number": "1234567890"
  },
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": {
    "brand": "Visa",
    "exp_month": 2,
    "exp_year": 20,
    "funding": "credit",
    "id": 850,
    "last4": "4242",
    "object": "card"
  },
  "payment_terms": null,
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Parameter Type Description
id integer The customer’s unique ID
object string Object type, customer
name string Customer name
number string A unique ID to help tie your customer to your external systems
email string Email address
autopay boolean AutoPay enabled?
autopay_delay_days integer Number of days to delay AutoPay
payment_terms string Payment terms when AutoPay is off, i.e. “NET 30”
payment_source object Customer’s payment source, if attached
attention_to string Used for ATTN: address line if company
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code
language string Two-letter ISO code
currency string 3-letter ISO code, optional
chase boolean Chasing enabled? - defaults to true
chasing_cadence integer Cadence ID
next_chase_step integer Cadence step ID
phone string Phone #
credit_hold boolean When true, customer is on credit hold
credit_limit number Customer credit limit
owner integer User ID
taxable boolean Customer taxable?
taxes array Collection of Tax Rate IDs
tax_id string Tax ID to be displayed on documents
avalara_entity_use_code string Avalara-specific entity use code
avalara_exemption_number string Tax-exempt number to pass to Avalara
type string Organization type, company or person
parent_customer integer Parent customer ID
notes string Private customer notes
sign_up_page integer Sign Up Page ID
sign_up_url string URL where customer can purchase a subscription, when a sign up page is assigned
statement_pdf_url string URL to download the latest account statement
ach_gateway integer Gateway configuration ID to process payments with
cc_gateway integer Gateway configuration ID to process payments with
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated
metadata object A hash of key/value pairs that can store additional information about this object.

Contact Object

Contacts can be attached to customers. A contact could represent an additional email recipient for a customer, or perhaps an address in addition to the billing address, like a shipping address.

Attributes

{
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
#<Invoiced::Contact:0x3fdbf95e4d08 id=10403> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced\Contact JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at 0x3fdbf95e4d08> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
com.invoiced.entity.Contact@3a0fa320 JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced.Contact<10403> {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at 3a0fa320> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Parameter Type Description
id integer The contact’s unique ID
object string Object type, contact
name string Contact name
title string Job title
email string Email address
phone string Phone number
primary boolean When true the contact will be copied on any account communications
sms_enabled boolean When true the contact can be contacted via text message
department string Department
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated

Create a customer

curl "https://api.invoiced.com/customers" \
  -u {API_KEY}: \
  -d name="Acme" \
  -d email="billing@acmecorp.com" \
  -d payment_terms="NET 30" \
  -d type="company"
invoiced.Customer.create(
  :name => "Acme",
  :email => "billing@acmecorp.com",
  :payment_terms => "NET 30",
  :type => "company"
)
<?php

$invoiced->Customer->create([
  'name' => "Acme",
  'email' => "billing@acmecorp.com",
  'payment_terms' => "NET 30",
  'type' => "company"
]);
client.Customer.create(
  name="Acme",
  email="billing@acmecorp.com",
  payment_terms="NET 30",
  type="company"
)
Customer customer = invoiced.newCustomer();
customer.name = "Acme";
customer.email = "billing@acmecorp.com";
customer.paymentTerms = "NET 30";
customer.type = "company";
customer.create();
var customer = invoiced.NewCustomer();
customer.Name = "Acme";
customer.Email = "billing@acmecorp.com";
customer.PaymentTerms = "NET 30";
customer.Type = "company";
customer.Create();
customer, err := client.Customer.Create(&invoiced.CustomerRequest{
  Name: invoiced.String("Acme"),
  Email: invoiced.String("billing@acmecorp.com"),
  PaymentTerms: invoiced.String("NET 30"),
  Type: invoiced.String("company"),
})

The above command returns JSON structured like this:

{
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
#<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced\Customer JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at 0x3fdbf95e4d08> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
com.invoiced.entity.Customer@cb8fd57 JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced.Customer<15444> {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at cb8fd57> JSON: {
  "ach_gateway": null,
  "address1": null,
  "address2": null,
  "attention_to": null,
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": null,
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": null,
  "postal_code": null,
  "sign_up_page": null,
  "sign_up_url": null,
  "state": null,
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": null,
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}

Create a new customer profile with this endpoint.

HTTP Request

POST /customers

Attributes

Parameter Type Description
name string Customer name - required
number string A unique ID to help tie your customer to your external systems. We will generate one if not supplied.
email string Email address
autopay boolean AutoPay enabled? Defaults to false
autopay_delay_days integer Number of days to delay AutoPay
payment_terms string Payment terms when AutoPay is off, i.e. “NET 30”
attention_to string Used for ATTN: address line if company
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code
language string Two-letter ISO code
currency string 3-letter ISO code, optional
chase boolean Chasing enabled? - defaults to true
chasing_cadence integer Cadence ID
next_chase_step integer Cadence step ID
phone string Phone #
credit_hold boolean When true, customer is on credit hold
credit_limit number Customer credit limit
owner integer User ID
taxable boolean Customer taxable?
taxes array Collection of Tax Rate IDs
tax_id string Tax ID to be displayed on documents
avalara_entity_use_code string Avalara-specific entity use code
avalara_exemption_number string Tax-exempt number to pass to Avalara
type string Organization type, company or person. Defaults to company
parent_customer integer Parent customer ID
notes string Private customer notes
sign_up_page integer Sign Up Page ID
metadata object A hash of key/value pairs that can store additional information about this object.
disabled_payment_methods array List of payment methods to disable for this customer, i.e. ["credit_card", "wire_transfer"].
ach_gateway integer Gateway configuration ID to process payments with
cc_gateway integer Gateway configuration ID to process payments with

Retrieve a customer

curl "https://api.invoiced.com/customers/:id" \
  -u {API_KEY}:
customer = invoiced.Customer.retrieve("{CUSTOMER_ID}")
<?php

$customer = $invoiced->Customer->retrieve("{CUSTOMER_ID}");
customer = client.Customer.retrieve("{CUSTOMER_ID}")
Customer customer = invoiced.newCustomer().retrieve({CUSTOMER_ID});
var customer = invoiced.NewCustomer().Retrieve({CUSTOMER_ID});
customer, err := client.Customer.Retrieve({CUSTOMER_ID})

The above command returns JSON structured like this:

{
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
#<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced\Customer JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at 0x3fdbf95e4d08> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
com.invoiced.entity.Customer@cb8fd58 JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced.Customer<15444> {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at cb8fd58> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}

This endpoint retrieves a specific customer.

HTTP Request

GET /customers/:id

Update a customer

curl "https://api.invoiced.com/customers/:id" \
  -u {API_KEY}: \
  -d payment_terms="NET 14" \
  -d attention_to="Sarah Fisher" \
  -d address1="342 Amber St" \
  -d city="Hill Valley" \
  -d state="CA" \
  -d postal_code="94523" \
  -d tax_id="893-934835" \
  -d phone="(820) 297-2983" \
  -X PATCH
customer.payment_terms = "NET 14"
customer.attention_to = "Sarah Fisher"
customer.address1 = "342 Amber St"
customer.city = "Hill Valley"
customer.state = "CA"
customer.postal_code = "94523"
customer.tax_id = "893-934835"
customer.phone = "(820) 297-2983"
customer.save
<?php

$customer->payment_terms = "NET 14";
$customer->attention_to = "Sarah Fisher";
$customer->address1 = "342 Amber St";
$customer->city = "Hill Valley";
$customer->state = "CA";
$customer->postal_code = "94523";
$customer->tax_id = "893-934835";
$customer->phone = "(820) 297-2983";
$customer->save();
customer.payment_terms = "NET 14"
customer.attention_to = "Sarah Fisher"
customer.address1 = "342 Amber St"
customer.city = "Hill Valley"
customer.state = "CA"
customer.postal_code = "94523"
customer.tax_id = "893-934835"
customer.phone = "(820) 297-2983"
customer.save()
customer.paymentTerms = "NET 14";
customer.attentionTo = "Sarah Fisher";
customer.address1 = "342 Amber St";
customer.city = "Hill Valley";
customer.state = "CA";
customer.postalCode = "94523";
customer.taxId = "893-934835";
customer.phone = "(820) 297-2983";
customer.save();
customer.PaymentTerms = "NET 14";
customer.AttentionTo = "Sarah Fisher";
customer.Address1 = "342 Amber St";
customer.City = "Hill Valley";
customer.State = "CA";
customer.PostalCode = "94523";
customer.TaxId = "893-934835";
customer.Phone = "(820) 297-2983";
customer.SaveAll();
customer, err := client.Customer.Update({CUSTOMER_ID}, &invoiced.CustomerRequest{
  PaymentTerms: invoiced.String("NET 14"),
  AttentionTo: invoiced.String("Sarah Fisher"),
  Address1: invoiced.String("342 Amber St"),
  City: invoiced.String("Hill Valley"),
  State: invoiced.String("CA"),
  PostalCode: invoiced.String("94523"),
  TaxId: invoiced.String("893-934835"),
  Phone: invoiced.String("(820) 297-2983"),
})

The above command returns JSON structured like this:

{
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
#<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced\Customer JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at 0x3fdbf95e4d08> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
com.invoiced.entity.Customer@cb8fd59 JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
Invoiced.Customer<15444> {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}
<Customer id=15444 at cb8fd59> JSON: {
  "ach_gateway": null,
  "address1": "342 Amber St",
  "address2": null,
  "attention_to": "Sarah Fisher",
  "autopay": false,
  "autopay_delay_days": null,
  "avalara_entity_use_code": null,
  "avalara_exemption_number": null,
  "cc_gateway": null,
  "chase": true,
  "chasing_cadence": null,
  "city": "Hill Valley",
  "country": "US",
  "created_at": 1415222128,
  "credit_hold": false,
  "credit_limit": null,
  "currency": null,
  "email": "billing@acmecorp.com",
  "id": 15444,
  "language": null,
  "metadata": {},
  "name": "Acme",
  "next_chase_step": null,
  "notes": null,
  "number": "CUST-0001",
  "object": "customer",
  "owner": null,
  "parent_customer": null,
  "payment_source": null,
  "payment_terms": "NET 30",
  "phone": "(820) 297-2983",
  "postal_code": "94523",
  "sign_up_page": null,
  "sign_up_url": null,
  "state": "CA",
  "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
  "tax_id": "893-934835",
  "taxable": true,
  "taxes": [],
  "type": "company",
  "updated_at": 1415222128
}

Use this endpoint to update a customer profile.

HTTP Request

PATCH /customers/:id

Request Parameters

Parameter Type Description
name string Customer name
number string A unique ID to help tie your customer to your external systems
email string Email address
autopay boolean AutoPay enabled?
payment_terms string Payment terms when AutoPay is off, i.e. “NET 30”
attention_to string Used for ATTN: address line if company
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code
language string Two-letter ISO code
currency string 3-letter ISO code, optional
chase boolean Chasing enabled? - defaults to true
chasing_cadence integer Cadence ID
next_chase_step integer Cadence step ID
phone string Phone #
credit_hold boolean When true, customer is on credit hold
credit_limit number Customer credit limit
owner integer User ID
taxable boolean Customer taxable?
taxes array Collection of Tax Rate IDs
tax_id string Tax ID to be displayed on documents
avalara_entity_use_code string Avalara-specific entity use code
avalara_exemption_number string Tax-exempt number to pass to Avalara
type string Organization type, company or person
parent_customer integer Parent customer ID
notes string Private customer notes
sign_up_page integer Sign Up Page ID
metadata object A hash of key/value pairs that can store additional information about this object.
disabled_payment_methods array List of payment methods to disable for this customer, i.e. ["credit_card", "wire_transfer"].
ach_gateway integer Gateway configuration ID to process payments with
cc_gateway integer Gateway configuration ID to process payments with

Get current balance

curl "https://api.invoiced.com/customers/balance" \
  -u {API_KEY}:
customer.balance
<?php

$customer->balance();
customer.balance()
Balance balance = customer.getBalance();
var balance = customer.GetBalance();
balance, err := client.Customer.GetBalance({CUSTOMER_ID})

The above command returns JSON structured like this:

{
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
{
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
{
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
{
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
com.invoiced.entity.Balance@cb8fd60 JSON: {
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
Invoiced<Balance> {
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}
<CustomerBalance> JSON: {
  "available_credits": 50,
  "currency": "usd",
  "due_now": 0,
  "history": [
    {
      "balance": 50,
      "currency": "usd",
      "timestamp": 1464041624
    },
    {
      "balance": 100,
      "currency": "usd",
      "timestamp": 1464040550
    }
  ],
  "past_due": false,
  "total_outstanding": 470
}

This endpoint returns the customer’s current credit balance, credit balance history, and the current amount outstanding.

HTTP Request

GET /customers/:id/balance

Query Parameters

Parameter Description
currency string 3-letter ISO code, defaults to customer currency

Send a statement email

curl "https://api.invoiced.com/customers/:id/emails" \
  -u {API_KEY}: \
  -X POST
emails = customer.send_statement
<?php

$emails = $customer->sendStatement();
emails = customer.send_statement()
EmailRequest emailRequest = new EmailRequest();
EmailRecipient[] emailRecipients = new EmailRecipient[1];
emailRecipients[0] = new EmailRecipient();
emailRecipients[0].name = "Client";
emailRecipients[0].email = "client@example.com";
emailRequest.to = emailRecipients;
emailRequest.subject = "Statement from Dunder Mifflin, Inc.";
emailRequest.message = "Dear Client, we have attached your latest account statement. Thank you!";
Email[] emails = customer.sendStatement(emailRequest);
var emailRequest = new EmailRequest();
var emailRecipients = new EmailRecipient[1];
emailRecipients[0] = new EmailRecipient();
emailRecipients[0].Name = "Client";
emailRecipients[0].Email = "client@example.com";
emailRequest.To = emailRecipients;
emailRequest.Subject = "Statement from Dunder Mifflin, Inc.";
emailRequest.Message = "Dear Client, we have attached your latest account statement. Thank you!";
var emails = customer.SendStatementEmail(emailRequest);
err := client.Customer.SendStatementEmail({CUSTOMER_ID}, &invoiced.SendStatementEmailRequest{
  To: []*invoiced.EmailRecipient{
    Name: invoiced.String("Client"),
    Email: "client@example.com",
  },
  Subject: invoiced.String("Statement from Dunder Mifflin, Inc."),
  Message: invoiced.String("Dear Client, we have attached your latest account statement. Thank you!"),
})

The above command returns JSON structured like this:

[
  {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
[
  #<Invoiced::Email:0x3fdbf95e4d08 id=f45382c6fbc44d44aa7f9a55eb2ce731> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
[
  Invoiced\Email JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
[
  <Email id=f45382c6fbc44d44aa7f9a55eb2ce731 at 0x3fdbf95e4d08> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
//To pretty print a array of Objects use Arrays.toString(Object[]);
[
  com.invoiced.entity.Email@1bfbb8ee JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
[
  Invoiced.Email<f45382c6fbc44d44aa7f9a55eb2ce731> {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]
[
  <Email id=f45382c6fbc44d44aa7f9a55eb2ce731 at 1bfbb8ee> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, we have attached your latest account statement. Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "Statement from Dunder Mifflin, Inc.",
    "template": "statement_email",
    "updated_at": 1436890047
  }
]

This endpoint sends a PDF account statement to a customer by email.

HTTP Request

POST /customers/:id/emails

Request Parameters

Parameter Type Description
to array Optional array of recipients like:
[{"name": "Client", "email": "client@example.com"}]
bcc string Optional comma-separated list of email addresses to be blind carbon copied
template string Optional email template ID, otherwise a standard email template is selected
subject string Optional subject to override the template
message string Optional message body to override the template
type string Statement type, balance_forward or open_item
start timestamp Used with balance forward statements
end timestamp Used with balance forward statements
items string Optional; can be set to past_due for open item statements

Send a statement SMS

curl "https://api.invoiced.com/customers/:id/text_messages" \
  -u {API_KEY}: \
  -d to[0][phone]="11234567890" \
  -d to[0][name]="Bob Loblaw" \
  -d message="{{company_name}}: You have a new statement {{url}}"
  -d type="open_item" \
  -X POST
text_messages = customer.send_statement_text(
  :type => "open_item",
  :to => [{"phone" => "11234567890", "name" => "Bob Loblaw"}],
  :message => "{{company_name}}: You have a new statement {{url}}")
<?php

$textMessages = $customer->sendStatementText([
  'type' => 'open_item',
  'to' => [['phone' => "11234567890", 'name' => "Bob Loblaw"]],
  'message' => "{{company_name}}: You have a new statement {{url}}"]);
text_messages = customer.send_statement_text(
  type="open_item",
  to=[{"phone": "11234567890", "name": "Bob Loblaw"}],
  message="{{company_name}}: You have a new statement {{url}}")
TextRequest textRequest = new TextRequest();
TextRecipient recipient = new TextRecipient();
recipient.name = "Bob Loblaw";
recipient.phone = "11234567890";
textRequest.to = new TextRecipient[]{recipient};
textRequest.message = "{{company_name}}: You have a new statement {{url}}";
textRequest.type = "open_item";
TextMessage[] textMessages = customer.sendStatementText(textRequest);
var textRequest = new TextRequest();
var recipient = new TextRecipient();
recipient.Name = "Bob Loblaw";
recipient.Phone = "11234567890";
textRequest.To = new TextRecipient[]{recipient};
textRequest.Message = "{{company_name}}: You have a new statement {{url}}";
textRequest.Type = "open_item";
var textMessages = customer.SendStatementText(textRequest);
texts, err := client.Customer.SendStatementText(&invoiced.SendStatementTextMessageRequest{
  To: []*invoiced.TextMessageRecipient{
    {
      Name: invoiced.String("Bob Loblaw"),
      Phone: invoiced.String("11234567890"),
    }
  }
  Type: invoiced.String("open_item"),
  Message: invoiced.String("{{company_name}}: You have a new statement {{url}}"),
})

The above command returns JSON structured like this:

[
  {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  #<Invoiced::TextMessage:0x3fdbf95e4d08 id=c05c9cae8c5799da1e5723a0fff355b3> JSON: {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  Invoiced\TextMessage JSON: {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
<TextMessage id=c05c9cae8c5799da1e5723a0fff355b3 at 0x3fdbf95e4d08> JSON: {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
//To pretty print a array of Objects use Arrays.toString(Object[]);

[
  com.invoiced.entity.TextMessage@1bfbb8ee JSON: {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  Invoiced.TextMessage<c05c9cae8c5799da1e5723a0fff355b3> {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  <TextMessage id=c05c9cae8c5799da1e5723a0fff355b3 at 1bfbb8ee> JSON: {
    "created_at": 1571086718,
    "id": "c05c9cae8c5799da1e5723a0fff355b3",
    "message": "Acme Inc.: You have a new statement https://acme.invoiced.com/statements/5X5g7Sb46KIR9IzxjjEjdnI9",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]

This endpoint sends an account statement by SMS to a customer using Twilio. Twilio must be connected to Invoiced for requests to succeed.

Text messages can only be sent to customer contacts marked as sms_enabled.

HTTP Request

POST /customers/:id/text_messages

Request Parameters

Parameter Type Description
message string Full text of message
to array Array of recipients like:
[{"phone": "11234567890", "name": "Bob Loblaw"}]
type string Statement type, balance_forward or open_item
start timestamp Used with balance forward statements
end timestamp Used with balance forward statements
items string Optional; can be set to past_due for open item statements

Send a statement letter

curl "https://api.invoiced.com/customers/:id/letters" \
  -u {API_KEY}: \
  -d type="open_item" \
  -X POST
letters = customer.send_statement_letter
<?php

$letters = $customer->sendStatementLetter();
letters = customer.send_statement_letter()
LetterRequest letterRequest = new LetterRequest();
letterRequest.type = "open_item";
Letter letters = customer.sendStatementLetter(letterRequest);
var letterRequest = new LetterRequest();
letterRequest.Type = "open_item";
var letter = customer.SendStatementLetter(letterRequest);
letter, err := client.Customer.SendStatementLetter(&invoiced.SendStatementLetterRequest{
  Type: invoiced.String("open_item"),
})

The above command returns JSON structured like this:

{
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
#<Invoiced::Letter:0x3fdbf95e4d08 id=2678c1e7e6dd1011ce13fb6b76db42df> JSON: {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
Invoiced\Letter JSON: {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
<Letter id=2678c1e7e6dd1011ce13fb6b76db42df at 0x3fdbf95e4d08> JSON: {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
//To pretty print a array of Objects use Arrays.toString(Object[]);
com.invoiced.entity.Letter@1bfbb8ee JSON: {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
Invoiced.Letter<2678c1e7e6dd1011ce13fb6b76db42df> {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}
<Letter id=2678c1e7e6dd1011ce13fb6b76db42df at cb8fd59> JSON: {
  "created_at": 1570826337,
  "expected_delivery_date": 1571776737,
  "id": "2678c1e7e6dd1011ce13fb6b76db42df",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1570826337
}

This endpoint sends an account statement by mail to a customer using Lob. Lob must be connected to Invoiced for requests to succeed.

The letter will automatically be sent to the customer’s billing address.

HTTP Request

POST /customers/:id/letters

Request Parameters

Parameter Type Description
type string Statement type, balance_forward or open_item
start timestamp Used with balance forward statements
end timestamp Used with balance forward statements
items string Optional; can be set to past_due for open item statements

Create a contact

curl "https://api.invoiced.com/customers/:customer_id/contacts" \
  -u {API_KEY}: \
  -d name="Nancy Talty" \
  -d email="nancy.talty@example.com"
customer = invoiced.Customer.retrieve("{CUSTOMER_ID}")
customer.contacts.create(
  :name => "Nancy Talty",
  :email => "nancy.talty@example.com"
)
<?php

$customer = $invoiced->Customer->retrieve("{CUSTOMER_ID}");
$customer->contacts()->create([
  'name' => "Nancy Talty",
  'email' => "nancy.talty@example.com"
]);
customer = client.Customer.retrieve("{CUSTOMER_ID}")
customer.contacts().create(
  name="Nancy Talty",
  email="nancy.talty@example.com"
)
Customer customer = invoiced.newCustomer().retrieve({CUSTOMER_ID});
Contact contact = customer.newContact();
contact.name = "Nancy Talty";
contact.email = "nancy.talty@example.com";
contact.create();
var customer = invoiced.NewCustomer().Retrieve({CUSTOMER_ID});
var contact = customer.NewContact();
contact.Name = "Nancy Talty";
contact.Email = "nancy.talty@example.com";
contact.Create();
contact, err = invoiced.Customer.CreateContact({CUSTOMER_ID}, &invoiced.ContactRequest{
  Name: invoiced.String("Nancy Talty"),
  Email: invoiced.String("nancy.talty@example.com"),
})

The above command returns JSON structured like this:

{
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
#<Invoiced::Contact:0x3fdbf95e4d08 id=10403> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced\Contact JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at 0x3fdbf95e4d08> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
com.invoiced.entity.Contact@cb8fd89 JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced.Contact<10403> {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at cb8fd59> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}

Create a new contact with this endpoint.

HTTP Request

POST /customers/:customer_id/contacts

Attributes

Parameter Type Description
name string Contact name
title string Job title
email string Email address
phone string Phone number
primary boolean When true the contact will be copied on any account communications
sms_enabled boolean When true the contact can be contacted via text message
department string Department
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code

Retrieve a contact

curl "https://api.invoiced.com/customers/:customer_id/contacts/:id" \
  -u {API_KEY}:
customer = invoiced.Customer.retrieve("{CUSTOMER_ID}")
contact = customer.contacts.retrieve("{CONTACT_ID}")
<?php

$customer = $invoiced->Customer->retrieve("{CUSTOMER_ID}");
$contact = $customer->contacts()->retrieve("{CONTACT_ID}");
customer = client.Customer.retrieve("{CUSTOMER_ID}")
contact = customer.contacts().retrieve("{CONTACT_ID}")
Customer customer = invoiced.newCustomer().retrieve({CUSTOMER_ID});
Contact contact = customer.newContact().retrieve({CONTACT_ID});
var customer = invoiced.NewCustomer().Retrieve({CUSTOMER_ID});
var contact = customer.NewContact().Retrieve({CONTACT_ID});
contact, err := client.Customer.RetrieveContact({CUSTOMER_ID}, {CONTACT_ID})

The above command returns JSON structured like this:

{
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
#<Invoiced::Contact:0x3fdbf95e4d08 id=10403> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced\Contact JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at 0x3fdbf95e4d08> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
com.invoiced.entity.Contact@cb8fd89 JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
Invoiced.Contact<10403> {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at cb8fd59> JSON: {
  "address1": null,
  "address2": null,
  "city": null,
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": null,
  "primary": true,
  "sms_enabled": null,
  "state": null,
  "title": null,
  "updated_at": 1463510889
}

This endpoint retrieves a specific contact.

HTTP Request

GET /customers/:customer_id/contacts/:id

Update a contact

curl "https://api.invoiced.com/customers/:customer_id/contacts/:id" \
  -u {API_KEY}: \
  -d address1="507 Grove Avenue" \
  -d city="Oklahoma City" \
  -d state="OK" \
  -d postal_code="73102" \
  -X PATCH
contact.address1 = "507 Grove Avenue"
contact.city = "Oklahoma City"
contact.state = "OK"
contact.postal_code = "73102"
contact.save
<?php

contact->address1 = "507 Grove Avenue"
contact->city = "Oklahoma City"
contact->state = "OK"
contact->postal_code = "73102"
$contact->save();
contact.address1 = "507 Grove Avenue"
contact.city = "Oklahoma City"
contact.state = "OK"
contact.postal_code = "73102"
contact.save()
contact.address1 = "507 Grove Avenue"
contact.city = "Oklahoma City"
contact.state = "OK"
contact.postalCode = "73102"
contact.save()
contact.Address1 = "507 Grove Avenue";
contact.City = "Oklahoma City";
contact.State = "OK";
contact.PostalCode = "73102";
contact.SaveAll();
contact, err := invoiced.Customer.UpdateContact(&invoiced.ContactRequest{
  Address1: invoiced.String("507 Grove Avenue"),
  City: invoiced.String("Oklahoma City"),
  State: invoiced.String("OK"),
  PostalCode: invoiced.String("73102"),
})

The above command returns JSON structured like this:

{
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
#<Invoiced::Contact:0x3fdbf95e4d08 id=10403> JSON: {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
Invoiced\Contact JSON: {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at 0x3fdbf95e4d08> JSON: {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
com.invoiced.entity.Contact@cb8fd89 JSON: {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
Invoiced.Contact<10403> {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}
<Contact id=10403 at cb8fd59> JSON: {
  "address1": "507 Grove Avenue",
  "address2": null,
  "city": "Oklahoma City",
  "country": null,
  "created_at": 1463510889,
  "department": null,
  "email": "nancy.talty@example.com",
  "id": 10403,
  "name": "Nancy Talty",
  "object": "contact",
  "phone": null,
  "postal_code": "73102",
  "primary": true,
  "sms_enabled": null,
  "state": "OK",
  "title": null,
  "updated_at": 1463510889
}

Use this endpoint to update a contact.

HTTP Request

PATCH /customers/:customer_id/contacts/:id

Request Parameters

Parameter Type Description
name string Contact name
title string Job title
email string Email address
phone string Phone number
primary boolean When true the contact will be copied on any account communications
sms_enabled boolean When true the contact can be contacted via text message
department string Department
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code

Delete a contact

curl "https://api.invoiced.com/customers/:customer_id/contacts/:id" \
  -u {API_KEY}: \
  -X DELETE
contact.delete
<?php

$contact->delete();
contact.delete()
contact.delete();
contact.Delete();
err := client.Customer.DeleteContact({CUSTOMER_ID}, {CONTACT_ID})

The above command returns 204 No Content

This endpoint deletes a specific contact.

HTTP Request

DELETE /customers/:customer_id/contacts/:id

List all contacts

curl "https://api.invoiced.com/customers/:customer_id/contacts" \
  -u {API_KEY}:
customer = invoiced.Customer.retrieve("{CUSTOMER_ID}")
contacts, metadata = customer.contacts.list(:per_page => 3)
<?php

$customer = $invoiced->Customer->retrieve("{CUSTOMER_ID}");
list($contacts, $metadata) = $customer->contacts()->all(['per_page' => 3]);
customer = client.Customer.retrieve("{CUSTOMER_ID}")
contacts, metadata = customer.contacts().list(per_page=3)
Customer customer = conn.newCustomer().retrieve({CUSTOMER_ID});
EntityList<Contact> contacts = customer.newContact().listAll();
var customer = invoiced.NewCustomer().Retrieve({CUSTOMER_ID});
var contacts = customer.NewContact.ListAll();
contacts, err := invoiced.Customer.ListAllContacts({CUSTOMER_ID})

The above command returns JSON structured like this:

[
  {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  #<Invoiced::Contact:0x3fdbf95e4d08 id=10403> JSON: {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  Invoiced\Contact JSON: {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  <Contact id=10403 at 0x3fdbf95e4d08> JSON: {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  com.invoiced.entity.Contact@1701e31a JSON: {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  Invoiced.Contact<10403> {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]
[
  <Contact id=10403 at 1701e31a> JSON: {
    "address1": "507 Grove Avenue",
    "address2": null,
    "city": "Oklahoma City",
    "country": null,
    "created_at": 1463510889,
    "department": null,
    "email": "nancy.talty@example.com",
    "id": 10403,
    "name": "Nancy Talty",
    "object": "contact",
    "phone": null,
    "postal_code": "73102",
    "primary": true,
    "sms_enabled": null,
    "state": "OK",
    "title": null,
    "updated_at": 1463510889
  }
]

This endpoint retrieves all contacts.

HTTP Request

GET /customers/:customer_id/contacts

Query Parameters

Parameter Description
sort string Column to sort by, i.e. name asc

Delete a customer

curl "https://api.invoiced.com/customers/:id" \
  -u {API_KEY}: \
  -X DELETE
customer.delete
<?php

$customer->delete();
customer.delete()
customer.delete();
customer.Delete();
err := invoiced.Customer.Delete({CUSTOMER_ID})

The above command returns 204 No Content

This endpoint deletes a specific customer.

HTTP Request

DELETE /customers/:id

List all customers

curl "https://api.invoiced.com/customers" \
  -u {API_KEY}:
customers, metadata = invoiced.Customer.list(:per_page => 3)
<?php

list($customers, $metadata) = $invoiced->Customer->all(['per_page' => 3]);
customers, metadata = client.Customer.list(per_page=3)
EntityList<Customer> customers = connection.newCustomer().listAll();
var customers = invoiced.NewCustomer().ListAll();
customers, err := client.Customer.ListAll(nil, nil)

The above command returns JSON structured like this:

[
  {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  #<Invoiced::Customer:0x3fdbf95e4d08 id=15444> JSON: {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  Invoiced\Customer JSON: {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  <Customer id=15444 at 0x3fdbf95e4d08> JSON: {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  com.invoiced.entity.Customer@1701d31a JSON: {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  Invoiced.Customer<15444> {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]
[
  <Customer id=15444 at 1701d31a> JSON: {
    "ach_gateway": null,
    "address1": "342 Amber St",
    "address2": null,
    "attention_to": "Sarah Fisher",
    "autopay": false,
    "autopay_delay_days": null,
    "avalara_entity_use_code": null,
    "avalara_exemption_number": null,
    "cc_gateway": null,
    "chase": true,
    "chasing_cadence": null,
    "city": "Hill Valley",
    "country": "US",
    "created_at": 1415222128,
    "credit_hold": false,
    "credit_limit": null,
    "currency": null,
    "email": "billing@acmecorp.com",
    "id": 15444,
    "language": null,
    "metadata": {},
    "name": "Acme",
    "next_chase_step": null,
    "notes": null,
    "number": "CUST-0001",
    "object": "customer",
    "owner": null,
    "parent_customer": null,
    "payment_source": null,
    "payment_terms": "NET 30",
    "phone": "(820) 297-2983",
    "postal_code": "94523",
    "sign_up_page": null,
    "sign_up_url": null,
    "state": "CA",
    "statement_pdf_url": "https://dundermifflin.invoiced.com/statements/t3NmhUomra3g3ueSNnbtUgrr/pdf",
    "tax_id": "893-934835",
    "taxable": true,
    "taxes": [],
    "type": "company",
    "updated_at": 1415222128
  }
]

This endpoint retrieves all customers.

HTTP Request

GET /customers

Query Parameters

Parameter Description
sort string Column to sort by, i.e. name asc
filter object Filter object
metadata object Metadata filter object
payment_source boolean When set only returns customers with (or without) a payment source
open_balance boolean When set only returns customers with (or without) an open balance
updated_after timestamp Only gets records updated after the given timestamp

Invoicing

An invoice represents a balance owed to you by a Customer. Each invoice has a collection of line items that detail the products or services that are now due. An invoice can be in one of many different states depending on the due date, payments, and whether it was sent to or viewed by the customer.

Invoices can be marked as paid with Payments. Once the sum of all payments for an invoice is greater than or equal to the total then the invoice will be considered paid in full.

Invoice Object

Attributes

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Parameter Type Description
id integer The invoice’s unique ID
object string Object type, invoice
customer integer Customer ID
name string Invoice name for internal use, defaults to “Invoice”
number string The reference number assigned to the invoice for use in the dashboard
autopay boolean AutoPay enabled?
currency string 3-letter ISO code
draft boolean When false, the invoice is considered outstanding, or when true, the invoice is a draft
closed boolean When true, an invoice is closed and considered bad debt. No further payments are allowed.
paid boolean Indicates whether an invoice has been paid in full
status string Invoice state, one of draft, not_sent, sent, viewed, past_due, pending, paid, voided
attempt_count integer # of payment attempts
next_payment_attempt timestamp Next scheduled charge attempt, when in automatic collection
subscription integer Subscription ID if invoice came from subscription
date timestamp Invoice date
due_date timestamp Date payment is due by
payment_terms string Payment terms for the invoice, i.e. “NET 30”
purchase_order string The customer’s purchase order number
items array Collection of Line Items
notes string Additional notes displayed on invoice
subtotal number Subtotal
discounts array Collection of Discounts
taxes array Collection of Taxes
total number Total
balance number Balance owed
ship_to object Shipipng Detail object
payment_plan integer Payment plan ID
url string URL to view the invoice in the billing portal
payment_url string URL for the invoice payment page
pdf_url string URL to download the invoice as a PDF
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated
metadata object A hash of key/value pairs that can store additional information about this object.

Line Item Object

Attributes

{
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
#<Invoiced::LineItem:0x3fdbf95e4d08 id=8> JSON: {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
Invoiced\LineItem JSON: {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
<LineItem id=8 at 0x3fdbf95e4d08> JSON: {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
com.invoiced.entity.LineItem@1b13d4f3 JSON: {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
Invoiced.LineItem<8> {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
<LineItem id=8 at 1b13d4f3> JSON: {
  "amount": 10,
  "catalog_item": "delivery",
  "description": null,
  "discountable": true,
  "discounts": [],
  "id": 8,
  "metadata": {},
  "name": "Delivery",
  "object": "line_item",
  "quantity": 1,
  "taxable": true,
  "taxes": [],
  "type": "service",
  "unit_cost": 10,
  "updated_at": 1616081811
}
Parameter Type Description
id integer The line item’s unique ID
object string Object type, line_item
catalog_item string Optional Item ID. Fills the line item with the name and pricing of the Item.
type string Optional line item type. Used to group line items by type in reporting
name string Title
description string Optional description
quantity number Quantity
unit_cost number Unit cost or rate
amount number Computed from quantity x unit_cost
discountable boolean Excludes amount from invoice discounts when false
discounts array Line item Discounts
taxable boolean Excludes amount from invoice taxes when false
taxes array Line item Taxes
plan string Plan ID, only present when type is plan
metadata object A hash of key/value pairs that can store additional information about this object.

Discount Object

Represents the application of a discount to an invoice or line item.

Attributes

{
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
#<Invoiced::Discount:0x3fdbf95e4d08 id=20553> JSON: {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
Invoiced\Discount JSON: {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
<Discount id=20553 at 0x3fdbf95e4d08> JSON: {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
com.invoiced.entity.Discount@2abc1f10 JSON: {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
Invoiced.Discount<20553> {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
<Discount id=20553 at 2abc1f10> JSON: {
  "amount": 5,
  "coupon": null,
  "expires": null,
  "id": 20553,
  "object": "discount"
}
Parameter Type Description
id integer The discount’s unique ID
object string Object type, discount
amount number Discount amount
coupon object Coupon the discount was computed from, if any
expires timestamp Time until discount expires, if any

Tax Object

Represents the application of tax to an invoice or line item.

Attributes

{
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
#<Invoiced::Tax:0x3fdbf95e4d08 id=20554> JSON: {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
Invoiced\Tax JSON: {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
<Tax id=20554 at 0x3fdbf95e4d08> JSON: {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
com.invoiced.entity.Tax@31d5f331 JSON: {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
Invoiced.Tax<20554> {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
<Tax id=20554 at 31d5f331> JSON: {
  "amount": 3.85,
  "id": 20554,
  "object": "tax",
  "tax_rate": null,
  "updated_at": 1616081811
}
Parameter Type Description
id integer The tax’s unique ID
object string Object type, tax
amount number Tax amount
tax_rate object Tax Rate the tax was computed from, if any

Shipping Details Object

Represents the shipipng details of an invoice.

Attributes

{
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
#<Invoiced::ShippingDetail:0x3fdbf95e4d08 id=20554> JSON: {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
Invoiced\ShippingDetail JSON: {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
<ShippingDetail id=20554 at 0x3fdbf95e4d08> JSON: {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
com.invoiced.entity.ShippingDetail@31d5f331 JSON: {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
Invoiced.ShippingDetail<20554> {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
<ShippingDetail id=20554 at 31d5f331> JSON: {
  "address1": "2548  Bottom Lane",
  "address2": null,
  "attention_to": null,
  "city": "Monument Beach",
  "country": "US",
  "name": "Myron Williams",
  "postal_code": "02553",
  "state": "MA",
  "updated_at": 1616081811
}
Parameter Type Description
name string Ship to name
attention_to string Used for ATTN: address line
address1 string First address line
address2 string Optional second address line
city string City
state string State or province
postal_code string Zip or postal code
country string Two-letter ISO code

Create an invoice

curl "https://api.invoiced.com/invoices" \
  -u {API_KEY}: \
  -d customer=15444 \
  -d payment_terms="NET 14" \
  -d items[0][name]="Copy paper, Case" \
  -d items[0][quantity]=1 \
  -d items[0][unit_cost]=45 \
  -d items[1][catalog_item]="delivery" \
  -d items[1][quantity]=1 \
  -d taxes[0][amount]=3.85
invoiced.Invoice.create(
  :customer => 15444,
  :payment_terms => "NET 14",
  :items => [
    {
      :name => "Copy paper, Case",
      :quantity => 1,
      :unit_cost => 45
    },
    {
      :catalog_item => "delivery",
      :quantity => 1
    }
  ],
  :taxes => [
    {
      :amount => 3.85
    }
  ]
)
<?php

$invoice = $invoiced->Invoice->create([
  'customer' => 15444,
  'payment_terms' => "NET 14",
  'items' => [
    [
      'name' => "Copy paper, Case",
      'quantity' => 1,
      'unit_cost' => 45
    ],
    [
      'catalog_item' => "delivery",
      'quantity' => 1
    ]
  ],
  'taxes' => [
    [
      'amount' => 3.85
    ]
  ]
]);
client.Invoice.create(
  customer=15444,
  payment_terms="NET 14",
  items=[
    {
      'name': "Copy paper, Case",
      'quantity': 1,
      'unit_cost': 45
    },
    {
      'catalog_item': "delivery",
      'quantity': 1
    }
  ],
  taxes=[
    {
      'amount': 3.85
    }
  ]
)
Invoice invoice = invoiced.newInvoice();
invoice.customer = 15444L;
invoice.paymentTerms = "NET 14";
LineItem[] items = new LineItem[2];
items[0] = new LineItem();
items[0].name = "Copy paper, Case";
items[0].quantity = 1D;
items[0].unitCost = 45D;
items[1] = new LineItem();
items[1].item = "delivery";
items[1].quantity = 1D;
Tax[] taxes = new Tax[1];
taxes[0] = new Tax();
taxes[0].amount = 3.85D;
invoice.items = items;
invoice.taxes = taxes;
invoice.create();
var invoice = invoiced.NewInvoice();
invoice.Customer = 15444;
invoice.PaymentTerms = "NET 14";
var items = new LineItem[2];
items[0] = new LineItem();
items[0].Name = "Copy paper, Case";
items[0].Quantity = 1;
items[0].UnitCost = 45;
items[1] = new LineItem();
items[1].Item = "delivery";
items[1].Quantity = 1;
var taxes = new Tax[1];
taxes[0] = new Tax();
taxes[0].Amount = 3.85;
invoice.Items = items;
invoice.Taxes = taxes;
invoice.Create();
invoice, err := invoice.Create(&invoiced.InvoiceRequest{
  Customer: invoiced.Int64(15444),
  PaymentTerms: invoiced.String("NET 14"),
  Items: []*invoiced.LineItemRequest{
    {
      Name: invoiced.String("Copy paper, Case"),
      Quantity: invoiced.Float64(1),
      UnitCost: invoiced.Float64(45),
    },
    {
      Item: invoiced.String("delivery"),
      Quantity: invoiced.Float64(1),
    },
  },
  Taxes: []*invoiced.TaxRequest{
    {
      Amount: invoiced.Float64(3.85),
    },
  },
})

The above command returns JSON structured like this:

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}

Create a new invoice with this endpoint.

HTTP Request

POST /invoices

Attributes

Parameter Type Description
customer integer Customer ID - required
name string Invoice name for internal use, defaults to “Invoice”
number string The reference number assigned to the invoice, defaults to next # in auto-numbering sequence
currency string 3-letter ISO code - defaults to account currency
autopay boolean AutoPay enabled? - inherited from customer by default
payment_terms string Payment terms for the invoice, i.e. “NET 30” - inherited from customer by default
purchase_order string The customer’s purchase order number
date timestamp Invoice date - defaults to current timestamp
due_date timestamp Due date - computed from payment_terms when not supplied
draft boolean When false, the invoice is considered outstanding, or when true, the invoice is a draft
closed boolean Marks an invoice as closed
items array Collection of Line Items
notes string Additional notes displayed on invoice
discounts array Collection of Discounts
taxes array Collection of Taxes
ship_to object Shipipng Detail object
metadata object A hash of key/value pairs that can store additional information about this object.
attachments array A list of File IDs to attach to the invoice.
disabled_payment_methods array List of payment methods to disable for this invoice, i.e. ["credit_card", "wire_transfer"].
calculate_taxes bool Disables tax calculation, default is true

Retrieve an invoice

curl "https://api.invoiced.com/invoices/:id" \
  -u {API_KEY}:
invoice = invoiced.Invoice.retrieve("{INVOICE_ID}")
<?php

$invoice = $invoiced->Invoice->retrieve("{INVOICE_ID}");
invoice = client.Invoice.retrieve("{INVOICE_ID}")
Invoice invoice = invoiced.newInvoice().retrieve({INVOICE_ID});
var invoice = invoiced.NewInvoice().Retrieve({INVOICE_ID});
invoice, err := client.Invoice.Retrieve({INVOICE_ID})

The above command returns JSON structured like this:

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}

This endpoint retrieves a specific invoice.

HTTP Request

GET /invoices/:id

If you set the Accept header to application/pdf then the invoice PDF will be returned.

Query Parameters

Parameter Type Description
expand string Properties to expand

Update an invoice

curl "https://api.invoiced.com/invoices/:id" \
  -u {API_KEY}: \
  -X PATCH \
  -d sent=1
invoice.name = "July Paper Delivery"
invoice.notes = "The order was delivered on Jul 20, 2015"
invoice.sent = true
invoice.save
<?php

$invoice->name = "July Paper Delivery";
$invoice->notes = "The order was delivered on Jul 20, 2015";
$invoice->sent = true;
$invoice->save();
invoice.name = "July Paper Delivery"
invoice.notes = "The order was delivered on Jul 20, 2015"
invoice.sent = True
invoice.save()
invoice.name = "July Paper Delivery";
invoice.notes = "The order was delivered on Jul 20, 2015";
invoice.sent = true;
invoice.save();
invoice.Name = "July Paper Delivery";
invoice.Notes = "The order was delivered on Jul 20, 2015";
invoice.Sent = true;
invoice.SaveAll();
invoice, err := invoice.Update({INVOICE_ID}, &invoiced.InvoiceRequest{
  Name: invoiced.String("July Paper Delivery"),
  Notes: invoiced.String("The order was delivered on Jul 20, 2015"),
  Sent: invoiced.Bool(true),
})

The above command returns JSON structured like this:

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}

Use this endpoint to update an invoice.

HTTP Request

PATCH /invoices/:id

Attributes

Parameter Type Description
name string Invoice name for internal use, defaults to “Invoice”
number string The reference number assigned to the invoice, defaults to next # in auto-numbering sequence
currency string 3-letter ISO code - defaults to account currency
date timestamp Invoice date - defaults to current timestamp
due_date timestamp Due date - computed from payment_terms when not supplied
payment_terms string Payment terms for the invoice, i.e. “NET 30” - inherited from customer by default
purchase_order string The customer’s purchase order number
draft boolean When false, the invoice is considered outstanding, or when true, the invoice is a draft
sent boolean Marks an invoice as sent
closed boolean Marks an invoice as closed
items array Collection of Line Items
notes string Additional notes displayed on invoice
discounts array Collection of Discounts
taxes array Collection of Taxes
ship_to object Shipipng Detail object
metadata object A hash of key/value pairs that can store additional information about this object.
attachments array A list of File IDs to attach to the invoice. Replaces existing attachments. Not providing this keeps existing attachments.
disabled_payment_methods array List of payment methods to disable for this invoice, i.e. ["credit_card", "wire_transfer"].
calculate_taxes bool Recalculate taxes, default is false

Send an invoice email

curl "https://api.invoiced.com/invoices/:id/emails" \
  -u {API_KEY}: \
  -X POST
emails = invoice.send
<?php

$emails = $invoice->send();
emails = invoice.send()
EmailRequest emailRequest = new EmailRequest();
EmailRecipient[] emailRecipients = new EmailRecipient[1];
emailRecipients[0] = new EmailRecipient();
emailRecipients[0].name = "Client";
emailRecipients[0].email = "client@example.com";

emailRequest.to = emailRecipients;
emailRequest.subject = "New Invoice from Dunder Mifflin, Inc.: INV-0016";
emailRequest.message = "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!";

Email[] emails = invoice.send(emailRequest);
var emailRequest = new EmailRequest();
var emailRecipients = new EmailRecipient[1];
emailRecipients[0] = new EmailRecipient();
emailRecipients[0].Name = "Client";
emailRecipients[0].Email = "client@example.com";

emailRequest.To = emailRecipients;
emailRequest.Subject = "New Invoice from Dunder Mifflin, Inc.: INV-0016";
emailRequest.Message = "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!";

var emails = invoice.SendEmail(emailRequest);
err := client.Invoice.SendEmail({INVOICE_ID}, &invoiced.SendEmailRequest{
  To: []*invoiced.EmailRecipient{
    Name: invoiced.String("Client"),
    Email: "client@example.com",
  },
  Subject: invoiced.String("New Invoice from Dunder Mifflin, Inc.: INV-0016"),
  Message: invoiced.String("Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!"),
})

The above command returns JSON structured like this:

[
  {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  #<Invoiced::Email:0x3fdbf95e4d08 id=f45382c6fbc44d44aa7f9a55eb2ce731> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  Invoiced\Email JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  <Email id=f45382c6fbc44d44aa7f9a55eb2ce731 at 0x3fdbf95e4d08> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  com.invoiced.entity.Email@2ce1cfd8 JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  Invoiced.Email<f45382c6fbc44d44aa7f9a55eb2ce731> {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]
[
  <Email id=f45382c6fbc44d44aa7f9a55eb2ce731 at 2ce1cfd8> JSON: {
    "created_at": 1436890047,
    "email": "client@example.com",
    "id": "f45382c6fbc44d44aa7f9a55eb2ce731",
    "message": "Dear Client, a new invoice for $51.15 has been created on your account. [View and Pay Invoice button] Thank you!",
    "object": "email",
    "opens": 0,
    "opens_detail": [],
    "reject_reason": null,
    "state": "sent",
    "subject": "New Invoice from Dunder Mifflin, Inc.: INV-0016",
    "template": "new_invoice_email",
    "updated_at": 1436890047
  }
]

This endpoint sends an invoice to your customer.

HTTP Request

POST /invoices/:id/emails

Request Parameters

Parameter Type Description
to array Optional array of recipients like:
[{"name": "Client", "email": "client@example.com"}]
bcc string Optional comma-separated list of email addresses to be blind carbon copied
template string Optional email template ID, otherwise a standard email template is selected
subject string Optional subject to override the template
message string Optional message body to override the template

Send an invoice SMS

curl "https://api.invoiced.com/invoices/:id/text_messages" \
  -u {API_KEY}: \
  -d to[0][phone]="11234567890" \
  -d to[0][name]="Bob Loblaw" \
  -d message="{{company_name}}: You have a new invoice {{invoice_number}} {{url}}" \
  -X POST
text_messages = invoice.send_text(
  :to => [{"phone" => "11234567890", "name" => "Bob Loblaw"}],
  :message => "{{company_name}}: You have a new invoice {{invoice_number}} {{url}}")
<?php

$textMessages = $invoice->sendText([
  'to' => [['phone' => "11234567890", 'name' => "Bob Loblaw"]],
  'message' => "{{company_name}}: You have a new invoice {{invoice_number}} {{url}}"]);
text_messages = invoice.send_text(
  type="open_item",
  to=[{"phone": "11234567890", "name": "Bob Loblaw"}],
  message="{{company_name}}: You have a new invoice {{invoice_number}} {{url}}")
TextRequest textRequest = new TextRequest();
TextRecipient recipient = new TextRecipient();
recipient.name = "Bob Loblaw";
recipient.phone = "11234567890";
textRequest.to = new TextRecipient[]{recipient};
textRequest.message = "{{company_name}}: You have a new invoice {{invoice_number}} {{url}}";
TextMessage[] textMessages = invoice.sendText(textRequest);
var textRequest = new TextRequest();
var recipient = new TextRecipient();
recipient.Name = "Bob Loblaw";
recipient.Phone = "11234567890";
textRequest.To = new TextRecipient[]{recipient};
textRequest.Message = "{{company_name}}: You have a new invoice {{invoice_number}} {{url}}";
var textMessages = invoice.SendText(textRequest);
textRequest.To = textRecipients
textRequest.

texts, err := client.Invoice.SendText({INVOICE_ID}, &invoiced.SendTextMessageRequest{
  To: []*invoiced.TextMessageRecipient{
    Name: invoiced.String("Bob Loblaw"),
    Phone: invoiced.String("11234567890"),
  },
  Message: invoiced.String("{{company_name}}: You have a new invoice {{invoice_number}} {{url}}"),
})

The above command returns JSON structured like this:

[
  {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  #<Invoiced::TextMessage:0x3fdbf95e4d08 id=f96fc863e58300167a252af8eeef158b> JSON: {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  Invoiced\TextMessage JSON: {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
<TextMessage id=f96fc863e58300167a252af8eeef158b at 0x3fdbf95e4d08> JSON: {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
//To pretty print a array of Objects use Arrays.toString(Object[]);

[
  com.invoiced.entity.TextMessage@1bfbb8ee JSON: {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  Invoiced.TextMessage<f96fc863e58300167a252af8eeef158b> {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]
[
  <TextMessage id=f96fc863e58300167a252af8eeef158b at 1bfbb8ee> JSON: {
    "created_at": 1571086718,
    "id": "f96fc863e58300167a252af8eeef158b",
    "message": "Acme Inc.: You have a new invoice https://acme.invoiced.com/invoices/5fTsO6LPXVNNmpuViVy4VQOg",
    "state": "sent",
    "to": "+15125551212",
    "updated_at": 1571086718
  }
]

This endpoint sends an invoice by SMS to a customer using Twilio. Twilio must be connected to Invoiced for requests to succeed.

Text messages can only be sent to customer contacts marked as sms_enabled.

HTTP Request

POST /invoices/:id/text_messages

Request Parameters

Parameter Type Description
message string Full text of message
to array Array of recipients like:
[{"phone": "11234567890", "name": "Bob Loblaw"}]

Send an invoice letter

curl "https://api.invoiced.com/invoices/:id/letters" \
  -u {API_KEY}: \
  -X POST
letters = invoice.send_letter
<?php

$letters = $invoice->sendLetter();
letters = invoice.send_letter()
LetterRequest letterRequest = new LetterRequest();
Letter letters = invoice.sendLetter(letterRequest);
var letterRequest = new LetterRequest();
var letter = invoice.SendLetter(letterRequest);
letter, err := client.Invoice.SendLetter({INVOICE_ID})

The above command returns JSON structured like this:

{
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
#<Invoiced::Letter:0x3fdbf95e4d08 id=995503c4fc2c853b23de3023e84bba72> JSON: {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
Invoiced\Letter JSON: {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
<Letter id=995503c4fc2c853b23de3023e84bba72 at 0x3fdbf95e4d08> JSON: {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
com.invoiced.entity.Letter@2ce1cfd8 JSON: {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
Invoiced.Letter<995503c4fc2c853b23de3023e84bba72> {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}
<Letter id=995503c4fc2c853b23de3023e84bba72 at 2ce1cfd8> JSON: {
  "created_at": 1571070112,
  "expected_delivery_date": 1571674912,
  "id": "995503c4fc2c853b23de3023e84bba72",
  "num_pages": 1,
  "state": "queued",
  "to": "Acme Inc.\n5301 Southwest Pkwy\nAustin, TX 78735",
  "updated_at": 1571070112
}

This endpoint sends an invoice by mail to a customer using Lob. Lob must be connected to Invoiced for requests to succeed.

There are no request parameters; the letter will automatically be sent to the customer’s billing address.

HTTP Request

POST /invoices/:id/letters

Pay an invoice

curl "https://api.invoiced.com/invoices/:id/pay" \
  -u {API_KEY}: \
  -X POST
invoice.pay
<?php

$invoice->pay();
invoice.pay()
invoice.pay();
invoice.Pay();
err := client.Invoice.Pay({INVOICE_ID})

The above command returns JSON structured like this:

{
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46226> JSON: {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
Invoiced\Invoice JSON: {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
<Invoice id=46226 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
Invoiced.Invoice<46226> {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}
<Invoice id=46226 at e48fa2a> JSON: {
  "attempt_count": 1,
  "autopay": true,
  "balance": 228.85,
  "closed": false,
  "created_at": 1415229885,
  "currency": "usd",
  "customer": 15446,
  "date": 1416290402,
  "discounts": [],
  "draft": false,
  "due_date": null,
  "id": 46226,
  "items": [
    {
      "amount": 225,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 9,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 5,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    }
  ],
  "metadata": {},
  "name": null,
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": true,
  "payment_plan": null,
  "payment_terms": "AutoPay",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "paid",
  "subscription": null,
  "subtotal": 225,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 228.85,
  "updated_at": 1415229885,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfDasdfGPBmyd6FwXZ"
}

When an invoice is automatically collected we will perform the charge automatically. If a payment attempts fails then another attempt will be scheduled according to your retry settings. Or, you can trigger a charge attempt manually using this endpoint.

HTTP Request

POST /invoices/:id/pay

List invoice attachments

curl "https://api.invoiced.com/invoices/:id/attachments" \
  -u {API_KEY}:
attachments, metadata = invoice.attachments
<?php

list($attachments, $metadata) = $invoice->attachments();
attachments, metadata = invoice.attachments()
Attachment[] attachments = invoice.listAttachments();
var attachments = invoice.ListAttachments();
files, err := client.Invoice.ListAttachments({INVOICE_ID})

The above command returns JSON structured like this:

[
  {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  #<Invoiced::Attachment:0x3ff10dd39db4 id=13> JSON: {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  Invoiced\Attachment JSON: {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  <Attachment id=13 at 0x3ff10dd39db4> JSON: {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  com.invoiced.entity.Attachment@1759eafd JSON: {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  Invoiced.Attachment<13> {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]
[
  <Attachment id=13 at 1759eafd> JSON: {
    "created_at": 1464625855,
    "file": {
      "created_at": 1464625854,
      "id": 13,
      "name": "logo-invoice.png",
      "object": "file",
      "size": 6936,
      "type": "image/png",
      "updated_at": 1464625854,
      "url": "https://invoiced.com/img/logo-invoice.png"
    },
    "id": 13,
    "object": "attachment",
    "updated_at": 1464625855
  }
]

This endpoint retrieves a list of files attached to a specific invoice.

HTTP Request

GET /invoices/:id/attachments

Create a consolidated invoice

curl "https://api.invoiced.com/customers/:id/consolidate_invoices" \
  -u {API_KEY}: \
customer.consolidate_invoices
<?php

$customer->consolidateInvoices();
customer.consolidate_invoices()
customer.consolidateInvoices();
customer.ConsolidateInvoices();
invoice, err := client.Customer.ConsolidateInvoices({CUSTOMER_ID})

The above command returns JSON structured like this:

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "Consolidated Invoice",
  "next_payment_attempt": null,
  "notes": null,
  "number": "INV-0017",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "not_sent",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}

Consolidate all of a customer’s open invoices to a single invoice with this endpoint.

Requests will fail if there are no invoices to consolidate, or if the customer does not have consolidation enabled.

HTTP Request

POST /customers/:id/consolidate_invoices

Attributes

Parameter Type Description
cutoff_date timestamp Optional cutoff date

Void an invoice

curl "https://api.invoiced.com/invoices/:id/void" \
  -u {API_KEY}: \
invoice.void
<?php

$invoice->void();
invoice.void()
invoice.voidInvoice();
invoice.Void();
invoice, err := client.Invoice.Void({INVOICE_ID})

The above command returns JSON structured like this:

{
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
#<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced\Invoice JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
com.invoiced.entity.Invoice@e48fa2a JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
Invoiced.Invoice<46225> {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}
<Invoice id=46225 at e48fa2a> JSON: {
  "attempt_count": 0,
  "autopay": false,
  "balance": 51.15,
  "closed": false,
  "created_at": 1415229884,
  "currency": "usd",
  "customer": 15444,
  "date": 1416290400,
  "discounts": [],
  "draft": false,
  "due_date": 1417500000,
  "id": 46225,
  "items": [
    {
      "amount": 45,
      "catalog_item": null,
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 7,
      "metadata": {},
      "name": "Copy Paper, Case",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "product",
      "unit_cost": 45
    },
    {
      "amount": 10,
      "catalog_item": "delivery",
      "description": null,
      "discountable": true,
      "discounts": [],
      "id": 8,
      "metadata": {},
      "name": "Delivery",
      "object": "line_item",
      "quantity": 1,
      "taxable": true,
      "taxes": [],
      "type": "service",
      "unit_cost": 10
    }
  ],
  "metadata": {},
  "name": "July Paper Delivery",
  "next_payment_attempt": null,
  "notes": "The order was delivered on Jul 20, 2015",
  "number": "INV-0016",
  "object": "invoice",
  "paid": false,
  "payment_plan": null,
  "payment_terms": "NET 14",
  "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
  "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
  "purchase_order": null,
  "ship_to": null,
  "status": "voided",
  "subscription": null,
  "subtotal": 55,
  "taxes": [
    {
      "amount": 3.85,
      "id": 20554,
      "object": "tax",
      "tax_rate": null
    }
  ],
  "total": 51.15,
  "updated_at": 1415229884,
  "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
}

Use this endpoint to void an invoice.

HTTP Request

POST /invoices/:id/void

Delete an invoice

curl "https://api.invoiced.com/invoices/:id" \
  -u {API_KEY}: \
  -X DELETE
invoice.delete
<?php

$invoice->delete();
invoice.delete()
invoice.delete();
invoice.Delete();
err := client.Invoice.Delete({INVOICE_ID})

The above command returns 204 No Content

This endpoint deletes a specific invoice.

HTTP Request

DELETE /invoices/:id

List all invoices

curl "https://api.invoiced.com/invoices" \
  -u {API_KEY}:
invoices, metadata = invoiced.Invoice.list(:per_page => 3)
<?php

list($invoices, $metadata) = $invoiced->Invoice->all(['per_page' => 3]);
invoices, metadata = client.Invoice.list(per_page=3)
EntityList<Invoice> invoices = conn.newInvoice().listAll();
var invoices = invoiced.NewInvoice().ListAll();
invoices, err := client.Invoice.ListAll(nil, nil)

The above command returns JSON structured like this:

[
  {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  #<Invoiced::Invoice:0x3fdbf95e4d08 id=46225> JSON: {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  Invoiced\Invoice JSON: {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  <Invoice id=46225 at 0x3fdbf95e4d08> JSON: {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  com.invoiced.entity.Invoice@c509a57 JSON: {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  Invoiced.Invoice<46225> {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]
[
  <Invoice id=46225 at c509a57> JSON: {
    "attempt_count": 0,
    "autopay": false,
    "balance": 51.15,
    "closed": false,
    "created_at": 1415229884,
    "currency": "usd",
    "customer": 15444,
    "date": 1416290400,
    "discounts": [],
    "draft": false,
    "due_date": 1417500000,
    "id": 46225,
    "items": [
      {
        "amount": 45,
        "catalog_item": null,
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 7,
        "metadata": {},
        "name": "Copy Paper, Case",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "product",
        "unit_cost": 45
      },
      {
        "amount": 10,
        "catalog_item": "delivery",
        "description": null,
        "discountable": true,
        "discounts": [],
        "id": 8,
        "metadata": {},
        "name": "Delivery",
        "object": "line_item",
        "quantity": 1,
        "taxable": true,
        "taxes": [],
        "type": "service",
        "unit_cost": 10
      }
    ],
    "metadata": {},
    "name": null,
    "next_payment_attempt": null,
    "notes": null,
    "number": "INV-0016",
    "object": "invoice",
    "paid": false,
    "payment_plan": null,
    "payment_terms": "NET 14",
    "payment_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/payment",
    "pdf_url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY/pdf",
    "purchase_order": null,
    "ship_to": null,
    "status": "not_sent",
    "subscription": null,
    "subtotal": 55,
    "taxes": [
      {
        "amount": 3.85,
        "id": 20554,
        "object": "tax",
        "tax_rate": null
      }
    ],
    "total": 51.15,
    "updated_at": 1415229884,
    "url": "https://dundermifflin.invoiced.com/invoices/IZmXbVOPyvfD3GPBmyd6FwXY"
  }
]

This endpoint retrieves all invoices.

HTTP Request

GET /invoices

Query Parameters

Parameter Description
sort string Column to sort by, i.e. name asc
filter object Filter object
metadata object Metadata filter object
start_date timestamp Restricts the results to invoices on or after the given timestamp
end_date timestamp Restricts the results to invoices on or before the given timestamp
updated_after timestamp Only gets records updated after the given timestamp

Payments

Payments are used to represent a customer payment. Payments encompass payments processed through Invoiced, cash receipts (like wire transfers and check), application of credit note and spending credit balances.

It is not required for payments to be associated with a customer or be fully applied, although the goal is to eventually apply the payment in full. The balance on payments represents the amount that is unapplied. Payments can only be associated with a single customer at a time. A payment without an associated customer means that the payment came from a data source where the customer that originated the payment is not yet known.

Payment Object

Attributes

{
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
#<Invoiced::Payment:0x3fdbf95e4d08 id=61> JSON: {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
Invoiced\Payment JSON: {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
<Payment id=61 at 0x3fdbf95e4d08> JSON: {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
com.invoiced.entity.Payment@4ed0a875 JSON: {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
Invoiced.Payment<61> {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
<Payment id=61 at 4ed0a875> JSON: {
  "ach_sender_id": null,
  "amount": 39,
  "balance": 39,
  "charge": null,
  "created_at": 1586880432,
  "currency": "usd",
  "customer": null,
  "date": 1586880431,
  "id": 61,
  "matched": true,
  "method": "other",
  "notes": null,
  "object": "payment",
  "pdf_url": "https://dundermifflin.invoiced.com/payments/59FHO96idoXFeiBDu1y5Zggg/pdf",
  "reference": null,
  "source": "bank_feed",
  "updated_at": 1607152637,
  "voided": false
}
Parameter Type Description
id integer The payment’s unique ID
object string Object type, payment
customer integer Associated Customer, if any
date timestamp Payment date
currency string 3-letter ISO code
amount number Payment amount
balance number Unapplied amount remaining
matched boolean When true there is a CashMatch suggestion
voided boolean Indicates that the payment was voided
method string Payment instrument used
ach_sender_id string ACH PPD ID
reference string Reference number, i.e. check #
source string Source of the payment
notes string Internal notes
charge object Charge object included for processed payments
applied_to array List of Payment Applications
pdf_url string URL where receipt PDF can be downloaded
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated

Payment Application

A payment application describes how a payment is applied. Payments can have multiple applications as long as the applied amounts do not exceed the payment amount.

These types of payment applications are supported:

Parameter Type Description
amount number Amount to apply
type string One of applied_credit, convenience_fee, credit, credit_note, estimate, or invoice
invoice integer Invoice ID, required when type=invoice
estimate integer Estimate ID, required when type=estimate
credit_note integer Credit Note ID, required when type=credit_note
document_type string One of estimate or invoice, used with type=credit_note or type=applied_credit

Payment Methods

These are commonly used payment methods for the method attribute. You should use the payment method ID when dealing with the API.

ID Description
ach ACH
cash Cash
check Check
credit_card Credit Card
eft EFT
direct_debit Direct Debit
other Other
paypal PayPal
wire_transfer Wire Transfer

Charge Object

Attributes

{
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
#<Invoiced::Charge:0x3fdbf95e4d08 id=46374> JSON: {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
Invoiced\Charge JSON: {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
<Charge id=46374 at 0x3fdbf95e4d08> JSON: {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
com.invoiced.entity.Charge@4ed0a875 JSON: {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
Invoiced.Charge<46374> {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
<Charge id=46374 at 4ed0a875> JSON: {
  "amount": 2000,
  "amount_refunded": 0,
  "created_at": 1607152637,
  "currency": "usd",
  "customer": 401558,
  "disputed": false,
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "5d9e31d812151",
  "id": 46374,
  "payment_source": {
    "brand": "Visa",
    "chargeable": true,
    "created_at": 1601919571,
    "exp_month": 8,
    "exp_year": 2025,
    "failure_reason": null,
    "funding": "credit",
    "gateway": null,
    "gateway_customer": null,
    "gateway_id": null,
    "id": 448165,
    "last4": "8550",
    "merchant_account": 2353,
    "object": "card",
    "receipt_email": null,
    "updated_at": 1601919571
  },
  "receipt_email": null,
  "refunded": false,
  "refunds": [],
  "status": "succeeded",
  "updated_at": 1607152637
}
Parameter Type Description
id integer The charge’s unique ID
object string Object type, charge
customer integer Associated Customer
currency string 3-letter ISO code
amount number Charge amount
test string Payment test on which payment was processed
gateway_id string Transaction ID on payment test
status string Transaction status on payment test
receipt_email string Email address where receipt was sent
failure_message string Failure reason if charge fails
payment_source object Payment Source that was used
amount_refunded number Total amount refunded
refunded boolean True if fully refunded
refunds array List of Refunds
disputed boolean True if charge has been disputed
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated

Refund Object

Attributes

{
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
#<Invoiced::Refund:0x3fdbf95e4d08 id=5309> JSON: {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
Invoiced\Refund JSON: {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
<Refund id=5309 at 0x3fdbf95e4d08> JSON: {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
com.invoiced.entity.Refund@4ed0a875 JSON: {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
Invoiced.Refund<5309> {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
<Refund id=5309 at 4ed0a875> JSON: {
  "amount": 400,
  "charge": 46374,
  "created_at": 1606943682,
  "currency": "usd",
  "failure_message": null,
  "gateway": "test",
  "gateway_id": "wx0c2B1he",
  "id": 5309,
  "object": "refund",
  "status": "succeeded",
  "updated_at": 1606943682
}
Parameter Type Description
id integer The refund’s unique ID
object string Object type, refund
currency string 3-letter ISO code
amount number Payment amount
charge integer Original charge ID
test string Payment test on which refund was processed
gateway_id string Transaction ID on payment test
status string Refund status on payment test
failure_message string Failure reason if refund fails
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated

Create a payment

curl "https://api.invoiced.com/payments" \
  -u {API_KEY}: \
  -d amount=800 \
  -d method="check" \
  -d reference="1450" \
  -d applied_to[0][type]="invoice" \
  -d applied_to[0][amount]=800 \
  -d applied_to[0][invoice]=44648
invoiced.Payment.create(
  :amount => 800,
  :method => "check",
  :reference => "1450",
  :applied_to => [{
    :type => "invoice",
    :invoice => 44648,
    :amount => 800
  }]
)
<?php

$invoiced->Payment->create([
  'amount' => 800,
  'method' => "check",
  'reference' => "1450",
  'applied_to' => [[
    'type' => 'invoice',
    'invoice' => 44648,
    'amount' => 800,
  ]]
]);
client.Payment.create(
  amount=800,
  method="check",
  reference="1450",
  applied_to=[{
    'type': 'invoice',
    'invoice': 44648,
    'amount': 800
  }]
)
Payment payment = invoiced.newPayment();
payment.amount = 800D;
payment.method = "check";
payment.reference = "1450";
paymentItem = new PaymentItem();
paymentItem.type = "invoice";
paymentItem.invoice = 44648L;
paymentItem.amount = 800D;
payment.appliedTo = PaymentItem{paymentItem};
payment.create();
var payment = invoiced.NewPayment();
payment.Amount = 800;
payment.Method = "check";
payment.Reference = "1450";
payment.Invoice = 44648;
payment.Create();
payment, err := client.Payment.Create(&invoiced.PaymentRequest{
  Amount: invoiced.Float64(800),
  Method: invoiced.String("check"),
  Reference: invoiced.String("1450"),
  AppliedTo: []*<