Refunds - Create
Creates a refund against an already processed payment. In case of some processors, you can even opt to refund only a partial amount multiple times until the original charge amount has been refunded
Authorizations
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Body
The payment id against which refund is to be initiated
30
Total amount for which the refund is to be initiated. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc., If not provided, this will default to the full payment amount
x > 100
Merchant connector details used to make payments.
The identifier for the Merchant Account
255
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.
Reason for the refund. Often useful for displaying to users and your customer support executive. In case the payment went through Stripe, this field needs to be passed with one of these enums: duplicate
, fraudulent
, or requested_by_customer
255
Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refunds initiated against the same payment. If this is not passed by the merchant, this field shall be auto generated and provided in the API response. It is recommended to generate uuid(v4) as the refund_id.
30
To indicate whether to refund needs to be instant or scheduled
scheduled
, instant
Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.
Response
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
x > 100
The connector used for the refund and the corresponding payment
The three-letter ISO currency code
The payment id against which refund is initiated
Unique Identifier for the refund
The status for refunds
succeeded
, failed
, pending
, review
The timestamp at which refund is created
The code for the error
The error message
The merchant_connector_id of the processor through which this payment went through
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
The id of business profile for this refund
An arbitrary string attached to the object. Often useful for displaying to users and your customer support executive
Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details.
Error code unified across the connectors is received here if there was an error while calling connector
Error message unified across the connectors is received here if there was an error while calling connector
The timestamp at which refund is updated