# Surcharge (deprecating October 2026)

Surcharging has been deprecated and will be retired by October 2026. All surcharging will be set
to zero.

For new integrations (on or after 1 Oct 2026), Tyro recommends setting `enableSurcharge: false` in
all purchase requests. No action is required for existing integrations.

## How it works

Merchants specify a surcharge percentage in the Tyro Merchant Portal (or, for a terminal-only setup,
directly on the terminal under **Menu … Surcharge Rates**), and the terminal automatically applies
it during the transaction. A different rate can be set for each of:

- Visa Credit
- Visa Debit
- MasterCard Credit
- MasterCard Debit
- American Express
- Diners Club


Surcharging applies to all schemes except UnionPay and EPAL (EFTPOS) cards, and is applied
automatically to all applicable standalone and integrated transactions once configured.

Merchants must display adequate signage at the point of sale detailing the surcharges the terminal
will apply — it isn't sufficient to rely solely on the messages shown on the terminal.

## Surcharging without POS support

Surcharging can be enabled by a merchant even if the POS hasn't added any support for it. In that
case, Tyro settles the transaction net of the surcharge and deducts the surcharge amount from the
merchant's invoice at the end of the month — there's no reconciliation error either way. Merchants
can alternatively choose to have the surcharge amount included in their daily settlement, though
the default is to deduct it from the invoice.

## Controlling surcharging from the POS

If your POS wants to control or display surcharging itself, each integration path exposes an
`enableSurcharge`-style flag on the transaction request, described in the tabs below.

For integrations before 1 Oct 2026: if your POS does not have a surcharge feature of its own, don't
implement a toggle for this — set `enableSurcharge` to always `true`. If your POS does have its own surcharge feature, add a toggle
that sets `enableSurcharge` to `true` or `false`. When the toggle is on, Tyro's surcharge must be
applied and the POS-side surcharge must not be; when it's off, the reverse.

## Refunds

Merchants are required to refund the surcharge amount on a refund (pro rata for a partial refund).
Where possible, the POS should store the surcharge-inclusive amount against the original
transaction so this happens automatically — see the tabs below for exactly how each integration
path reports the surcharge amount to use for this.

JS library
Before you begin, check the certification criteria:
[Certification Criteria Document](/assets/certification_criteria_iclient_retail_hospitality.7bf0b2b5462961db882fcba1f1e9ddbec0d942cc7ee96278907994599bebf62a.d564e73d.pdf).

### Making the request

The `enableSurcharge` boolean is passed in the `requestParams` object of `initiatePurchase`. When
set to `true`, the terminal applies the relevant surcharge rate for the card's type and scheme,
and returns the applied amount to the POS in the transaction response.

Please note that if your POS does not have a surcharge feature of its own, you must not implement
a toggle button for the integrated surcharge feature and set the `{ 'enableSurcharge': true | false}` flag to always true. If your POS has a surcharge feature of its own, then there must be a
toggle button to set the `{ 'enableSurcharge': true | false}` flag as true or false. When toggle is
on (`enableSurcharge:true`), the Tyro surcharge must be applied, and the POS side surcharge must
not be applied. When toggle is off (`enableSurcharge:false`), POS surcharge must be applied, and
Tyro surcharge must not be applied.

| Parameter Definition | Purpose | Functions where parameter is used | Usage required |
|  --- | --- | --- | --- |
| `enableSurcharge` — Boolean (true or false) | A boolean flag specifying whether POS will be receiving and handling the surcharge amount applied by the Tyro terminal. | The parameter is present in the requestParams object in the `initiatePurchase` function. | Yes |



```javascript
var amount = '1000';

function doPurchase(amount) {
    iclient.initiatePurchase({
        amount: amount,
        cashout: "0",
        integratedReceipt: true,
        enableSurcharge:true
    }, {
        receiptCallback: receiptCallbackImpl,
        transactionCompleteCallback: transactionCompleteCallbackImpl
    });
}
```

[JS Fiddle demo](https://jsfiddle.net/IntegrationSupport/f1gqjwv5/10/)

Don't click **Save** if you make changes in the JS Fiddle — click **Run** instead. Clicking Save
may break the fiddle's functionality.

### Handling the response

The integrated surcharge feature involves the use of `transactionCompleteCallback`. The
`transactionCallbacks` object provides this callback function, which contains the surcharge amount
applied to the transaction. The specification of the relevant field is given below.

| Function | Description | Usage required |
|  --- | --- | --- |
| `transactionCompleteCallback` | Invoked when the transaction has been completed on the terminal. Called with a surcharge amount string field as part of the transactionData object as shown below table. | Required |


| Field | Type | Description | Usage required |
|  --- | --- | --- | --- |
| `surchargeAmount` | String | The applied surcharge amount for the given transaction. | Required |


#### Steps to follow

- The applied surcharge amount is returned to the POS in the transaction response.
`transactionCompleteCallback` contains the applied surcharge amount in the `surchargeAmount`
field, as shown in the example below.
- The POS must obtain the returned surcharge amount and:
  - Display it clearly on the POS sales receipt, accurately labelled "Surcharge".
  - Store the surcharge-inclusive amount for the transaction on the sales invoice, so that when
refunded, the surcharge amount is automatically added back on without any manual intervention.


##### Callback function


```javascript
var transactionCompleteCallbackImpl = function(response) {
  console.log("Response = " + JSON.stringify(response));

  if (response.customerReceipt) {

    console.log("Customer Receipt = " + JSON.stringify(response.customerReceipt));

    //Compiling the integrated receipt:
    if (transactionType == "purchase" && response.result == "APPROVED") {
      var surcharge = parseFloat(response.surchargeAmount);
      total = ($("#amount").val() / 100) + surcharge;
      totalamount = total;
      console.log(totalamount);
      var posReceipt = formatReceipt("\tTAX INVOICE       \r\n\r\n      Merchant 1655650     \r\n      Address line 1       \r\n      Address line 2       \r\n\r\n\tAWESOME POS   \r\n\t\r\nItems\t\t\t$\r\nCoffee\t\t\t" + "$" + ($("#amount").val() / 100) + "\r\n\t\r\nSub-total\t\t" + "$" + ($("#amount").val() / 100) + "\r\n\r\nSurcharge\t\t" + "$" + surcharge + "\r\n\r\nTotal\t\t\t" + "$" + (total) + "\r\n\r\nGST inc\t\t\t$1.00\r\n\r\nPOS ID: 2\r\nRef: 12345abc\r\n04 Jan 2019 at 02:12 PM\r\n\n\n\t--------------------\n\n" + response.customerReceipt);

      console.log(posReceipt);

      $("#customerReceipt").html(posReceipt);

    } else if (transactionType == "refund" && response.result == "APPROVED") {
      console.log(transactionType);
      var posReceipt = formatReceipt("\tTAX INVOICE       \r\n\r\n      Merchant 1655650     \r\n      Address line 1       \r\n      Address line 2       \r\n\r\n\tAWESOME POS   \r\n\t\r\nREFUND\t\t\t$\r\nAmount\t\t\t" + "$" + ($("#amount").val() / 100) + "\r\n\t\r\nSub-total\t\t" + "$" + ($("#amount").val() / 100) + "\r\n\r\nTotal\t\t\t" + "$" + ($("#amount").val() / 100) + "\r\n\r\nGST inc\t\t\t$1.00\r\n\r\nPOS ID: 2\r\nRef: 12345abc\r\n04 Jan 2019 at 02:12 PM\r\n\n\n\t--------------------\n\n" + response.customerReceipt);


      console.log(posReceipt);

      $("#customerReceipt").html(posReceipt);
    } else {
      console.log(transactionType);
      var posReceipt = formatReceipt("\t AWESOME POS      \r\n\r\n      Merchant 1655650     \r\n      Address line 1       \r\n      Address line 2       \r\n\r\n\tAWESOME POS   \r\n\t\r\nTRANSACTION FAILED\t\t\r\nResult:\t\t\t" + response.result + "\r\n\r\nPOS ID: 2\r\nRef: 12345abc\r\n04 Jan 2019 at 02:12 PM\r\n\n\n\t--------------------\n\n" + response.customerReceipt);

      console.log(posReceipt);

      $("#customerReceipt").html(posReceipt);

    }


  }
  $("#result").html(formatResult(response));
};
```

##### Example response

Given below is an example response for the transaction showing the surcharge applied being
returned in the surcharge-amount field.


```json
{
"result":"APPROVED",
"transactionId":"3783ea1cacae254808490fcf60bbd4eb221e",
"cardType":"MasterCard",
"transactionReference":"602145",
"authorisationCode":"031054",
"issuerActionCode":"00",
"elidedPan":"xxxxxxxxxxxx5100",
"rrn":"602145141255",
"tipAmount":"1000",
"surchargeAmount":"1.00",
"baseAmount":"101.00",
"transactionAmount":"101.00",
"customerReceipt":
	"      CUSTOMER COPY       \n
	\n
	      Merchant 1655650     \n
	      Address line 1       \n
	      Address line 2       \n
	\n
	    Tyro Payments EFTPOS   \n
	\n
	MasterCard\n
	Card:    xxxxxxxxxxxx5100(s)\n
	\n
	Purchase     AUD     $100.00\n
	Surcharge    AUD       $1.00\n
                  ----------\n
	Total        AUD     $101.00\n
	\n
	APPROVED                  00\n
	\n
	Terminal ID: 8\n
	Transaction Ref: 602145\n
	Authorisation No: 031054\n
	04 Jan 2019 at 02:12 PM\n"
}
```

.NET library
The surcharging API lets the POS control, per transaction, whether surcharging is applied — the
terminal must already be configured to surcharge for this to have any effect.

### Enable surcharging

Please note that if your POS does not have a surcharge feature of its own, you must not implement
a toggle button for the integrated surcharging feature, and you should set the `{ 'enableSurcharge': true | false }` flag to always true. If your POS does have a surcharge feature, there must be a
toggle button to set the `{ 'enableSurcharge': true | false }` flag to true or false. When the
toggle is on, Tyro surcharging must be applied, and POS-side surcharging must not be applied. When
the toggle is off, POS-side surcharging must be applied, and Tyro surcharging must not be applied.


```csharp
// Purchase for $100.00 ($0 cash out) with surcharge enabled
PurchaseAdditionalData(10000, 0, "{ 'enableSurcharge': true }")
```

The response includes an extra element:


```xml
<surcharge-amount>3.00</surcharge-amount>
```

### Disable surcharging


```csharp
// Purchase for $100.00 ($0 cash out) with surcharge disabled
PurchaseAdditionalData(10000, 0, "{ 'enableSurcharge': false }")
```


```xml
<surcharge-amount>0.00</surcharge-amount>
```

### If `enableSurcharge` isn't set

If the `enableSurcharge` parameter isn't set at all (as with existing integrations), the response
is unchanged — no extra element is included. As settlement is made net of the surcharge fee, there
are no reconciliation errors between the POS and the merchant's bank account either way.

Merchants are required to refund the surcharge amount on a refund (pro rata for a partial refund).
Where `enableSurcharge` was not set on the original transaction, the merchant will have to
determine the surcharge applied from the EFTPOS receipt.

In-store API
The In-store API does not currently expose a request-time surcharge flag — the `options` object on
a [Create a Pay Request](/api-explorer/pay-in-person/0.9/pay-requests/create-pay-terminal-request)
only supports `integratedReceipt` and `receiptWidth`. Surcharging is applied per the terminal's
configuration and reported back, read-only, in `transactionOutcome.surchargeAmount` once the
transaction completes.

If your integration needs to control surcharging per transaction over the In-store API, use the
[Integration Support Portal](https://tyropayments.atlassian.net/servicedesk/customer/portal/149) —
there's no documented equivalent to the JS/.NET `enableSurcharge` flag today.