Pre-authorised payments make it possible to block (pre-authorise) funds on the customer's card instead of taking them.
We hold the block created for 4 days. During this time you can either capture or release the payment.
Pre-authorised payments are useful, for example, for payments for goods where it is not certain at the time of purchase whether they will be available.
💡 GoPay tip:
The pre-authorised payments function is available by default in the payment gateway test environment. If you want to activate pre-authorised payments for your merchant outlet in the production environment, please contact GoPay technical support at [email protected].
Creating a pre-authorised payment
A pre-authorised payment is created by a REST API request in which the preauthorization parameter is set to true.
Once the payment has been created, an object describing its state and parameters is returned.
The response also includes the gw_url parameter, which you use to invoke the payment gateway, either in inline or redirect format.
Once the customer has paid the pre-authorised payment, the payment moves to the state AUTHORIZED.
We inform the merchant outlet of the change in the payment state via an automatic HTTP notification to the notification URL you passed when creating the payment.
You will find more information about notifications in the article payment gateway integration procedure.
Capturing a pre-authorised payment
A full capture of a pre-authorised payment is carried out by an API request, which takes the blocked amount from the customer's account and credits the funds to the merchant's GoPay business account.
The payment can be captured in full or only partially, via the partial capture request for a pre-authorised payment.
In the case of a partial capture of the pre-authorised amount, the details of the original payment are updated according to the new call. The remaining amount is automatically unblocked for the customer.
The payment moves to the state PAID. We report the change of state via an HTTP notification.
Please note that in some cases the option of partially capturing a pre-authorised payment may not be available for a given merchant outlet, in view of the technical options of the partner providing card payments. Thank you for your understanding.
Cancelling a pre-authorised payment
If the goods are unavailable or the service cannot be provided to the customer, the pre-authorised payment has to be cancelled via an API request.
The block on the funds in the customer's account is then released and the payment moves to the state CANCELED.
We report the change of state via an HTTP notification.
