Create an invoice

POST {{baseUrl}}/v1/invoices

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

Request Body

[{"name"=>"account_tax_ids[0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"account_tax_ids[1]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"application_fee_amount", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"auto_advance", "value"=>"<boolean>", "datatype"=>"string"}, {"name"=>"automatic_tax[enabled]", "value"=>"<boolean>", "datatype"=>"string"}, {"name"=>"collection_method", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"currency", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"custom_fields[0][name]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"custom_fields[0][value]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"custom_fields[1][name]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"custom_fields[1][value]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"customer", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"days_until_due", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"default_payment_method", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"default_source", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"default_tax_rates[0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"default_tax_rates[1]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"description", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"discounts[0][coupon]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"discounts[0][discount]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"discounts[1][coupon]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"discounts[1][discount]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"due_date", "value"=>"<unix-time>", "datatype"=>"string"}, {"name"=>"expand[0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"expand[1]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"footer", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"from_invoice[action]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"from_invoice[invoice]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"on_behalf_of", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[default_mandate]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][acss_debit][mandate_options][transaction_type]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][acss_debit][verification_method]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][bancontact][preferred_language]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][card][installments][enabled]", "value"=>"<boolean>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][card][installments][plan][count]", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][card][installments][plan][interval]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][card][installments][plan][type]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][card][request_three_d_secure]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][customer_balance][bank_transfer][eu_bank_transfer][country]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][customer_balance][bank_transfer][type]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][customer_balance][funding_type]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][us_bank_account][financial_connections][permissions][0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][us_bank_account][financial_connections][permissions][1]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_options][us_bank_account][verification_method]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_types][0]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"payment_settings[payment_method_types][1]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"pending_invoice_items_behavior", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"rendering_options[amount_tax_display]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"statement_descriptor", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"subscription", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"transfer_data[destination]", "value"=>"<string>", "datatype"=>"string"}, {"name"=>"transfer_data[amount]", "value"=>"<integer>", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;id&quot;:&quot;in_1MZkYpDy2QwnkKHJBl2Uldjt&quot;,&quot;object&quot;:&quot;invoice&quot;,&quot;account_country&quot;:&quot;US&quot;,&quot;account_name&quot;:null,&quot;account_tax_ids&quot;:null,&quot;amount_due&quot;:0,&quot;amount_paid&quot;:0,&quot;amount_remaining&quot;:0,&quot;amount_shipping&quot;:0,&quot;application&quot;:null,&quot;application_fee_amount&quot;:null,&quot;attempt_count&quot;:0,&quot;attempted&quot;:false,&quot;auto_advance&quot;:false,&quot;automatic_tax&quot;:{&quot;enabled&quot;:false,&quot;status&quot;:null},&quot;billing_reason&quot;:&quot;manual&quot;,&quot;charge&quot;:null,&quot;collection_method&quot;:&quot;send_invoice&quot;,&quot;created&quot;:1675989235,&quot;currency&quot;:&quot;usd&quot;,&quot;custom_fields&quot;:null,&quot;customer&quot;:&quot;cus_NKPNiNJ3QoejNy&quot;,&quot;customer_address&quot;:null,&quot;customer_email&quot;:&quot;daniel.kimmelmann@postman.com&quot;,&quot;customer_name&quot;:&quot;Big Business&quot;,&quot;customer_phone&quot;:null,&quot;customer_shipping&quot;:null,&quot;customer_tax_exempt&quot;:&quot;none&quot;,&quot;customer_tax_ids&quot;:[],&quot;default_payment_method&quot;:null,&quot;default_source&quot;:null,&quot;default_tax_rates&quot;:[],&quot;description&quot;:null,&quot;discount&quot;:null,&quot;discounts&quot;:[],&quot;due_date&quot;:1676594035,&quot;ending_balance&quot;:null,&quot;footer&quot;:null,&quot;from_invoice&quot;:null,&quot;hosted_invoice_url&quot;:null,&quot;invoice_pdf&quot;:null,&quot;last_finalization_error&quot;:null,&quot;latest_revision&quot;:null,&quot;lines&quot;:{&quot;object&quot;:&quot;list&quot;,&quot;data&quot;:[],&quot;has_more&quot;:false,&quot;total_count&quot;:0,&quot;url&quot;:&quot;/v1/invoices/in_1MZkYpDy2QwnkKHJBl2Uldjt/lines&quot;},&quot;livemode&quot;:false,&quot;metadata&quot;:{},&quot;next_payment_attempt&quot;:null,&quot;number&quot;:null,&quot;on_behalf_of&quot;:null,&quot;paid&quot;:false,&quot;paid_out_of_band&quot;:false,&quot;payment_intent&quot;:null,&quot;payment_settings&quot;:{&quot;default_mandate&quot;:null,&quot;payment_method_options&quot;:null,&quot;payment_method_types&quot;:null},&quot;period_end&quot;:1675989235,&quot;period_start&quot;:1675989235,&quot;post_payment_credit_notes_amount&quot;:0,&quot;pre_payment_credit_notes_amount&quot;:0,&quot;quote&quot;:null,&quot;receipt_number&quot;:null,&quot;rendering_options&quot;:null,&quot;shipping_cost&quot;:null,&quot;shipping_details&quot;:null,&quot;starting_balance&quot;:0,&quot;statement_descriptor&quot;:null,&quot;status&quot;:&quot;draft&quot;,&quot;status_transitions&quot;:{&quot;finalized_at&quot;:null,&quot;marked_uncollectible_at&quot;:null,&quot;paid_at&quot;:null,&quot;voided_at&quot;:null},&quot;subscription&quot;:null,&quot;subtotal&quot;:0,&quot;subtotal_excluding_tax&quot;:0,&quot;tax&quot;:null,&quot;test_clock&quot;:null,&quot;total&quot;:0,&quot;total_discount_amounts&quot;:[],&quot;total_excluding_tax&quot;:0,&quot;total_tax_amounts&quot;:[],&quot;transfer_data&quot;:null,&quot;webhooks_delivered_at&quot;:1675989235}