API Docs
Refunds
API ReferenceRefundsUpdate

Update Refund

Update the properties of an existing refund.

POST /refunds/:refund_id

Path Parameters

ParameterTypeDescription
refund_idstringRequired. The ID of the refund to update.

Body Parameters

ParameterTypeRequiredDescription
reasonstringNoUpdated reason for the refund.
metadataobjectNoSet 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"
}