Terminal

@Singleton()
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

Companion
Link copied to clipboard
object Companion

Functions

cancelPaymentIntent
Link copied to clipboard
fun cancelPaymentIntent(intent: PaymentIntent, callback: PaymentIntentCallback)
Cancels a PaymentIntent.
cancelSetupIntent
Link copied to clipboard
fun cancelSetupIntent(setupIntent: SetupIntent, params: SetupIntentCancellationParameters, callback: SetupIntentCallback)
Cancel an existing SetupIntent.
clearCachedCredentials
Link copied to clipboard
fun clearCachedCredentials()
Clears the current connection token, saved reader sessions, and any other cached credentials.
clearReaderDisplay
Link copied to clipboard
fun clearReaderDisplay(callback: Callback)
Clears the reader display and resets it to the splash screen
collectPaymentMethod
Link copied to clipboard
fun collectPaymentMethod(intent: PaymentIntent, callback: PaymentIntentCallback): Cancelable
Collects a payment method for the given PaymentIntent.
collectRefundPaymentMethod
Link copied to clipboard
fun collectRefundPaymentMethod(refundParams: RefundParameters, callback: Callback): Cancelable
Initiates an in-person refund with a given set of RefundParameters by collecting the payment method that is to be refunded.
collectSetupIntentPaymentMethod
Link copied to clipboard
fun collectSetupIntentPaymentMethod(intent: SetupIntent, customerConsentCollected: Boolean, callback: SetupIntentCallback): Cancelable
Collects a payment method for a SetupIntent.
confirmSetupIntent
Link copied to clipboard
fun confirmSetupIntent(intent: SetupIntent, callback: SetupIntentCallback)
Confirm that your customer intends to set up the current or provided payment method.
connectBluetoothReader
Link copied to clipboard
fun connectBluetoothReader(reader: Reader, config: ConnectionConfiguration.BluetoothConnectionConfiguration, listener: BluetoothReaderListener?, connectionCallback: ReaderCallback)
Attempts to connect to the given bluetooth reader.
connectEmbeddedReader
Link copied to clipboard
fun connectEmbeddedReader(reader: Reader, config: ConnectionConfiguration.EmbeddedConnectionConfiguration, connectionCallback: ReaderCallback)
Attempts to connect to the Reader upon which the Application is currently running.
connectHandoffReader
Link copied to clipboard
fun connectHandoffReader(reader: Reader, config: ConnectionConfiguration.HandoffConnectionConfiguration, listener: HandoffReaderListener?, connectionCallback: ReaderCallback)
Attempts to connect to the given reader in handoff mode.
connectInternetReader
Link copied to clipboard
fun connectInternetReader(reader: Reader, config: ConnectionConfiguration.InternetConnectionConfiguration, connectionCallback: ReaderCallback)
Attempts to connect to the given internet reader.
connectLocalMobileReader
Link copied to clipboard
fun connectLocalMobileReader(reader: Reader, config: ConnectionConfiguration.LocalMobileConnectionConfiguration, connectionCallback: ReaderCallback)
Attempts to connect to the local device's NFC reader.
createPaymentIntent
Link copied to clipboard
fun createPaymentIntent(params: PaymentIntentParameters, callback: PaymentIntentCallback)
Creates a new PaymentIntent with the given parameters.
createSetupIntent
Link copied to clipboard
fun createSetupIntent(params: SetupIntentParameters, callback: SetupIntentCallback)
Create a new SetupIntent with the given parameters.
disconnectReader
Link copied to clipboard
fun disconnectReader(callback: Callback)
Attempts to disconnect from the currently connected reader.
discoverReaders
Link copied to clipboard
fun discoverReaders(config: DiscoveryConfiguration, discoveryListener: DiscoveryListener, callback: Callback): Cancelable
Begins discovering readers matching the given DiscoveryConfiguration.
generateRegistrationCode
Link copied to clipboard
fun generateRegistrationCode(callback: GenerateRegistrationCodeCallback)
Generates a RegistrationCode for the device.
installAvailableUpdate
Link copied to clipboard
fun installAvailableUpdate()
Installs a pending update on the reader.
listLocations
Link copied to clipboard
fun listLocations(parameters: ListLocationsParameters, callback: LocationListCallback)
Returns a list of Location objects.
processPayment
Link copied to clipboard
fun processPayment(intent: PaymentIntent, callback: PaymentIntentCallback)
Processes a payment after collecting a payment method succeeds.
processRefund
Link copied to clipboard
fun processRefund(callback: RefundCallback)
Processes an in-person refund after the refund payment method has been collected.
readReusableCard
Link copied to clipboard
fun readReusableCard(params: ReadReusableCardParameters, callback: PaymentMethodCallback): Cancelable
Reads a card with the given parameters and returns a PaymentMethod.
retrievePaymentIntent
Link copied to clipboard
fun retrievePaymentIntent(clientSecret: String, callback: PaymentIntentCallback)
Retrieves a PaymentIntent with a client secret.
retrieveSetupIntent
Link copied to clipboard
fun retrieveSetupIntent(clientSecret: String, callback: SetupIntentCallback)
Retrieves a SetupIntent with a client secret.
setReaderDisplay
Link copied to clipboard
fun setReaderDisplay(cart: Cart, callback: Callback)
Updates the reader display with transaction information.
setTerminalListener
Link copied to clipboard
fun setTerminalListener(listener: TerminalListener)
Sets the current implementation of TerminalListener.

Properties

connectedReader
Link copied to clipboard
val connectedReader: Reader?
connectionStatus
Link copied to clipboard
val connectionStatus: ConnectionStatus
Get the current ConnectionStatus
paymentStatus
Link copied to clipboard
val paymentStatus: PaymentStatus
Get the current PaymentStatus
simulatorConfiguration
Link copied to clipboard
var simulatorConfiguration: SimulatorConfiguration
The current configuration of the simulated reader.