cancelInvoice

suspend fun cancelInvoice(referenceId: String, apiVersion: String, productSubscriptionKey: String, environment: String): Response<Unit>

Cancels a pending Collection invoice.

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 version of the API to use.

productSubscriptionKey

The subscription key for the Collection product.

environment

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