INTEGRATION

Getting Started

CHARGES

Clearing

INTEGRATION

Clearing

Auto Clearing

When creating a charge, by default it will be automatically cleared in 60 minutes. In this case, the clearingMode is set to auto. Before the charge is cleared, it is possible to cancel a charge, which means clearing will not occur, and an authorization will be reversed. After a charge is cleared it is no longer possible to cancel a charge, instead a refund can be initiated.

Clear After

When the default clearing delay (60 minutes) does not suit the business requirements, then it is possible to alter the standard clearing delay by setting the clearAfter to an explicit time to fine-tune when the clearing record should be added to the clearing file.

Note that when the clearingMode is set to manual in the charge request body, the clearAfter property cannot be used.

When the clearAfter property is set to a specific UTC timestamp, the clearing will take place as soon as possible after that timestamp passes. If the provided timestamp is in the past, it will be replaced by the present date and time, which means clearing will start immediately.

The clearAfter property can be used in select endpoints.

Manual Clearing

In order to have full control over when the charge should be submitted for clearing, the clearingMode can be set to manual while submitting the charge:

When such a charge is created, the clearing of that charge can be triggered by calling the /charges/{chargeKey}/clear endpoint by referring to the chargeKey. If the manual clearing endpoint is called without a request body, then the full authorized amount will be cleared without delay.

It is also possible to add an optional field clearAfter to the request body of the manual clearing endpoint, which will delay the clearing until after the indicated timestamp (similar to charges created with clearingMode set to auto):

Please note, that if the /charges/{chargeKey}/clear endpoint is never called, the authorization on the charge will not be automatically reversed, but will expire after a number of days, see this table for more information.

Partial Clearing

The manual clearing mode also allows for additional flexibility in clearing a different amount than originally authorized. The authorized amount does not need to be cleared in full, and can be cleared in multiple parts. Please note that this is only intended to be used on pre-authorized charges.

After successful charge creation, a partial clearing request can be created by calling the Manually Clear Charge endpoint and populating the body of the request with the amount to be cleared. Please note the absence of the currency code since this has already been determined in the authorization created in the charge and cannot be altered.

Multiple Partial Clearing Submissions

The charge can also be cleared in multiple stages and the created partial clearing records will all point to the authorization created in the charge. These calls are the same as described above in partial clearing but with closeCharge set to false. This parameter should be set to true for the last partial clearing call which indicates to the issuer that the remaining reserved balance can be voided.