Withholdings
Amounts the customer withheld at source, which can be converted into credit.
| Command | HTTP | Description |
|---|---|---|
withholdings list | GET /v1/withholdings | List withholdings |
withholdings get | GET /v1/withholdings/{id} | Get a withholding |
withholdings convert-to-credit | POST /v1/withholdings/{id}/convert-to-credit | Convert a withholding into credit |
withholdings convert-to-credits create | POST /v1/withholdings/convert-to-credits | Convert pending withholdings into credits (in bulk) |
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 withholdings
kobana billing withholdings list \
--fields "id,public_id,external_id,organization_id,invoice_id"
# Get a withholding
kobana billing withholdings get --params '{"id": "WITHHOLDING_ID"}'
# Convert pending withholdings into credits (in bulk)
kobana billing withholdings convert-to-credits create \
--json '{"tax_type": "iss", "competence_year": 0, "competence_month": 0}'
# Convert a withholding into credit
kobana billing withholdings convert-to-credit \
--params '{"id": "WITHHOLDING_ID"}' \
--json '{"amount_cents": 100}'
Next steps
- Coupons
- Schema introspection — every parameter this resource accepts.