InPersonPayments

Main instance used to interact with the Adyen SDK for performing in-person payments.

This object provides all the necessary methods to perform transactions, and manage the payment lifecycle.

Additional utility methods can be found in InPersonPaymentsTools.

See also

Properties

Link copied to clipboard

Informs about current status of SDK initialization.

Link copied to clipboard

A StateFlow that informs about the current status of the SDK initialization. You can collect this flow to observe changes in the initialization state.

Link copied to clipboard
val version: String

Returns the current version of the In-Person Payments SDK.

Functions

Link copied to clipboard
@JvmStatic
@JvmName(name = "clearSession")
suspend fun clearSession(): Result<Unit>

Clears the current authentication session.

Link copied to clipboard
@JvmStatic
@JvmName(name = "getInstallationId")
suspend fun getInstallationId(): Result<String>

Retrieves the unique identifier for this SDK installation.

Link copied to clipboard
@JvmStatic
@JvmName(name = "getPaymentInterface")
suspend fun getPaymentInterface(paymentInterfaceType: PaymentInterfaceType): Result<PaymentInterface<*>>

Retrieves an instance of a specific payment interface, such as a card reader.

Link copied to clipboard
@JvmStatic
@JvmName(name = "performDiagnosis")
suspend fun performDiagnosis(diagnosisRequest: DiagnosisRequest): Result<DiagnosisResult>

Performs a diagnosis request.

Link copied to clipboard
@JvmStatic
@JvmName(name = "performReversal")
suspend fun performReversal(transactionRequestReversal: TransactionReversalRequest): Result<PaymentResult>

Performs a reversal for a previously completed transaction.

Link copied to clipboard
@JvmStatic
@JvmName(name = "performTransaction")
fun performTransaction(context: Context, paymentLauncher: ActivityResultLauncher<Intent>, paymentInterface: PaymentInterface<*>, transactionRequest: TransactionRequest, merchantUiParameters: MerchantUiParameters = MerchantUiParameters.create())

Initiates a payment transaction.

Link copied to clipboard
@JvmStatic
@JvmName(name = "registerForPaymentResult")
fun registerForPaymentResult(caller: ActivityResultCaller, callback: PaymentCallback): ActivityResultLauncher<Intent>

Registers a callback for the result of a payment transaction using the Android Activity Result API.

Link copied to clipboard
@JvmStatic
@JvmName(name = "setAuthenticationServiceClass")
fun <T : MerchantAuthenticationService> setAuthenticationServiceClass(authServiceClass: Class<T>)

Manually sets the instance of the MerchantAuthenticationService to be used in payment requests.

Link copied to clipboard
@JvmStatic
@JvmName(name = "warmUp")
suspend fun warmUp(): Result<Unit>

Prepares the SDK for a transaction by warming up necessary connections and configurations.