Skip to main content
POST
/
payments
/
{payment_id}
Create Refund by Payment ID
curl --request POST \
  --url https://sandbox.flowwise.com/router/payments/{payment_id} \
  --header 'Content-Type: application/json' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '
{
  "refund_id": "refund_summer_fashion_001_size_issue",
  "refund_amount": 1149.75,
  "refund_type": "MERCHANT_INITIATED",
  "refund_note": "Customer requested size exchange - partial refund for size difference"
}
'
{
  "payment_id": "pay_summer_fashion_001_upi",
  "order_id": "order_summer_fashion_001",
  "refund_id": "refund_summer_fashion_001_size_issue",
  "refund_amount": 1149.75,
  "refund_status": "SUCCESS",
  "refund_type": "MERCHANT_INITIATED",
  "refund_note": "Customer requested size exchange - partial refund for size difference",
  "refund_message": "Refund processed successfully. Amount will be credited within 5-7 business days",
  "gateway_details": {
    "refund_reference_id": "RFD434512345678901234",
    "refund_utr": "REF434512345678"
  }
}

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app ID in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Path Parameters

payment_id
string
required

Unique identifier for the payment transaction.

Example:

"pay_summer_fashion_001_upi"

Body

application/json

Request parameters to create a new refund.

refund_id
string
required

Unique identifier for the refund transaction.

Example:

"refund_summer_fashion_001_size_issue"

refund_amount
number
required

Amount to be refunded to the customer.

Example:

1149.75

refund_type
enum<string>
required

Type of refund being processed.

Available options:
MERCHANT_INITIATED,
AUTO_REFUND
Example:

"MERCHANT_INITIATED"

refund_note
string

Additional notes or reason for the refund.

Example:

"Customer requested size exchange - partial refund for size difference"

Response

Success response for refund creation.

payment_id
string

Unique identifier for the original payment transaction.

Example:

"pay_summer_fashion_001_upi"

order_id
string

Unique identifier for the associated order.

Example:

"order_summer_fashion_001"

refund_id
string

Unique identifier for the refund transaction.

Example:

"refund_summer_fashion_001_size_issue"

refund_amount
number

Amount that was refunded to the customer.

Example:

1149.75

refund_status
string

Current status of the refund transaction.

Example:

"SUCCESS"

refund_type
string

Type of refund that was processed.

Example:

"MERCHANT_INITIATED"

refund_note
string

Additional notes or reason for the refund.

Example:

"Customer requested size exchange - partial refund for size difference"

refund_message
string

Message describing the refund status or outcome.

Example:

"Refund processed successfully. Amount will be credited within 5-7 business days"

gateway_details
object

Details from the payment gateway regarding the refund.