cancelInvoice

@DELETE(value = "/collection/{apiVersion}/invoice/{referenceId}")
abstract suspend fun cancelInvoice(@Path(value = "referenceId") referenceId: String, @Path(value = "apiVersion") apiVersion: String, @Header(value = "Ocp-Apim-Subscription-Key") productSubscriptionKey: String, @Header(value = "X-Target-Environment") environment: String): Response<Unit>

Cancels a pending invoice before it is paid or expires.

Return

A Response with an empty body; HTTP 200 indicates successful cancellation.

Parameters

referenceId

The UUID V4 reference ID used when calling createInvoice.

apiVersion

The API version to target (e.g., v1_0 or v2_0).

productSubscriptionKey

The Ocp-Apim-Subscription-Key for the Collection product.

environment

The target environment (e.g., sandbox or production).