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:

func transaction () {
let signingData = XmBindIdTransactionSigningData(displayData: XmBindIdTransactionSigningDisplayData(
payee: "Acme",
paymentAmount: "$100.00",
paymentMethod: "Acme Card"
))
let request = XmBindIdTransactionSigningRequest(redirectUri: "custom://your-deeplink.com", transactionSigningData: signingData)
request.usePkce = true
XmBindIdSdk.shared.signTransaction(bindIdTransactionRequest: request) { [weak self] (response, error) in
if let e = error {
self?.handleError(error: e)
} else if let requestResponse = response {
self?.exchange(response: requestResponse)
}
}
}

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