Deletes an ad hoc invoice while it is in the draft state.
Important: only invoices with the adhoc role and draft status can be deleted. Any other invoice — issued, or with a different role (e.g. renewal, signup) — cannot be deleted through this endpoint and the request returns a 422 error. Issued invoices should be voided instead. If the invoice does not belong to the provided subscription, a 404 error is returned.
A successful deletion returns a 204 No Content response and the invoice is permanently removed.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
The Chargify id of the subscription.
The unique identifier for the invoice, this does not refer to the public facing invoice number.
application/json
application/json
curl -X DELETE \ --url 'https://subdomain.chargify.com/subscriptions/1/invoices/uid.json' \ -H 'Authorization: Bearer ACCESS_TOKEN'