POST
/api/apps/{appId}/payments/{paymentId}/refund
200 OK
Refund a captured payment
Returns the money to the customer through the original provider.
| Parameter | In | Required | Description |
|---|---|---|---|
paymentId |
path | Yes | Numeric payment id. |
description |
query | No | Reason recorded against the refund, visible in the Console. |
cURL
curl -X POST "https://api.paymenthood.com/api/apps/YOUR_APP_ID/payments/90210/refund?description=Customer%20returned%20item" \ -H "Authorization: Bearer YOUR_API_KEY"
The payment goes to Refunding and then Refunded once the provider confirms. Do not release goods or credit the customer twice — wait for Refunded.
POST
/api/apps/{appId}/payments/{paymentId}/cancel
200 OK
Cancel a payment
Voids a payment that has not been captured — an abandoned checkout, or an authorisation you have decided not to settle. The payment passes through Cancelling; captured payments must be refunded instead.
cURL
curl -X POST https://api.paymenthood.com/api/apps/YOUR_APP_ID/payments/90210/cancel \ -H "Authorization: Bearer YOUR_API_KEY"
Two related endpoints handle held payments: POST /payments/{paymentId}/unhold releases a payment held by a fraud rule, and POST /payments/{paymentId}/recheck re-queries the provider when you suspect the state is stale.