requestToWithdraw

@POST(value = "/collection/{apiVersion}/requesttowithdraw")
abstract suspend fun requestToWithdraw(@Body momoTransaction: MomoTransaction, @Path(value = "apiVersion") apiVersion: String, @Header(value = "Ocp-Apim-Subscription-Key") productSubscriptionKey: String, @Header(value = "X-Target-Environment") environment: String, @Header(value = "X-Reference-Id") uuid: String): Response<Unit>

Initiates a request-to-withdraw, prompting the specified payer to approve a withdrawal.

Return

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

Parameters

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.

environment

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

uuid

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