# Access payment details from a wallet Use the `onAuthorized` event to check the card details the customer provides in a digital wallet. For example, if you want to stop the payment when they select a credit card or a specific card scheme. > **Information** > > Use Flow for mobile SDK version 2.10.0 or later. Follow the [Google Pay for Android](https://www.checkout.com/docs/payments/add-payment-methods/google-pay/android.md) or [Apple Pay for iOS](https://www.checkout.com/docs/payments/add-payment-methods/apple-pay/ios.md) guide before you update your integration with the steps outlined on this page. --- ## Add the onAuthorized event `Client side` Flow for mobile raises the `onAuthorized` event after the customer authorizes the payment in the wallet sheet, but before it submits the payment. The callback receives the card details from the wallet, so you can accept or reject the payment before it's processed. Add the event to the component callbacks you provide in your Flow for mobile configuration. The event applies whether you render the wallet component on its own or within Flow. - To accept the payment, return the accepted result. If you do not provide the callback, Flow for mobile accepts the payment. - To reject the payment, return the rejected result with a message. Flow for mobile does not submit the payment and displays your message to the customer below the wallet's payment button. For example, the following code rejects the payment if the customer selects a credit card stored in the wallet: **Android** ```kotlin val callback = ComponentCallback( onAuthorized = { authorization -> // Reject credit cards if (authorization.cardType == "CREDIT") { CallbackResult.Rejected("Credit cards are not accepted.") } else { // Otherwise, allow the payment to proceed CallbackResult.Accepted } }, ) ``` **iOS** ```swift let callbacks = CheckoutComponents.Callbacks( onAuthorized: { authorization in // Reject credit cards if authorization.cardType == "credit" { return .rejected(message: "Credit cards are not accepted.") } // Otherwise, allow the payment to proceed return .accepted } ) let configuration = CheckoutComponents.Configuration(..., callbacks: callbacks) ``` The callback is synchronous, so base your decision on the card details the wallet provides and avoid network requests. For the properties available on each platform, see the ComponentCallback reference for [Android](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/flow-for-mobile-library-reference/android/componentcallback.md#onAuthorized(WalletAuthorization)_:_CallbackResult) and [iOS](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/flow-for-mobile-library-reference/ios/componentcallback.md#onAuthorized(WalletAuthorization)_:_CallbackResult). --- ## Handle the payment response `Client side` If you accept the payment, Flow for mobile submits it and you receive the outcome through your existing `onSuccess` and `onError` callbacks, the same as any other wallet payment. If you reject the payment, `onError` is not called. On iOS, `onError` is called with `paymentCancelled` if the customer then closes the Apple Pay sheet. If you accept the payment and provide a `handleSubmit` callback, Flow for mobile passes `SessionData` to it instead of submitting the payment itself. Send that data to your server and call the [Submit a payment session](https://api-reference.checkout.com/tag/Flow/#operation/SubmitPaymentSession) endpoint with the session token in `session_data`. Provide the endpoint's unmodified response body to Flow for mobile through the callback's result so it can handle any additional required actions. You can [obtain the payment response](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-mobile-app/get-started-with-flow-for-mobile.md) for both asynchronous and synchronous payments.