---
title: "Preview refund totals without saving"
method: POST
path: "/orders/{orderId}/refunds/preview"
tags: ["Admin Sales: Orders"]
---

# Preview refund totals without saving

`POST /orders/{orderId}/refunds/preview`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/orders/{orderId}/refunds/preview`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/orders/:orderId/refunds/preview/post.ts> (a function with typed inputs; its response is checked against the schema)

Preview refund totals without saving

## Path parameters

- `orderId` integer, required

## Request body

- object

## Response `201`

AdminRefund resource created

- AdminRefundRefundTotalsSummary
  - `orderId` integer, nullable
  - `subtotal` number, nullable
  - `formattedSubtotal` string, nullable
  - `discount` number, nullable
  - `formattedDiscount` string, nullable
  - `tax` number, nullable
  - `formattedTax` string, nullable
  - `shipping` number, nullable
  - `formattedShipping` string, nullable
  - `adjustmentRefund` number, nullable
  - `adjustmentFee` number, nullable
  - `grandTotal` number, nullable
  - `formattedGrandTotal` string, nullable

## Other responses

- `400`: Invalid input
- `422`: Validation Error

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
