> For the complete documentation index, see [llms.txt](https://developers.usetoggle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.usetoggle.com/partner-guides/epos-and-ordering/redemptions-and-top-ups.md).

# Redemptions & top-ups

The `createBalanceAdjustment` mutation handles all balance adjustment against an existing card.

A line item represents the balance adjustment action that took place and links it with the transaction responsible for the causing the balance adjustment.

To create a balance adjustment for a card in Toggle, make a mutation request to `createBalanceAdjustment`.

### Redemptions (debit a gift card)

To make a redemption adjustment, you can pass a negative value, e.g. “-100”.

{% tabs %}
{% tab title="API call " %}

```graphql
mutation CreateBalanceAdjustment {
    createBalanceAdjustment(
        currency: "GBP"
        value: -1000
        merchant_id: 26
        unit_epos_reference: "2251799825000010"
        card_reference: "6301190019990640662"
        merchant_transaction_reference: "ABC-DEF-GHI-1234123-123-005"
    ) {
        id
        value
        LineItem {
            Card {
                id
                card_reference
                balance
                inital_balance
                created_at
            }
        }
        ValueSplit {
            tender
            discount
        }
    }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "data": {
    "createBalanceAdjustment": {
      "id": 988008,
      "value": -10,
      "LineItem": {
        "Card": {
          "id": 529113,
          "card_reference": "6301190019990640662",
          "balance": 80,
          "initial_balance": 1000,
          "created_at": "2021-06-05 16:19:52"
        }
      },
      "ValueSplit": {
        "tender": 800,
        "discount": 200
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

### Tender vs Discount

The API response we send back after a redemption will tell you whether to treat it as a discount (money-off, reducing sales tax/VAT) or as tender (treat the same as cash). In some cases, a redemption could be a mixture of discount and tender.&#x20;

```javascript
"ValueSplit": {
   "tender": 800, // £8 tender
   "discount": 200 // £2 discount
 }
```

We request that these values are handled different on payment, so that discount value is a Discount payment type on redemption to aid with VAT reporting. More details can be found [here](https://developers.usetoggle.com/key-concepts/overview/tender-vs-discount)

### Top-ups (credit a gift card)

For a top-up, simply pass a positive value to the `createBalanceAdjustment` mutation. Examples can be found [here](/basics/redeem-a-card.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.usetoggle.com/partner-guides/epos-and-ordering/redemptions-and-top-ups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
