This endpoint cancels a pre-authorized payment and releases the reserved funds back to the customer’s payment method. Use this when you decide not to capture the reserved funds.
A pre-authorized payment can only be cancelled if it has not already been confirmed or cancelled.
curl -X POST 'https://developers.flouci.com/api/v2/cancel_payment' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <PUBLIC_KEY>:<PRIVATE_KEY>' \
-d '{
"payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}'
Body
The ID of the pre-authorized payment to cancel.
{
"result": {
"payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "cancelled",
"cancelled_at": "2025-01-15T10:30:00Z"
},
"status": "success"
}