Invoices
Issue an invoice
Issues an invoice.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
id*string
Request Body
application/json
Issue invoice payload
due_at?string|null
Due date of the invoice.
Format
date-timeauto_apply_credits?boolean|null
Automatically apply credits to the invoice.
integration_id?string|null
Payment integration to use for payment.
allowed_payment_methods?|null
Allowed payment methods to show on the payment page.
Response Body
application/json
curl -X POST "https://api.sandbox.billingrails.com/v1/invoices/inv_IhMUl3rrZ3/issue" \ -H "Content-Type: application/json" \ -d '{ "auto_apply_credits": true }'{
"invoice": {
"object": "invoice",
"id": "inv_IhMUl3rrZ3",
"number": "INV-0001",
"type": "adhoc",
"status": "draft",
"account_id": "acc_IhMUl3rrZ3",
"currency": "USD",
"collection_method": "manual",
"credit_amount": 0,
"outstanding_amount": 1000,
"paid_amount": 0,
"download_url": "https://billingrails.page/acme/i/inv_IhMUl3rrZ3/pdf",
"hosted_url": "https://billingrails.page/acme/i/inv_IhMUl3rrZ3",
"subscription_id": "sub_IhMUl3rrZ3",
"subtotal_amount": 1000,
"total_amount": 1000,
"created_at": "2025-02-14T17:33:40.843Z",
"due_at": "2025-02-14T17:33:40.843Z",
"issued_at": "2025-02-14T17:33:40.843Z",
"billing_start": "2025-02-14T17:33:40.843Z",
"billing_end": "2025-02-14T17:33:40.843Z",
"line_items": [
{
"object": "invoice_line_item",
"id": "invli_IhMUl3rrZ3",
"name": "Basic Plan",
"description": "Basic Plan.",
"quantity": 1,
"unit_amount": 1000,
"subtotal_amount": 1000,
"total_amount": 1000,
"billing_start": "2025-02-14T17:33:40.843Z",
"billing_end": "2025-02-14T17:33:40.843Z"
}
]
}
}