InPersonPayments

Main instance used to interact with Adyen SDK in order to perform In Person Payments.

Properties

Link copied to clipboard
val initialised: StateFlow<Boolean>

Informs about current status of SDK initialization.

Link copied to clipboard
val version: String

Returns the version of the SDK.

Functions

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

Clears the current authentication session. Used when you want to force an change in the payment environment.

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

Get the ID of this installation. Used as the POIID of the transaction request.

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

Get the instance of the PaymentInterface you would like to use for the transaction. This method will also do some preliminary validation on the availability of that interface when possible, and return a Result with an Exception in case there is an error.

Link copied to clipboard
@JvmStatic
fun performDiagnosis(context: Context, diagnosisLauncher: ActivityResultLauncher<Intent>, diagnosisRequest: DiagnosisRequest)

Starts a DiagnosisRequest. As opposed to a regular transaction, this starts an Activity but does not contain any UI.

Link copied to clipboard
@JvmStatic
fun performReversal(context: Context, paymentLauncher: ActivityResultLauncher<Intent>, transactionRequestReversal: TransactionRequestReversal)

Performs a reversal transaction. As opposed to a regular transaction, this does not contain any UI.

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

Starts a transaction.

Link copied to clipboard
@JvmStatic
fun registerForDiagnosisResult(caller: ActivityResultCaller, callback: DiagnosisCallback): ActivityResultLauncher<Intent>

Use the Android ActivityResult API to register for the result of a diagnosis request. Needs to be called on the creation of the caller.

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

Use the Android ActivityResult API to register for the result of a transaction. Needs to be called on the creation of the caller.

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

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