Create cancellation
It is possible to cancel a specific purchase from the payment ID using the SDK below. For details on request parameters, check the Cancellation API.
<?php
$client = new PaymentClient();
$request_options = new MPRequestOptions();
$request_options->setCustomHeaders(["X-Idempotency-Key: <SOME_UNIQUE_VALUE>"]);
$client->cancel('123456789', $request_options);
?>