Custom Invoice API Example
A complete, runnable script that creates a custom‑invoice integration and uploads a sample CSV file.
When to use the Custom Invoice API
- Third‑party SaaS or marketplace charges that aren’t available from native Pelanor integrations.
- On‑prem or colocation costs you need to view in the same place as cloud spend.
- Ad‑hoc internal chargebacks or any spend tracked only in spreadsheets.
Typical Flow
1
Create an Integration
Call Create Custom Invoice Integration once per billing account or org ID.
2
Prepare a CSV
Build a CSV with the required columns
Add optional columns—such as
usage_date and cost.Add optional columns—such as
service_name, region, or tag:{key}—to improve filtering.3
Upload the CSV
Use Upload Custom Invoice File to push the file.
4
Verify Ingestion
The file is validated server‑side; format errors are returned immediately.
Once accepted, data appears in Pelanor within ~12 hours.
Once accepted, data appears in Pelanor within ~12 hours.