Refunds
API ReferenceRefundsUpdate
Update Refund
Update the properties of an existing refund.
POST /refunds/:refund_id
Path Parameters
| Parameter | Type | Description |
|---|---|---|
refund_id | string | Required. The ID of the refund to update. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reason | string | No | Updated reason for the refund. |
metadata | object | No | Set of key-value pairs for storing additional information. |
Request Example
curl -X POST 'https://api.v2.paychtec.com/refunds/ref_1234567890abcdef' \ -H "Content-Type: application/json" \ -H "api-key: snd_YOUR_API_KEY" \ -d '{ "reason": "Updated refund reason", "metadata": { "ticket_id": "T-456" }}'Response
{
"refund_id": "ref_1234567890abcdef",
"payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
"amount": 500,
"currency": "USD",
"status": "succeeded",
"reason": "Updated refund reason",
"metadata": {"ticket_id": "T-456"},
"created": "2024-01-22T14:00:00Z",
"modified_at": "2024-01-22T15:30:00Z"
}