Refund Order API

Create a refund for an Order. Refunds can be initiated only for transactions that are CHARGED. The response of refund initiation is similar to that of order status API Response with the addition of refund block.

Refunds Flow

Handles returning money to the customer. Covers both Full and Partial refunds.

  • Step 1: Create a unique request id (e.g., REF_ORD123_TIMESTAMP). This is mandatory for idempotency. It prevents accidental double refunds if the network times out.

  • Step 2: Call the Refund Order API

    • Pass the unique_request_id (Required).

    • For Full Refund: Do not send an amount field (or send the full order value).

    • For Partial Refund: Send the specific amount (e.g., "50.00") to be refunded.

  • Step 3: Parse the Response

    • Check the status field.

    • Scenario A (Success): If status is REFUNDED, the money has been initiated back to the source.

    • Scenario B (Pending): If status is PENDING, the bank is processing it. Rely on the Webhook or Order Status API link iconfor final confirmation.

    • Scenario C (Failure): If status is FAILURE, the refund was declined.

API Endpoints
Sandbox Link
POST
https://api.sandbox.juspay.io/orders/{order_id}/refunds
Production Link
POST
https://api.juspay.io/orders/{order_id}/refunds
Authorization Header
Headers
Body
200 : Success
400 : Invalid Input data
401 : Authentication Failed