Invoices
Create an invoice
A simple invoice takes an amount; a professional one is priced from its items, tax and discount. Unless it is a draft it is emailed to the customer at once; a test invoice is only emailed to the business's own people.
Bearer sk_test_… or sk_live_…Headers#
Idempotency-KeystringRequiredClient-generated key that makes the request safe to retry. Replaying the key with an identical payload returns the original response; replaying it with a different payload is rejected. Up to 255 characters.
Body parameters#
kindstringRequiredIgnored when changing a draft. One of
simple,professional.amount_minorintegerOptionalA simple invoice's amount. At least 1.
customer_emailstringOptionalUp to 254 characters.
customer_first_namestringOptionalUp to 100 characters.
customer_iduuidOptionalOne of the business's customers; else give customer_email.
customer_last_namestringOptionalUp to 100 characters.
discount_minorintegerOptionalAt least 0.
draftbooleanOptionalSave without emailing the customer.
due_datedateOptionalitemsarray of objectOptionalnotestringOptionalUp to 1000 characters.
redirect_urlstringOptionalUp to 500 characters.
tax_bpsintegerOptionalFrom 0 to 10000.
Responses#
- 201Created
- 401The secret key is missing, invalid or revoked.
- 403The key is not allowed to do this, or the request came from an address that is not on its allowlist.
- 404Nothing was found for this business and mode.
- 422A field is missing or not valid.