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”.
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
        }
    }
}{
  "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
      }
    }
  }
}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.
"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
Top-ups (credit a gift card)
For a top-up, simply pass a positive value to the createBalanceAdjustment mutation. Examples can be found here.
Last updated
