Create an invoice

This endpoint generates a draft invoice for a specified customer. An invoice remains in draft status until it is finalized.

  1. You can specify the id of an existing customer in "customer_id" field or you can add a new customer by providing customer's name and email in "customer" object.
  2. You can then provide one/multiple invoice line items having type,
    1. As “line_item” i.e., using the existing price created in Speed. Click here to know more about how to create prices in Speed.
    2. As “custom_line_item” i.e., by providing new price details runtime (i.e. item name and unit amount).
    3. You can also provide line_item and custom_line_item together.
  3. Define your preferred base currency (fiat or SATS/BTC) to create an invoice. A three-lettered ISO-compliant currency name must be used.

Body Params
string

You can provide existing customer_id created in the system. In case, if you're using the customer object you don't need to specify the customer_id.

customer
object

If you're providing the details of a new customer, you have to specify the name and email of the customer. In case, if you're providing the customer_id you don't need to specify the customer object details.

invoice_line_items
array of objects
required

The individual line items that make up the invoice.

invoice_line_items*
string
required

In this parameter, you can specify your customer's preferred base currency (fiat or SATS/BTC). A three-lettered ISO-compliant currency name must be used.

Response

Language
Credentials
Basic
base64
:
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

Questions? Contact us