cancelInvoice

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

Cancels a pending Collection invoice.

The invoice is identified by externalId (the value used when it was created).

Return

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

Parameters

referenceId

Per MTN: the UUID of the transaction used to get the result — uniquely identifies this invoice cancellation (URL path).

apiVersion

The version of the API to use.

externalId

The externalId sent when the invoice was created; echoed in the request body.

uuid

The X-Reference-Id header. Per MTN: the UUID V4 resource ID of the transaction, used e.g. for validating the status of the request.

productSubscriptionKey

The subscription key for the Collection product.