cancelInvoice

fun cancelInvoice(apiVersion: String, referenceId: String, externalId: String, uuid: String, productSubscriptionKey: String): ERROR CLASS: Symbol not found for Flow<io/rekast/sdk/repository/data/NetworkResult<kotlin/Unit>>

Cancels a pending Collection invoice before it is paid or expires.

The invoice being cancelled is identified by externalId in the request body.

Return

A Flow emitting a NetworkResult with an empty Unit body on success.

Parameters

apiVersion

The version of the API to use.

referenceId

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

externalId

The externalId sent when the invoice was created, echoed in the cancellation 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.