Credits
Balance in the customer's favour, applicable to future invoices. Applying and removing credits are commands on the invoice itself.
| Command | HTTP | Description |
|---|---|---|
credits list | GET /v1/credits | List credits |
credits create | POST /v1/credits | Add a credit |
credits get | GET /v1/credits/{id} | Get a credit |
credits update | PATCH /v1/credits/{id} | Update a credit |
credits delete | DELETE /v1/credits/{id} | Delete a credit |
Examples
--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.
# List credits
kobana billing credits list \
--fields "id,public_id,external_id,billing_account_id,organization_id"
# Get a credit
kobana billing credits get --params '{"id": "CREDIT_ID"}'
# Add a credit
kobana billing credits create \
--json '{"billing_account_id": "BILLING_ACCOUNT_ID", "type": "promotional", "amount_cents": 10000}'
# Update a credit
kobana billing credits update \
--params '{"id": "CREDIT_ID"}' \
--json '{"external_id": "EXTERNAL_ID", "type": "promotional", "amount_cents": 100}'
# Delete a credit
kobana billing credits delete --params '{"id": "CREDIT_ID"}' --dry-run
Next steps
- Withholdings
- Schema introspection — every parameter this resource accepts.