alt

Important information

Updates to Visa secure data field mandate: Read more about the mandatory changes.

Unzer

Manage Unzer Direct Debit payment

Manage Unzer Direct Debit payments.

After the successful charge transaction, you can perform additional operations on the payment resource. Some of the important ones are described in the following section.

For a full reference of managing payments, go to relevant server-side integration documentation page: Manage API resources (direct API calls), Manage API resources (PHP SDK), or Manage API resources (Java SDK).

icon
You must use basket v2 for Unzer Invoice payment method.

Cancel after payment (refund)

You can refund up to the amount of the received payment. To do this, you have to make a cancel transaction for an existing charge transaction.

POST https://api.unzer.com/v1/payments/s-pay-xxxx/charges/s-chg-1/cancels
{
  "amount" : "12.450",
  "paymentReference": "Test cancel transaction"
}
$unzer = new Unzer('s-priv-xxxxxxxxxx');
$charge = $unzer->fetchChargeById('s-pay-xxxx', 's-chg-1');
$cancel = $charge->cancel();
Unzer unzer = new Unzer(new HttpClientBasedRestCommunication(), "s-priv-xxxxxxxxxx");
Charge charge = unzer.fetchChargeById("s-pay-xxxx", "s-chg-1");
Cancel cancel = charge.cancel();