Handle the onClose method

The onClose method is fired when the user closes the widget.

The onClose method returns the response data based on which step of the payment flow the user stopped.

If the user closes the Bani Pop payment widget before initiating a payment, the response data for 'reference', 'status' and 'type' will be 'null'.

Else if the user closes the Bani Pop payment widget after initiating a payment, the response data for 'reference', 'status' and 'type' will not be null.

The response data will return 'reference', 'status' and 'type'. The 'status' will always be 'payment_processing'.

We recommend always verifying the transaction to confirm the status.

Last updated