Create vendor

Use this endpoint to create an invoice

Query Params
int32
required

The unique identifier of the site associated with your account.

Body Params
string
required

The currency code. Must be valid for the account and customer and is.

line_items
array of objects
required

Encapsulates details about a good or service being invoiced, including its description, price, quantity, and optional tax information.

Required if total is not provided.

line_items*
int32

The total amount of the invoice in minor units e.g. cents.

Required if line_items are not provided.

int32

The unique identifier of the customer.

Required if customer_old_provider_id is not provided.

string

The unique identifier which was add to the customer who owns this invoice.

If provided, customer_id can be omitted.

date-time

Represents the start of the line item's billing period. Measured in seconds since the Unix epoch.

If provided, must be a timestamp before or equal to period_end.

date-time

Represents the end of the line item's billing period. Measured in seconds since the Unix epoch. Represents the start of the line item's billing period. Measured in seconds since the Unix epoch.

If provided, must be a timestamp after or equal to period_start.

date-time

Represents the date at which the invoice will be due.

If provided, must be a timestamp after or equal to period_start.

string
enum

The status of the invoice, one of: draft, open, paid, uncollectible, or void

Allowed:
string
enum

Indicates the reason why the invoice was created.

manual: For an invoice unrelated to a subscription or e-commerce order.
subscription_create: For a newly created subscription.
subscription_cycle: For a subscription which advanced into a new period.
subscription_update: For a subscription which was updated.
order_create: For an e-commerce order.

Allowed:
int32

The unique identifier of the subscription to assign to this invoice.

Can be omitted if subscription_old_provider_id is provided.

string

The unique identifier of a previously created subscription for which old_provider_id was specified.

Can be omitted if subscription_id is provided.

customer_address
object

An address object representing the customer's billing address, which will be saved under this invoice. If omitted, the default behavior will be to use the customer's current default billing address.

Can be omitted if billing_address_id is provided.

int32

Specifies the associated billing address for a customer or invoice.

Can be omitted if customer_addressis provided.

customer_shipping
object

An address object representing the customer's shipping address, which will be saved under this invoice.

Can be omitted if shipping_address_id is provided.

int32

Specifies the associated shipping address for a customer or invoice.

Can be omitted if customer_shipping is provided.

boolean
Defaults to false

A flag determining whether this invoice was imported.

metadata
object
string

An attribute that allows for adding custom text at the bottom of invoices

int32

If this field is populated, the revenue recognition calculation will use its value instead of the plan_shipments_per_interval value from the plan. This allows for custom shipment-based recognition logic on a per-subscription basis

string

Specifies the purchase order value of the invoice

Headers
string
required
Defaults to Bearer eyJ***
Responses

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