# Override Refund styling

**Override UI elements of the refund screens in the InStore POS to match brand, workflow, and localization requirements.**

The `InStore_Refund` core module renders the refund experience inside the InStore POS. See below for information about styling the shell structure and subcomponents that are unique to refunds.

> For general information, see [Core module styling overrides overview](/instore/customization/override-core-module-styling/overview.md).
>
> To override strings, see [Override core strings](/instore/customization/override-core-module-styling/override-core-strings.md).
>
> For all keys that are used in the Refund screens, see [List of core strings](/instore/customization/override-core-module-styling/list-of-core-strings.md).

## Shell structure for Refund screens

```tsx title="Refund shell layout"
<Box>
  <Grid container>
    <Grid item xs={12}>
      <Paper elevation={0}>
        <Box component="h2" className="instore-refund-prompt-title" />
      </Paper>
    </Grid>
    <Grid item xs={12} md={4} lg={4}>
      
    </Grid>
    <Grid item xs={12} md={8} lg={8}>
      <Paper elevation={0}>
        
      </Paper>
    </Grid>
  </Grid>
  <Box>
    <Button className="instore-back-btn" />
    <Button className="instore-next-btn" />
  </Box>
</Box>
```

## Totals panel structure for Refund screens

```tsx title="Totals panel layout"
<Paper elevation={1} className="instore-refund-totals-paper">
  <List>
    <ListItem>
      <Typography className="instore-totals-header" />
    </ListItem>
    <ListItem className="instore-refund-totals-row">
      <Typography className="instore-totals-header" />
      <Typography className="instore-totals-header-amount" />
    </ListItem>
    <Divider className="instore-totals-divider-t1" />
    <ListItem>
      <Typography className="instore-totals-header instore-refund-payments-header" />
    </ListItem>
    <ListItem className="instore-refund-totals-row instore-refund-transaction-item">
      <Typography className="instore-totals-text" />
      <Typography className="instore-totals-amount" />
    </ListItem>
    <ListItem className="instore-refund-totals-row">
      <Typography className="instore-totals-header" />
      <Typography className="instore-totals-header-amount" />
    </ListItem>
  </List>
</Paper>
```

## Plan screen structure for Refund screens

```tsx title="Plan screen layout"
<Grid container>
  <Grid item xs={4}>
    <Typography className="instore-refund-label-header" />
  </Grid>
  <Grid item xs={8}>
    <Typography className="instore-refund-amount-header" />
  </Grid>
  <Grid item xs={12}>
    <Grid container>
      <Grid item xs={6}>
        <Typography className="instore-refund-plan-line-method" />
        <Typography className="instore-refund-plan-cash-note" />
        <Typography className="instore-refund-plan-line-order" />
        <Button className="instore-refund-plan-change-method-btn" />
      </Grid>
      <Grid item xs={3}>
        <Typography className="instore-refund-label-second" />
      </Grid>
      <Grid item xs={3}>
        <Chip className={`instore-refund-plan-status instore-refund-plan-status-${status}`} />
        
      </Grid>
    </Grid>
    <Divider className="instore-refund-plan-divider" />
  </Grid>
</Grid>
```

![Numbered class names that map to the elements of the Refund plan screen.](https://docs.commercetools.com/instore/images/plan-screen-annotated.png)

### Plan screen keys legend

1. `instore-refund-prompt-title`
2. `instore-refund-label-header`
3. `instore-refund-amount-header`
4. `instore-refund-plan-line-method`
5. `instore-refund-plan-line-order`
6. `instore-refund-label-second`
7. `instore-refund-plan-change-method-btn`
8. `instore-refund-plan-status`, `instore-refund-plan-status-pending`
9. `instore-refund-plan-divider`
10. `instore-totals-header` (both labels)
11. `instore-totals-header-amount`
12. `instore-refund-totals-row` (the row)
13. `instore-refund-totals-paper` (the panel)
14. `instore-refund-plan-cash-note`
15. `instore-back-btn`
16. `instore-next-btn`

## Prompt screen structure for Refund screens

```tsx title="Prompt screen layout"
<Grid container>
  <Grid item xs={4}>
    <Typography className="instore-refund-label-header" />
  </Grid>
  <Grid item xs={8}>
    <Typography className="instore-refund-amount-header" />
  </Grid>
  <Grid item xs={12}>
    <Typography className="instore-refund-order-label" />
    <Typography className="instore-refund-prompt-tender" />
  </Grid>
</Grid>
```

![Numbered class names that map to the elements of the Refund prompt screen.](https://docs.commercetools.com/instore/images/prompt-screen-annotated.png)

### Prompt screen keys legend

1. `instore-refund-prompt-title`
2. `instore-refund-label-header`
3. `instore-refund-amount-header`
4. `instore-refund-order-label`
5. `instore-refund-prompt-tender`
6. `instore-totals-header` (both labels)
7. `instore-totals-header-amount`
8. `instore-refund-totals-row` (the row)
9. `instore-refund-totals-paper` (the panel)

## Select refund method dialog structure

```tsx title="Select refund method dialog layout"
<Dialog>
  <DialogContent>
    <Alert severity="error" className="instore-refund-method-failure-banner" />
  </DialogContent>
  <DialogActions>
    <Button className="instore-select-refund-method-cancel-btn" />
    <Button className="instore-select-refund-method-apply-btn" />
  </DialogActions>
</Dialog>
```

![Numbered class names that map to the elements of the select refund method dialog.](https://docs.commercetools.com/instore/images/select-refund-method-dialog-annotated.png)

### Select refund method dialog keys legend

1. `instore-refund-method-failure-banner`
2. `instore-select-refund-method-cancel-btn`
3. `instore-select-refund-method-apply-btn`

## Cash batch screen structure for Refund screens

```tsx title="Cash batch screen layout"
<Grid container className="instore-refund-cash-batch-content">
  <Grid item xs={12}>
    <Typography className="instore-cash-promp-drawer" />
  </Grid>
  <Grid item xs={12}>
    <Button className="instore-refund-cash-insufficient-button" />
  </Grid>
</Grid>
```

![Numbered class names that map to the elements of the Refund cash batch screen.](https://docs.commercetools.com/instore/images/cash-batch-screen-annotated.png)

### Cash batch screen keys legend

1. `instore-cash-promp-drawer` (note the unique spelling in the class name)
2. `instore-refund-cash-insufficient-button`
3. `instore-refund-cash-batch-content`
4. `instore-totals-divider-t1`
5. `instore-refund-payments-header`
6. `instore-totals-text`
7. `instore-totals-amount`
8. `instore-refund-transaction-item` (the row)

## Card screen structure for Refund screens

```tsx title="Card screen layout"
<Grid container className="instore-refund-card-content">
  <Grid item xs={12}>
    <Typography className="instore-refund-card-label" />
    <Typography className="instore-refund-card-amount" />
  </Grid>
  <Grid item xs={12}>
    <LinearProgress className="instore-progress-display-linear" />
    <List className="instore-progress-display-list" />
  </Grid>
</Grid>
```

![Numbered class names that map to the elements of the Refund card screen.](https://docs.commercetools.com/instore/images/card-screen-annotated.png)

### Card screen keys legend

1. `instore-refund-prompt-title`
2. `instore-refund-card-label`
3. `instore-refund-card-amount`
4. `instore-progress-display-linear`
5. `instore-progress-display-list` (the whole stepper)
6. `instore-refund-card-content`
7. `instore-totals-header` (both labels)
8. `instore-totals-header-amount`
9. `instore-refund-totals-row` (the row)
10. `instore-refund-totals-paper` (the panel)

## Custom payment screen structure for Refund screens

```tsx title="Custom payment screen layout"
<Grid container justifyContent="space-around">
  
</Grid>
<Button className="instore-back-btn" />
```

## Refund string keys by screen

For refund screens, InStore takes UI strings from the same tenant translations API as the rest of the InStore core. The request, headers, multi-locale payloads, payment-option variants, and the rules about omitted keys are all described in [Override core strings](/instore/customization/override-core-module-styling/override-core-strings.md).

For all keys that are used in the Refund screens, see [List of core strings](/instore/customization/override-core-module-styling/list-of-core-strings.md).

### Keys by screen

All keys below are in the `Refund` namespace unless the table says otherwise.

#### Every screen

| Key | Element |
| --- | --- |
| `promptMessageOptions` | Prompt on the Plan screen |
| `promptMessageCard` | Prompt on the Prompt and Card screens |
| `promptMessageCash` | Prompt on the Cash batch screen |
| `promptMessageCustom` | Prompt on the Custom payment screen |
| `ReceiptSelection.promptMessage` | Prompt on the Finished screen |
| `Common.buttons.cancel`, `Common.buttons.next`, `Common.buttons.done` | Action bar buttons |
| `Refund.refundComplete` | Toast after each payment is refunded |
| `Refund.refundFailed`, `Refund.refundFailedForOrder` | Message when the refund cannot be completed |

#### Totals panel

| Key | Element |
| --- | --- |
| `originalTransactionListFirstItem` | **Return Transaction** heading |
| `totalListItem` | **Total Items to Refund** label |
| `refundTendersListFirstItem` | **Refund Payments** heading |
| `refundAmountListFirstItem` | **Refund Amount** label |
| `Cash`, `Credit`, `Voucher`, `Wallet`, `GiftCard` | Payment-method name on a completed payment row |

#### Plan screen

| Key | Element |
| --- | --- |
| `refundAmountListFirstItem` | **Refund Amount** label |
| `refundForOrder` | **Refund for Order** prefix on a tender row |
| `refundForUnreceiptedItems` | Label on a tender row with no original order |
| `cashBatchCombinedNote` | Note that cash processes last |
| `cashBatchCombinedNoteWithTotal` | Same note with a `{{amount}}` placeholder |
| `changeMethod` | **Change method** button |
| `tenderStatus.pending`, `tenderStatus.succeeded`, `tenderStatus.failed` | Status chip |
| `Tender.unreceiptedNote` | Unreceipted-return policy note |

#### Prompt screen

| Key | Element |
| --- | --- |
| `refundAmountListFirstItem` | **Refund Amount** label |
| `refundForOrder` | **Refund for Order** prefix |
| `refundForUnreceiptedItems` | Label when there is no original order |
| `Cash`, `Credit`, `Voucher`, `Wallet`, `GiftCard` | Payment-method name in the tender line |
| `Tender.unreceiptedNote` | Unreceipted-return policy note |

#### Select refund method dialog

| Key | Element |
| --- | --- |
| `selectRefundMethodTitle` | Dialog title |
| `originalPayments` | **Refund Payment** label |
| `amountLabel` | **Amount** label |
| `selectAlternativeRefundOption` | Intro line when opened from **Change method** |
| `selectFallbackRefundOption` | Intro line after a payment fails |
| `retryOriginalMethod` | Retry option; takes a `{{method}}` placeholder |
| `retryOriginalMethodDescription` | Caption under the retry option |
| `buttons.applyFallback` | **APPLY FALLBACK** button |
| `Common.buttons.cancel` | **CANCEL** button |
| `UserNotificationError.refundPaymentRejected` | Error banner when the payment was declined |
| `Credit.refundTimeout` and the `GiftCard`, `Wallet`, `POA` equivalents | Error banner when the processor timed out |

#### Cash batch screen

| Key | Element |
| --- | --- |
| `removeAmountCashDrawer` | Drawer prompt; takes a `{{cashTenderAmount}}` placeholder |
| `cashBatchCombinedNoteWithTotal` | Combined-total note when more than one cash tender is batched |
| `buttons.insufficientCash` | **INSUFFICIENT CASH** button |
| `insufficientCashDialogTitle`, `insufficientCashDialogBody` | Confirmation shown after **INSUFFICIENT CASH** |

#### Card screen

The namespace follows the payment processor: `Credit`, `GiftCard`, `Wallet`, or `POA`.

| Key | Element |
| --- | --- |
| `Credit.processingRefund` and the `GiftCard`, `Wallet`, `POA` equivalents | Processing label |
| `Credit.refundTimeout` and the `GiftCard`, `Wallet`, `POA` equivalents | Message shown when the processor times out |
| `Credit.cardProcessorConnected` | First step in the progress list |
| `Credit.refundValidatingCard` | **Validating card details** step |
| `Credit.refundContactingNetwork` | **Contacting payment network** step |
| `Credit.refundFinalizing` | **Finalizing transaction** step |
| `Credit.refundDeclined`, `Credit.refundCancelled` | Step shown when the processor declines or the colleague cancels |
| `UserNotificationError.cancelRefundRejected` | Toast when cancelling the refund fails |

## Related pages

- [Area overview page with navigation](/instore.md)
- [Previous page: Override Payment styling](/instore/customization/override-core-module-styling/payment-styling-overrides.md)
- [Next page: Override core strings](/instore/customization/override-core-module-styling/override-core-strings.md)
- [Search documentation and API specs](/search.md)