You can cancel a previously created payment if its status is pending
.
Parameters
The ID of a payment object.
Returns
Returns the payment id and status if the cancellation succeeds. Returns an error if the payment is already cancelled or can’t be cancelled.
{
"id": "pt_KhzQL81YnE3B7K6MZb65gCJx",
"status": "cancelled"
}