cURL
curl --request POST \ --url https://api.atlas.co/functions/v1/invoices \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "customer": "<string>", "subscription": "<string>", "collection_method": "charge_automatically", "days_until_due": 123, "description": "<string>", "auto_advance": true, "metadata": {} } '
{ "id": "<string>", "object": "invoice", "number": "<string>", "customer": "<string>", "subscription": "<string>", "status": "draft", "collection_method": "<string>", "currency": "<string>", "amount_due": 123, "amount_paid": 123, "amount_remaining": 123, "subtotal": 123, "tax": 123, "total": 123, "description": "<string>", "due_date": 123, "period_start": 123, "period_end": 123, "lines": { "object": "list", "data": [ { "id": "<string>", "object": "line_item", "amount": 123, "currency": "<string>", "description": "<string>", "price": { "id": "<string>", "product": "<string>" }, "quantity": 123, "period": { "start": 123, "end": 123 } } ] }, "paid": true, "paid_at": 123, "voided_at": 123, "hosted_invoice_url": "<string>", "metadata": {}, "created": 123 }
API key (sk_test_* or sk_live_*)
charge_automatically
send_invoice
Show child attributes
Invoice created
invoice
draft
open
paid
void
uncollectible
past_due