createPreApproval

suspend fun createPreApproval(preApproval: PreApproval, apiVersion: String, productSubscriptionKey: String, uuid: String): Response<Unit>

Creates a Collection pre-approval, authorising the merchant to charge the payer's wallet without per-transaction prompts until the pre-approval expires.

Return

A Response with an empty body; HTTP 202 indicates the pre-approval was accepted.

Parameters

preApproval

The pre-approval payload containing the payer, currency, and validity.

apiVersion

The version of the API to use.

productSubscriptionKey

The subscription key for the Collection product.

uuid

A UUID V4 used as the X-Reference-Id; poll getPreApprovalStatus with the same ID.