Request Transaction Signing

The BindID transaction signing request initiates a flow that requests approval for a transaction and then authenticates the user. You can invoke a transaction signing process using the signTransaction() SDK method (see the API reference). This will redirect if successful; otherwise, it will fail.

Here is an example of invoking the signTransaction() SDK method using a front-end PKCE token exchange flow, where encryption is requested by default:

fun transaction() {
XmBindIdSdk.getInstance().signTransaction(
XmBindIdTransactionSigningRequest.create(
"custom://your-deeplink.com",
XmBindIdTransactionSigningData.create(
XmBindIdTransactionSigningDisplayData.create(
"Acme",
"$100.00",
"Acme Card"
)
)
).apply {
usePkce = true
}
)
.addListener(object : ObservableFuture.Listener < XmBindIdResponse, XmBindIdError > {
override fun onComplete(response: XmBindIdResponse) {
Log.i("BID", "transaction successful")
exchange(response) // call this only if "usePkce" is enabled
}
override fun onReject(error: XmBindIdError) {
handleError(error)
}
})
}

For information about processing the authentication result when using a PKCE flow, see Process Authorization Response.