requestToWithdraw

suspend fun requestToWithdraw(accessToken: String, momoTransaction: MomoTransaction, apiVersion: String, productSubscriptionKey: String, uuid: String): Response<Unit>

Initiates a request-to-withdraw directly via the Collection service.

Return

A retrofit2.Response with an empty body; HTTP 202 indicates the request was accepted.

Parameters

accessToken

The bearer access token used to authenticate the request.

momoTransaction

The transaction payload containing amount, currency, and party details.

apiVersion

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

productSubscriptionKey

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

uuid

A UUID V4 used as the X-Reference-Id to uniquely identify this request.