Gratuity

When a customer checks out, Ordering End-to-End displays a tip selector. This lets the customer choose the amount of gratuity to include with their order.

Ordering End-to-End sends the chosen amount in SubmitOrderRequestMessage as a LineItem of type GRATUITY inside a ProposedOrder.otherItem.

How to hide the tip selector

You can hide the tip selector for a restaurant service by using the ServingConfig.disableTipWidget in your inventory data feeds.

How to set a default gratuity amount

You can set a default gratuity amount or refuse to accept gratuity for a restaurant during checkout. The following use cases can be supported in the CheckoutResponseMessage:

  • A restaurant requires a fixed gratuity amount

    In the ProposedOrder.otherItems within CheckoutResponseMessage, add a line item of type GRATUITY with a fixed amount inside.

    JSON

    {
      "name": "Required Tip",
      "type": "GRATUITY",
      "price": {
        "type": "ESTIMATE",
        "amount": {
          "currencyCode": "USD",
          "units": "3",
          "nanos": 100000000
        }
      },
      "gratuityExtension": {
        "gratuityType": "MANDATORY"
      }
    }
  • A restaurant suggests a gratuity and gives the customer the option to modify the amount

    In the ProposedOrder.otherItems within CheckoutResponseMessage, add a line item of type GRATUITY with a fixed amount. Be sure to also add gratuityExtension with a gratuityType value of USER_MODIFIABLE.

    JSON

    {
      "name": "Suggested Tip",
      "type": "GRATUITY",
      "price": {
        "type": "ESTIMATE",
        "amount": {
          "currencyCode": "USD",
          "units": "3",
          "nanos": 100000000
        }
      },
      "gratuityExtension": {
        "gratuityType": "USER_MODIFIABLE"
      }
    }
  • A restaurant doesn't accept any gratuity

    In the ProposedOrder.otherItems within CheckoutResponseMessage, add a line item of type GRATUITY with a blank amount inside.

    JSON

    {
      "name": "Tip",
      "type": "GRATUITY",
      "price": {
          "type":"ESTIMATE",
          "amount": {
            "currencyCode":"USD"
        }
      }
    }