Skip to main content
POST
/
v1
/
invoices
Create an Invoice
curl --request POST \
  --url https://api.leanrails.com/v1/invoices \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customer": "<string>",
  "currency": "<string>",
  "collection_method": "charge_automatically",
  "payment_method_types": [
    "card"
  ]
}
'
{
  "id": "<string>",
  "object": "invoice",
  "status": "draft",
  "currency": "<string>",
  "amount_due": 123,
  "livemode": true,
  "created": 123,
  "customer": "<string>",
  "subscription": "<string>",
  "payment_intent": "<string>",
  "amount_paid": 123,
  "amount_remaining": 123,
  "collection_method": "charge_automatically",
  "payment_method_types": [
    "<string>"
  ],
  "hosted_invoice_url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.fluveo.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use your secret API key as the username with an empty password.

Headers

Idempotency-Key
string
required

Unique key to ensure idempotent requests.

Maximum string length: 255
X-API-Version
string

Override the API version for this request.

Body

application/json
customer
string
required
currency
string
required
collection_method
enum<string>
Available options:
charge_automatically,
send_invoice
payment_method_types
enum<string>[]
Available options:
card

Response

Created

id
string
required
object
enum<string>
required
Available options:
invoice
status
enum<string>
required
Available options:
draft,
open,
paid,
void,
uncollectible
currency
string
required
amount_due
integer
required
livemode
boolean
created
integer
customer
string | null
subscription
string | null
payment_intent
string | null
amount_paid
integer
amount_remaining
integer
collection_method
enum<string>
Available options:
charge_automatically,
send_invoice
payment_method_types
string[]
hosted_invoice_url
string | null