To cancel a payment, you must call the API method cancel. A payment can be cancelled if, and only if, its status is open (OP) or pending (PE). Confirmed payments (CO) cannot be cancelled, only refunded.

A successful request will return a JSON expression similar to the one below.