curl --request POST \
--url https://api.test.switch.vaultera.co/refunds \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"amount": 654,
"payment_id": "{{payment_id}}",
"refund_type": "instant"
}
'{
"refund_id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "<string>",
"status": "succeeded",
"connector": "stripe",
"reason": "<string>",
"metadata": {},
"error_message": "<string>",
"error_code": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"split_refunds": {
"stripe_split_refund": {
"revert_platform_fee": true,
"revert_transfer": true
}
},
"issuer_error_code": "<string>",
"issuer_error_message": "<string>"
}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
curl --request POST \
--url https://api.test.switch.vaultera.co/refunds \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"amount": 654,
"payment_id": "{{payment_id}}",
"refund_type": "instant"
}
'{
"refund_id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "<string>",
"status": "succeeded",
"connector": "stripe",
"reason": "<string>",
"metadata": {},
"error_message": "<string>",
"error_code": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"split_refunds": {
"stripe_split_refund": {
"revert_platform_fee": true,
"revert_transfer": true
}
},
"issuer_error_code": "<string>",
"issuer_error_message": "<string>"
}Authorizations
Body
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"ref_mbabizu24mvu3mela5njyhpit4"
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 >= 1006540
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"Customer returned the product"
Response
Refund created