Cancelling a card

If a card has been created in error, you can reverse the transaction that created it. This may or may not be relevant depending if a card cancellation is a requirement on your particular integration.

You can view how to perform a createReversal on the API playground examples >

What line item ID should I use?

As you'll see, you also need to provide the line item you wish to reverse. To find this, you'll first need to make another query to fetch this for the transaction that you are trying to reverse.

query($page: Int!, $limit: Int!, $merchant_transaction_reference: String!) {
    page: $page
    limit: $limit
    merchant_transaction_reference: $merchant_transaction_reference
  ) {
    data {

This will give you the line item ID for the transaction you are trying to reverse.

What merchant transaction reference should I use?

The merchant_transaction_reference you pass in for the reversal is expected to be a uniquely generated reference (e.g. an identifier of the reversal transaction on the till).

If your system doesn't create transaction references for reversals, then you could potentially just append "-REVERSAL" on the end of the original reference. e.g. "test-123-123-123-REVERSAL"

This use-case is aimed at book-keepers and for troubleshooting, whereby if someone downloaded, say, a CSV list of till transactions (e.g. card sales, redemptions, reversals etc.) and each has a unique till transaction identifier, then if someone pulled down an equivalent CSV list of balance adjustments on the Toggle side, someone could - if needs be - match them up with your unique identifier for each one.

Last updated