Skip to main content

Withholdings

Amounts the customer withheld at source, which can be converted into credit.

CommandHTTPDescription
withholdings listGET /v1/withholdingsList withholdings
withholdings getGET /v1/withholdings/{id}Get a withholding
withholdings convert-to-creditPOST /v1/withholdings/{id}/convert-to-creditConvert a withholding into credit
withholdings convert-to-credits createPOST /v1/withholdings/convert-to-creditsConvert 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​