{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition","br","details","required"]},"type":"markdown"},"seo":{"title":"Configuration","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"configuration","__idx":0},"children":["Configuration"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn how to configure the Aeropay button component for Android."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"basic-usage","__idx":1},"children":["Basic usage"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"minimal-configuration","__idx":2},"children":["Minimal configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At minimum, the Aeropay button requires an Aeropay-enabled session and valid transaction data on SDK initialisation. You can then create the component with its default presentation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," and return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," when the transaction can proceed so shoppers can complete payment. If you omit the callback, submission doesn't proceed and the popup stays open."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.aeropaybutton.types.AeropayButtonComponentConfig\nimport com.pxp.checkout.types.ComponentType\n\nval config = AeropayButtonComponentConfig().apply {\n    onPreAuthorisation = { true }\n    onPostAuthorisation = { result ->\n        verifyPaymentOnBackend(result)\n    }\n    onError = { error ->\n        // Handle flow errors using error.errorCode and error.message\n    }\n}\n\nval aeropayButton = checkout.createComponent(\n    ComponentType.AERO_PAY_BUTTON,\n    config,\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Always verify the transaction on your backend before fulfilling an order or confirming a payout. Client callbacks can be manipulated by malicious users."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"related-sdk-configuration","__idx":3},"children":["Related SDK configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the session and transaction before creating the Aeropay button:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.models.Environment\nimport com.pxp.checkout.models.EntryType\nimport com.pxp.checkout.models.PxpSdkConfig\nimport com.pxp.checkout.models.TransactionData\nimport com.pxp.checkout.models.TransactionIntentData\nimport com.pxp.checkout.models.AeropayIntentType\nimport com.pxp.checkout.services.models.transaction.Shopper\nimport java.time.Instant\n\nval sdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = sessionConfig,\n    transactionData = TransactionData(\n        amount = 25.00,\n        currency = \"USD\",\n        entryType = EntryType.Ecom,\n        intent = TransactionIntentData(aeropay = AeropayIntentType.Authorisation),\n        merchant = \"your-merchant-id\",\n        merchantTransactionId = java.util.UUID.randomUUID().toString(),\n        merchantTransactionDate = { Instant.now().toString() },\n    ),\n    clientId = \"your-client-id\",\n    ownerType = \"MerchantGroup\",\n    ownerId = \"MERCHANT_GROUP_1\",\n    onGetShopper = {\n        Shopper(\n            id = \"shopper-123\",\n            firstName = \"John\",\n            lastName = \"Doe\",\n            email = \"john.doe@example.com\",\n            phoneNumber = \"+14155550123\",\n        )\n    },\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following SDK options affect the Aeropay component:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["SessionConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session data from your backend. It must include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.payByBanks.aeropay"]}," with non-blank ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalMerchantId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationId"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your merchant group identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.currency"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction currency. Aeropay supports ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USD"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.entryType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["EntryType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction entry type. Set this to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EntryType.Ecom"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.intent.aeropay"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["AeropayIntentType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aeropay transaction intent. Possible values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EstimatedAuthorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> Shopper?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional. When set, supplies shopper details to prefill the consumer data screen (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]},"). Required for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"component-properties","__idx":4},"children":["Component properties"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use these properties when configuring ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AeropayButtonComponentConfig"]},":"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A verified Aeropay user ID. The SDK validates that the user is active, then skips consumer data collection and OTP verification."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", skips the consumer data screen if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," supplies all four required fields and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["editableFields"]}," is omitted, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", or empty. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom text for the payment button when the intent isn't ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]},". If omitted, the SDK uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig.localisation?.aeropay?.payByBankButton?.label"]},", or the default (en-US: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Pay by bank"]},"). For ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]}," is ignored. Override payout text with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig.localisation?.aeropay?.payByBankButton?.labelPayout"]}," (en-US default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Withdraw by Bank"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the payment button starts disabled. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},". After creation, call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setDisabled()"]}," to change the button state."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["styles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the payment button. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#button-styles"},"children":["Button styles"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["popupConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["AeropayPopupConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the popup container, shared action buttons, and intro cards."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["consumerDataCollectionConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ConsumerDataCollectionConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Field behaviour and styling for the consumer data screen."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["otpVerificationConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["OtpVerificationConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styling for the OTP verification screen."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bankSelectionConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["BankSelectionConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Behaviour and styling for bank selection and the Aerosync experience."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To override pay or payout button text through localisation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"localisation = LocalisationConfig(\n    aeropay = AeropayLocalisation(\n        payByBankButton = AeropayPayByBankButtonLocalisation(\n            label = \"Pay with my bank\",\n            labelPayout = \"Withdraw to bank\",\n        ),\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"shopper-flow-configuration","__idx":5},"children":["Shopper flow configuration"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"new-shoppers","__idx":6},"children":["New shoppers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Don't set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}," when the shopper doesn't have a verified Aeropay account. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," is optional on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]},". When omitted, the consumer data screen opens with empty fields. When set, the SDK can prefill ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]},". Prefill and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]}," depend on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," returning those four values."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    onUserVerificationSuccess = { user ->\n        saveAeropayUserId(user.id)\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Store ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user.id"]}," securely after verification so you can identify the shopper on future visits."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"skip-consumer-data-collection","__idx":7},"children":["Skip consumer data collection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to start the new-shopper flow at OTP verification:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val sdkConfig = PxpSdkConfig(\n    // ...session and transaction configuration\n    onGetShopper = {\n        Shopper(\n            firstName = \"John\",\n            lastName = \"Doe\",\n            email = \"john.doe@example.com\",\n            phoneNumber = \"+14155550123\",\n        )\n    },\n)\n\nval config = AeropayButtonComponentConfig().apply {\n    skipConsumerDataCollection = true\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The component skips the consumer data screen only when all of these conditions are met:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," returns valid, non-empty ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["firstName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lastName"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]}," values."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["consumerDataCollectionConfig.editableFields"]}," is omitted, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", or empty."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a value is missing or empty, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["editableFields"]}," contains a field, the component shows the consumer data screen. If a supplied non-empty value is invalid, the SDK calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1300"]}," and doesn't open the popup."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returning-shoppers","__idx":8},"children":["Returning shoppers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass a verified Aeropay user ID to skip data collection and OTP verification:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    userId = \"c7582e95-d9a1-42c3-b0e3-ee6bc98764ec\"\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the user isn't active, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," receives ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1307"]},". If the get-user API returns a recognised failure (including user not found), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," receives ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1308"]},". Network or transport errors on the same call use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0500"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0000"]},". The popup doesn't open in these cases. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/aeropay/data-validation#returning-shopper-validation"},"children":["Returning-shopper validation"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"popup-configuration","__idx":9},"children":["Popup configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["popupConfig"]}," to customise the popup container, shared action buttons, and intro cards:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.popupConfig = AeropayPopupConfig(\n    styles = AeropayViewStyleConfig(\n        fontFamily = \"Source Code Pro\",\n        foregroundColor = Color.Black,\n        backgroundColor = Color.White,\n        cornerRadius = 20.dp,\n        padding = PaddingValues(16.dp),\n    ),\n    actionButtonStyles = ButtonStateStyles(\n        base = FieldStyle(\n            backgroundColor = Color(0xFF2F3BFF),\n            color = Color.White,\n        ),\n    ),\n    introStyles = ScreenIntroStyleConfig(\n        backgroundColor = Color(0xFFDBEDFA),\n        cornerRadius = 12.dp,\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the popup with these properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["styles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["AeropayViewStyleConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Popup container styles for font, colours, border, corner radius, and padding."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["actionButtonStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shared styles for action buttons on popup screens. Screen-level button styles override these values."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["introStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ScreenIntroStyleConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the intro card on the consumer data and OTP screens."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"consumer-data-configuration","__idx":10},"children":["Consumer data configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["consumerDataCollectionConfig"]}," to control which prefilled fields remain editable and to customise the form:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.consumerDataCollectionConfig = ConsumerDataCollectionConfig(\n    editableFields = listOf(\n        ConsumerDataField.EMAIL,\n        ConsumerDataField.PHONE_NUMBER,\n    ),\n    fieldConfig = ConsumerDataFieldConfig(\n        labelStyles = FieldLabelStateStyles(\n            base = FieldLabelStyle(color = Color(0xFF333333)),\n        ),\n        inputStyles = FieldInputStateStyles(\n            base = FieldInputStyle(borderColor = Color(0xFFCCCCCC)),\n            invalid = FieldInputStyle(borderColor = Color(0xFFD32F2F)),\n        ),\n        invalidTextStyle = FieldMessageStyle(color = Color(0xFFD32F2F)),\n        phoneNumberGuideTextStyle = FieldMessageStyle(fontSize = 12f),\n    ),\n    buttonStyles = ButtonStateStyles(\n        base = FieldStyle(backgroundColor = Color(0xFF2F3BFF)),\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The consumer data screen supports these properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["editableFields"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["List<ConsumerDataField>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prefilled fields that the shopper can edit. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," or empty, prefilled fields are read-only. Possible values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FIRST_NAME"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LAST_NAME"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EMAIL"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PHONE_NUMBER"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldConfig.labelStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldLabelStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Label styles for the base, valid, and invalid states."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldConfig.inputStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldInputStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Input styles for the base, valid, and invalid states."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldConfig.invalidTextStyle"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldMessageStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for validation messages."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fieldConfig.phoneNumberGuideTextStyle"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldMessageStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the phone number guidance text."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buttonStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the screen's action button."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields returned by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," are disabled by default. Add a field to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["editableFields"]}," if the shopper needs to change its value."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"otp-verification-configuration","__idx":11},"children":["OTP verification configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["otpVerificationConfig"]}," to customise the OTP inputs, validation message, and action button:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.otpVerificationConfig = OtpVerificationConfig(\n    inputStyles = FieldInputStateStyles(\n        base = FieldInputStyle(\n            borderColor = Color.Gray,\n            cornerRadius = 8.dp,\n        ),\n        active = FieldInputStyle(\n            borderColor = Color.Blue,\n            borderWidth = 2.dp,\n        ),\n        invalid = FieldInputStyle(borderColor = Color.Red),\n    ),\n    invalidTextStyles = FieldMessageStyle(color = Color(0xFFD32F2F)),\n    buttonStyles = ButtonStateStyles(\n        base = FieldStyle(backgroundColor = Color(0xFF2F3BFF)),\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the OTP verification screen with these properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inputStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldInputStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for each OTP input in the base, active, and invalid states."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalidTextStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldMessageStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the validation message below the OTP inputs."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buttonStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the verification button."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bank-selection-configuration","__idx":12},"children":["Bank selection configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bankSelectionConfig"]}," to customise bank selection and the embedded Aerosync experience:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.bankSelectionConfig = BankSelectionConfig(\n    payButtonStyles = ButtonStateStyles(\n        base = FieldStyle(backgroundColor = Color(0xFF2F3BFF)),\n    ),\n    linkBankButtonStyles = ButtonStateStyles(\n        base = FieldStyle(\n            backgroundColor = Color.White,\n            color = Color(0xFF2F3BFF),\n        ),\n    ),\n    bankSelectedIndicatorColor = Color(0xFF2F3BFF),\n    bankItemStyles = BankItemStateStyles(\n        base = BankItemStyle(\n            bankNameStyle = BankItemTextStyle(fontSize = 16f),\n        ),\n        selected = BankItemStyle(\n            containerStyle = BankItemContainerStyle(\n                backgroundColor = Color(0xFFDBEDFA),\n            ),\n        ),\n    ),\n    excludedBankAccountIds = listOf(1895986, 1895988),\n    allowLinkBankOnPayout = false,\n    aerosyncTheme = AerosyncTheme.LIGHT,\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure the bank selection screen with these properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payButtonStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the pay or withdraw button."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["linkBankButtonStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["ButtonStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the link-bank button."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bankSelectedIndicatorColor"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Color?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Accent colour for the selected-bank indicator. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bankItemStyles"]}," isn't set, the SDK can derive bank item styles from this colour."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bankItemStyles"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["BankItemStateStyles?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for funding bank list items in the base and selected states."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["excludedBankAccountIds"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["List<Number>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bank account IDs to hide from the linked-banks list (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["listOf(1895986, 1895988)"]},"). When omitted or empty, all linked accounts are shown."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowLinkBankOnPayout"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether to show the link-bank button for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]}," transactions. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aerosyncTheme"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["AerosyncTheme?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Theme for the embedded Aerosync widget. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncTheme.LIGHT"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AerosyncTheme.DARK"]},". When omitted, the SDK resolves light theme."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"button-styles","__idx":13},"children":["Button styles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The top-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["styles"]}," property and each screen's button style property use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ButtonStateStyles"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val buttonStyles = ButtonStateStyles(\n    base = FieldStyle(\n        backgroundColor = Color(0xFF2F3BFF),\n        color = Color.White,\n        cornerRadius = 8.dp,\n        padding = PaddingValues(horizontal = 16.dp, vertical = 14.dp),\n    ),\n    disabled = FieldStyle(\n        backgroundColor = Color(0xFF2F3BFF).copy(alpha = 0.5f),\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure button states with these properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["base"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles for the default state."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles applied when the button is disabled."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loading"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["FieldStyle?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Styles applied while the button is in a loading state."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"event-handling","__idx":14},"children":["Event handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure callbacks on the component to respond to shopper actions, validation, verification, transaction submission, and errors:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    onClick = {\n        clearPaymentErrors()\n    }\n    onCustomValidation = {\n        // Must return Boolean; e.g. a ready-state flag or a function that returns Boolean\n        checkoutReady\n    }\n    onUserVerificationSuccess = { user ->\n        saveAeropayUserId(user.id)\n    }\n    onCancel = {\n        resetCheckoutState()\n    }\n    onPreAuthorisation = { true }\n    onPostAuthorisation = { result ->\n        verifyPaymentOnBackend(result)\n    }\n    onSubmitError = { error ->\n        // Handle FailedSubmitResult from transaction submission\n    }\n    onError = { error ->\n        // Handle BaseSdkException from the Aeropay flow\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The component supports these callbacks:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Callback"},"children":["Callback"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onClick"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the shopper taps the Aeropay button, before custom validation and popup opening."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCustomValidation"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["suspend () -> Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onClick"]},". Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to continue or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to stop before the Aeropay flow starts."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserVerificationSuccess"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(AeropayUser) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called after OTP verification succeeds. Store ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user.id"]}," for returning-shopper flows."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCancel"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the shopper dismisses the popup. Programmatic dismissal after a successful payment doesn't invoke it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["suspend () -> Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called before transaction submission. Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to submit, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to stop. If the callback is omitted, submission doesn't proceed and the popup stays open."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(MerchantSubmitResult) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called after the transaction is submitted successfully."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(BaseSubmitResult) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when transaction submission fails. At runtime, failed responses typically use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FailedSubmitResult"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(BaseSdkException) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when an SDK or provider error occurs during the Aeropay flow outside successful or failed transaction submission."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For callback payloads and handling guidance, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/aeropay/events"},"children":["Events"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"methods","__idx":15},"children":["Methods"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"content","__idx":16},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Render the Aeropay button in your Compose UI:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"aeropayButton.Content(modifier = Modifier.fillMaxWidth())\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create the component through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout.createComponent(ComponentType.AERO_PAY_BUTTON, config)"]},". Direct instantiation isn't supported."]}]},"headings":[{"value":"Configuration","id":"configuration","depth":1},{"value":"Basic usage","id":"basic-usage","depth":2},{"value":"Minimal configuration","id":"minimal-configuration","depth":3},{"value":"Related SDK configuration","id":"related-sdk-configuration","depth":3},{"value":"Component properties","id":"component-properties","depth":2},{"value":"Shopper flow configuration","id":"shopper-flow-configuration","depth":2},{"value":"New shoppers","id":"new-shoppers","depth":3},{"value":"Skip consumer data collection","id":"skip-consumer-data-collection","depth":3},{"value":"Returning shoppers","id":"returning-shoppers","depth":3},{"value":"Popup configuration","id":"popup-configuration","depth":2},{"value":"Consumer data configuration","id":"consumer-data-configuration","depth":2},{"value":"OTP verification configuration","id":"otp-verification-configuration","depth":2},{"value":"Bank selection configuration","id":"bank-selection-configuration","depth":2},{"value":"Button styles","id":"button-styles","depth":2},{"value":"Event handling","id":"event-handling","depth":2},{"value":"Methods","id":"methods","depth":2},{"value":"Content()","id":"content","depth":3}],"frontmatter":{"seo":{"title":"Configuration"}},"lastModified":"2026-08-13T10:57:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/aeropay/configuration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}