Skip to content

[Feature] Add support for custom tip rates in the Android SDK #285

Description

@RebelRon

Related Problem

The Android SDK does not currently provide a way to configure custom tip percentage suggestions when using tipOnCardReader().

The iOS SDK supports this through customTipRates, allowing merchants to define their own suggestions, for example 10%, 15%, and 20%.

For a cross platform POS application, this means we cannot provide the same tipping experience on Android and iOS.

Proposed Solution

Add support for configuring custom tip rates in the Android SDK, equivalent to the iOS customTipRates API.

For example, an API along the lines of:

SumUpPayment.builder()
    .total(BigDecimal("100.00"))
    .currency(SumUpPayment.Currency.EUR)
    .customTipRates(listOf(10, 20))
    .tipOnCardReader()
    .build()

The SDK could then display the configured percentages on the card reader, with "No Tip" remaining available as it does on iOS.

Ideally, the Android implementation would follow the same behavior and limitations as the iOS SDK to provide feature parity.

Alternatives Considered

Using tip(BigDecimal) is not a suitable alternative because it requires the application to provide a fixed tip amount rather than allowing the customer to choose a percentage.

Using tipOnCardReader() allows tipping on the reader, but does not appear to provide a way to configure the suggested tip percentages.

Implementing the tip selection ourselves before starting the payment would also not provide the same card reader tipping experience.

Additional Context

The iOS SDK already supports this functionality via:

request.customTipRates = [
    .init(amount: 0.0, title: "0%"),
    .init(amount: 0.1, title: "10%"),
    .init(amount: 0.2, title: "20%")
]

It would be very useful to have the equivalent functionality available in the Android SDK for feature parity across platforms.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions