Appearance
Invoices
DANGER
This document has not been updated since version 0.0.3 and is not ready for production. It will be updated before version 1.0 of the project is released.
todo
The Invoice object
json
// invoice object
{
"id": "inv_1234567890",
"description": "Invoice for Month/Year",
"account_id": "acc_1234567890",
"stripe_customer_id": "cust_1234567890",
"date": 1234567890,
"amount": 12345,
"items": [
{
"id": "ivi_1234567890",
"description": "Monthly user fees (10 @ $15.00).",
"amount": 15000
},
...
]
}
Property | Type | Description |
---|---|---|
id | String | The invoice ID. |
todo | todo | todo |
Invoice items
todo
Create
todo
Read
todo
Update
Invoice items serve as transactional sources of truth, and as such, they cannot be updated or deleted. To nullify an invoice item, you can create an offsetting item to eliminate its value.
js
POST /v1/account/invoice-item
{
"amount": 100,
"description": "Purchase of item.",
...
}
POST /v1/account/invoice-item
{
"amount": -100,
"description": "Refund purchase of item.",
...
}