Terminal

class Terminal

The Terminal is the top-level object for the Stripe Terminal SDK.

Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Get the currently connected Reader if there is one.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The current configuration of the simulated reader. Change this field to see different behavior.

Functions

Link copied to clipboard
Link copied to clipboard

Cancel an existing SetupIntent.

Link copied to clipboard

Clears the current connection token, saved reader sessions, and any other cached credentials. You can use this method to switch accounts in your app, e.g. to switch between live and test Stripe API keys on your backend.

Link copied to clipboard

Clears the reader display and resets it to the splash screen

Link copied to clipboard

Collects data using the hardware interfaces on the reader.

Link copied to clipboard

Display forms and collect information from customers. Available for BBPOS WisePOS E and Stripe S700.

Link copied to clipboard
fun collectPaymentMethod(intent: PaymentIntent, callback: PaymentIntentCallback, config: CollectConfiguration = CollectConfiguration.Builder().build()): Cancelable

Collects a payment method for the given PaymentIntent.

Link copied to clipboard
fun collectRefundPaymentMethod(refundParams: RefundParameters, config: RefundConfiguration = RefundConfiguration.Builder().build(), callback: Callback): Cancelable

Initiates an in-person refund with a given set of RefundParameters by collecting the payment method that is to be refunded.

Link copied to clipboard
fun collectSetupIntentPaymentMethod(intent: SetupIntent, allowRedisplay: AllowRedisplay, config: SetupIntentConfiguration = SetupIntentConfiguration.Builder().build(), callback: SetupIntentCallback): Cancelable

Collects a payment method for a SetupIntent.

Link copied to clipboard
fun confirmPaymentIntent(intent: PaymentIntent, callback: PaymentIntentCallback, config: ConfirmConfiguration = ConfirmConfiguration.Builder().build()): Cancelable

Confirm a payment after collecting a payment method succeeds.

Link copied to clipboard

Confirms an in-person refund after the refund payment method has been collected.

Link copied to clipboard

Confirm that your customer intends to set up the current or provided payment method.

Link copied to clipboard
fun connectReader(reader: Reader, config: ConnectionConfiguration, connectionCallback: ReaderCallback)

Attempts to connect to the given reader, with the connection type dependent on config.

Link copied to clipboard

Creates a new PaymentIntent with the given parameters.

Link copied to clipboard

Create a new SetupIntent with the given parameters.

Link copied to clipboard
fun disconnectReader(callback: Callback)

Attempts to disconnect from the currently connected reader.

Link copied to clipboard
@RequiresPermission(anyOf = ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"])
fun discoverReaders(config: DiscoveryConfiguration, discoveryListener: DiscoveryListener, callback: Callback): Cancelable

Begins discovering readers matching the given DiscoveryConfiguration.

Link copied to clipboard

Retrieves current settings from the connected reader.

Link copied to clipboard

Installs a pending update on the reader. The update that will be installed is whatever is currently stored in Reader.availableUpdate. This field can be set either during Terminal.connectReader, or whenever a new update is detected. If the field changes, you will be notified via MobileReaderListener.onReportAvailableUpdate.

Link copied to clipboard

Returns a list of Location objects.

Link copied to clipboard
fun rebootReader(callback: Callback)

Reboots the currently connected reader.

Link copied to clipboard
fun retrievePaymentIntent(clientSecret: String, callback: PaymentIntentCallback)

Retrieves a PaymentIntent with a client secret.

Link copied to clipboard
fun retrieveSetupIntent(clientSecret: String, callback: SetupIntentCallback)

Retrieves a SetupIntent with a client secret.

Link copied to clipboard

Sets an OfflineListener to the Terminal sdk, through which the application can be notified of the Terminal's transitions between offline and online states. This will replace any previous OfflineListeners that have been registered.

Link copied to clipboard
fun setReaderDisplay(cart: Cart, callback: Callback)

Updates the reader display with transaction information. This method is for display purposes only and has no correlation with what the customer is actually charged. Tax and total are also not automatically calculated and must be set in Cart.

Link copied to clipboard

Changes settings on the connected reader.

Link copied to clipboard

Modifies the visual appearance of the Tap to Pay screen.

Link copied to clipboard

Sets the current implementation of TerminalListener. This will replace any previous TerminalListeners that have been registered.

Link copied to clipboard

Determine whether the mobile device supports a given reader type using a particular discovery configuration.