Skip to content

Refunds: Update

POST/refunds/{refund_id}

Updates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields

Path parameters

  • refund_idstringrequired

    The identifier for refund

Request body RefundUpdateRequest (object)

  • reasonstring, nullable

    An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive

  • metadataobject, nullable

    You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.

Responses

  • 200Refund updated
  • 400Missing Mandatory fields

Request

curl --request POST \
  --url https://sandbox.cardencer.com/refunds/{refund_id} \
  --header 'Content-Type: application/json' \
  --header 'api-key: snd_...' \
  --data '{
    "reason": "Paid by mistake"
  }'

Response

{
  "refund_id": "string",
  "payment_id": "string",
  "amount": 6540,
  "currency": "string",
  "status": "succeeded"
}