---
page_source: https://juspay.io/in/docs/part-payments/docs/integration/update-and-refund-api
page_title: Update and Refund API
---


# Refund API




### **Transaction Based Refund API** 



Mention the transaction id (`txn_id`) through which you want the refund and also mention the amount that needs to be refunded. The txn_id is mentioned in order status API response.

**Request** 


#### Shell Code Snippet:

```shell
curl --location 'https://sandbox.juspay.in/refunds' \
--header 'version: 2023-06-30' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-merchantid: your_merchant_id \
--header 'Authorization: Basic OTNBQTlFNzdCMzA0NzkwQUI5NUVxxxxxxxxxxxxx' \
--data-urlencode 'unique_request_id=xyz12346375375t' \
--data-urlencode 'amount=100.00' \
--data-urlencode 'txn_id=picasso-1743060703-1'
```


**Response** 


#### Shell Code Snippet:

```shell
{
    "epg_txn_id": "rfnd_QBkiJ7iS3lXoWD",
    "unique_request_id": "xyz12346375375t",
    "gateway": "RAZORPAY",
    "error_message": "processed",
    "status": "SUCCESS",
    "refund_type": "STANDARD",
    "reference_id": "xyz12346375375t",
    "expected_refund_credit_time": "2025-04-10T09:00:00Z",
    "currency": "INR",
    "created": "2025-03-27T08:41:41Z",
    "refund_arn": null,
    "response_code": "processed",
    "refund_source": "RAZORPAY",
    "amount": 100,
    "initiated_by": "API",
    "order_id": "1743060703",
    "authorization_id": null,
    "sent_to_gateway": true,
    "txn_id": "picasso-1743060703-1"
}

```



## Update Order API



Use the create order API for updating the order (send updated values in the API with same order ID). 

**[Note:]** 

1. Update order is allowed only till transaction initiation is not done. Once the transaction is initiated, only certain keys like due_date and plan_due_date would be allowed to change for non terminal status parts/plans and before the expiry is reached for part/plan.