v1

latestOpenAPI 3.0.02026-07-26168846732.2 KB
Refunds

Refunds - Update

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

post/refunds/{refund_id}

Path parameters

refund_idstring required

The identifier for refund

Request body

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.

Example request

{
  "reason": "Customer returned the product"
}

Response

Refund updated

refund_idstring required

Unique Identifier for the refund

payment_idstring required

The payment id against which refund is initiated

amountinteger required

The refund amount, which should be less than or equal to the total payment amount. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc

currencystring required

The three-letter ISO currency code

status'succeeded' | 'failed' | 'pending' | 'review' required

The status for refunds

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

error_messagestring nullable

The error message

error_codestring nullable

The code for the error

unified_codestring nullable

Error code unified across the connectors is received here if there was an error while calling connector

unified_messagestring nullable

Error message unified across the connectors is received here if there was an error while calling connector

created_atstring date-time nullable

The timestamp at which refund is created

updated_atstring date-time nullable

The timestamp at which refund is updated

connectorstring required

The connector used for the refund and the corresponding payment

profile_idstring nullable

The id of business profile for this refund

merchant_connector_idstring nullable

The merchant_connector_id of the processor through which this payment went through

issuer_error_codestring nullable

Error code received from the issuer in case of failed refunds

issuer_error_messagestring nullable

Error message received from the issuer in case of failed refunds

raw_connector_responsestring nullable

Contains whole connector response

connector_refund_idstring nullable

A unique identifier for a payment provided by the connector

Example response

{
  "amount": 6540,
  "connector": "stripe",
  "split_refunds": {
    "adyen_split_refund": {
      "split_items": [
        {
          "amount": 6540
        }
      ]
    }
  }
}