Skip to content
FFastPay Docs

Invoices

Create an invoice

POST/api/v1/invoices

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.

AuthorizationBearer sk_test_… or sk_live_…

Headers#

  • Idempotency-KeystringRequired

    Client-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#

  • kindstringRequired

    Ignored when changing a draft. One of simple, professional.

  • amount_minorintegerOptional

    A simple invoice's amount. At least 1.

  • customer_emailstringOptional

    Up to 254 characters.

  • customer_first_namestringOptional

    Up to 100 characters.

  • customer_iduuidOptional

    One of the business's customers; else give customer_email.

  • customer_last_namestringOptional

    Up to 100 characters.

  • discount_minorintegerOptional

    At least 0.

  • draftbooleanOptional

    Save without emailing the customer.

  • due_datedateOptional
  • itemsarray of objectOptional
  • notestringOptional

    Up to 1000 characters.

  • redirect_urlstringOptional

    Up to 500 characters.

  • tax_bpsintegerOptional

    From 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.