Skip to content

Troubleshooting

Diagnose and resolve common Aeropay setup, verification, bank-linking, and transaction issues.

Error handling

Aeropay failures are reported through different paths:

Failure typeWhere to handle it
Invalid component or SDK configurationCatch the exception thrown by checkout.createComponent().
Custom validation returns falseHandle it in your own onCustomValidation logic. No SDK error is raised.
Recognised shopper, user, OTP provider, bank account, or Aerosync errorHandle onError.
Transaction submission failureHandle onSubmitError.
Shopper dismisses the popupHandle onCancel. Cancellation isn't an error.
Inline field or OTP format errorThe component displays the message and prevents progression.

Use these error paths in your integration:

import com.pxp.checkout.types.ComponentType
import com.pxp.checkout.components.aeropaybutton.types.AeropayButtonComponentConfig
import com.pxp.checkout.exceptions.BaseSdkException
import com.pxp.checkout.models.FailedSubmitResult
import com.pxp.checkout.models.MerchantSubmitResult

try {
    val aeropayButton = checkout.createComponent(
        ComponentType.AERO_PAY_BUTTON,
        AeropayButtonComponentConfig().apply {
            onCancel = {
                resetCheckoutState()
            }
            onPreAuthorisation = { true }
            onPostAuthorisation = { result: MerchantSubmitResult ->
                verifyPaymentOnBackend(result)
            }
            onSubmitError = { error ->
                if (error is FailedSubmitResult) {
                    showPaymentError("Unable to complete the transaction.")
                }
            }
            onError = { error ->
                showPaymentError("Unable to continue with Aeropay.")
            }
        },
    )
} catch (error: BaseSdkException) {
    showAlternativePaymentMethods()
}

Don't show raw provider or SDK messages to shoppers. Map failures to approved user-facing messages and keep technical details in restricted logs.

Error code reference

Setup and configuration

These SDK errors occur when creating the component:

Error codeMeaningCheck
SDK0113Aeropay funding configuration is missing.Confirm that the session contains non-empty externalMerchantId and configurationId.
SDK0114Unsupported entry type.Set transactionData.entryType to EntryType.Ecom.
SDK0115Aeropay intent is missing.Set transactionData.intent.aeropay.
SDK0116Unsupported currency.Set transactionData.currency to USD.

Aeropay flow

These errors can occur after the shopper starts the Aeropay flow:

Error codeMeaningCheck
SDK1300Shopper data is invalid.Correct values returned by onGetShopper.
SDK1301Aeropay user creation failed.Check consumer values, provider details, credentials, and network status.
SDK1302User verification failed.Confirm the OTP, network status, and provider response. Provider code AP112 also surfaces as SDK1302.
SDK1303Aerosync returned an invalid payload.Retry bank linking and inspect the widget result without logging bank data.
SDK1304Aerosync failed. Also emitted as AerosyncFailed analytics. Widget-level failures call onError with SDK1304; they may not emit ComponentError. Listen for onError or AerosyncFailed, not only ComponentError.Check network access, environment configuration, and the provider response.
SDK1305Linking the bank account failed.Retry linking and check PXP or Aeropay service status.
SDK1306Retrieving bank accounts failed.Check the user, provider response, session, and network.
SDK1307The Aeropay user isn't active.Remove the stored ID and offer the new-shopper flow.
SDK1308Retrieving the Aeropay user failed with a recognised API failure response.Check the stored ID, session, and provider availability. Network or transport errors on the same lookup call onError with SDK0500 (or SDK0000), not SDK1308.
SDK1311Aerosync couldn't launch because no host Activity was available.Ensure the component runs while an Activity is available to host the Aerosync redirect.
SDK1319Aggregator credentials lookup failed.Check the verified user, session, and provider availability.
SDK1326Unity transaction submission returned a failed response mapped to FailedSubmitResult.Handle onSubmitError. Inspect errorCode, errorReason, and correlationId in restricted logs, then verify the transaction on your backend. Not delivered through onError.

SDK13xx codes apply to recognised API or provider failure responses. Network or transport errors on the same operations can call onError with SDK0500 (or SDK0000) instead. Check error.errorCode in logs.

CodesAPI or provider failureTransport failure
SDK1301, SDK1302, SDK1305, SDK1306, SDK1319Recognised API failure responsesSDK0500 / SDK0000
SDK1308Recognised get-user API failureSDK0500 / SDK0000

Mapped failed Unity transaction responses call onSubmitError with a FailedSubmitResult and emit ComponentError analytics with SDK1326. Network or transport failures also call onSubmitError, but their analytics code can differ. Don't expect SDK1326 on onError.

Collect safe diagnostic information

Record identifiers and configuration presence without logging credentials or personal data:

import com.pxp.checkout.models.Environment
import com.pxp.checkout.models.SessionConfig
import com.pxp.checkout.models.TransactionData

fun logAeropayDiagnostics(
    session: SessionConfig,
    transactionData: TransactionData,
    environment: Environment,
) {
    val aeropay = session.allowedFundingTypes?.payByBanks?.aeropay
    // Log only:
    // environment
    // session.sessionId
    // whether externalMerchantId and configurationId are present
    // transactionData.currency
    // transactionData.entryType
    // transactionData.intent.aeropay
    // transactionData.merchantTransactionId
}

Don't log hmacKey, encryptionKey, PXP tokens, Aeropay credentials, shopper details, OTPs, user IDs, or bank account metadata.

If a PXP token or Aeropay secret may have been exposed:

  1. Revoke or replace the affected credential.
  2. Update the backend secret store and redeploy the affected service.
  3. Review logs, analytics, screenshots, and support records for further exposure.
  4. Retest session creation and the Aeropay flow with the replacement credential.

Portal and session setup

Aeropay isn't available in site services

The likely cause is that Aeropay isn't enabled at merchant group level or your account isn't entitled to use the service.

Resolve the issue:

  1. Go to Merchant setup > Merchant groups in the Unity Portal.
  2. Select the merchant group and open the Services tab.
  3. Add or enable Aeropay service.
  4. Return to the site and configure the service.

See Aeropay onboarding for the complete steps.

Aeropay is missing from the session

The session doesn't contain allowedFundingTypes.payByBanks.aeropay.

Check that:

  1. The session request uses the correct merchant and site.
  2. Aeropay is active for that site.
  3. Merchant ID, API key, API secret, and configuration ID are saved.
  4. The session was created after the portal configuration was saved.
  5. The session response includes allowedFundingTypes.payByBanks.aeropay with non-empty externalMerchantId and configurationId.
  6. PxpSdkConfig.transactionData.intent.aeropay is set to a supported AeropayIntentType before createComponent() (missing → SDK0115).

For the backend session request shape (including transactionMethod.intent.aeropay in the Sessions API JSON), see Onboarding — Verify session configuration.

Create a new session after correcting the service.

SDK0113 during component creation

Inspect the session response for both Aeropay funding values:

val aeropay = session.allowedFundingTypes?.payByBanks?.aeropay
val hasExternalMerchantId = !aeropay?.externalMerchantId.isNullOrBlank()
val hasConfigurationId = !aeropay?.configurationId.isNullOrBlank()

If externalMerchantId is missing, check the Aeropay Merchant ID in the site configuration. If configurationId is missing, check the Aerosync Configuration ID.

Button and popup issues

Button doesn't render

Check the following causes:

  • createComponent() threw an exception that wasn't caught.
  • The component wasn't stored in Compose state before Content() ran.
  • The composable left the composition before creation finished.
  • The button is disabled or covered by another view.
  • Custom styles hide the button against the checkout background.

Create the component in a lifecycle-aware scope, then render Content() only after creation succeeds.

Tapping the button does nothing

Check whether:

  • The button is disabled.
  • A popup is already open.
  • A previous start operation is still loading.
  • onCustomValidation returned false.
  • onGetShopper performs synchronous work. Blocking calls inside it (network requests, locks) stall the flow before the popup opens. Prefetch shopper data before the tap or return cached values quickly.
  • Invalid shopper data caused SDK1300.
  • A returning-user lookup is still running or failed.

Add onClick, onCustomValidation, and onError logging, then check Logcat and network traffic for stalled requests.

User dismissals call onCancel. Successful payment dismissal is programmatic and doesn't call onCancel. In either case, restore the checkout so the shopper can continue or restart the flow.

If neither dismissal explains the outcome, check for:

  • Navigation away from the checkout screen.
  • Process or Activity recreation without restoring component state.
  • An unhandled exception.
  • Session or network failure.

Shopper data issues

SDK1300 before the popup opens

onGetShopper returned a non-empty invalid firstName, lastName, email, or phoneNumber.

Check that:

  • Names contain only Unicode letters and spaces.
  • Email addresses match the SDK format and stay within 128 characters.
  • Phone numbers use +1 followed by exactly ten digits.

Return empty values for unknown fields instead of placeholders such as N/A.

In restricted logs, inspect error.details on the BaseSdkException passed to onError to see which prefilled field failed validation.

Consumer data screen still appears when skipping

skipConsumerDataCollection only skips the screen when all four fields are non-empty and editableFields is omitted, null, or empty. If any field is missing or editable, the screen still appears.

Returning-shopper issues

SDK1307 or SDK1308

The stored Aeropay user ID isn't usable. SDK1307 means the user exists but isn't active. SDK1308 means the user API returned a recognised failure response. Network or transport errors on the same lookup call onError with SDK0500 (or SDK0000), not SDK1308.

Resolve the issue:

  1. Remove the stored ID for that customer.
  2. Start the new-shopper flow.
  3. Save the new verified ID from onUserVerificationSuccess.

Bank linking issues

Aerosync doesn't open

Check that:

  • The shopper completed verification or entered with a valid userId.
  • An Activity is available to host the redirect. Missing host Activity produces SDK1311.
  • Bank linking returns to checkout after Aerosync. The SDK handles pxpcheckout://aerosync/callback through the library manifest. If linking fails to resume, check for Activity lifecycle issues (SDK1311) or environment mismatch, not missing merchant URI registration.
  • The SDK environment matches the Aeropay UAT or production configuration.

Widget-level Aerosync failures call onError with SDK1304 and emit AerosyncFailed analytics. They may not emit ComponentError. Don't rely on ComponentError alone when diagnosing bank-linking failures.

Bank list is empty on payout

By default, payouts hide bank linking. Set bankSelectionConfig.allowLinkBankOnPayout to true if shoppers need to link an account during payout.

Transaction issues

Transaction never submits

Confirm that onPreAuthorisation is implemented and returns true. Omitting the callback or returning false stops submission without calling onSubmitError.

Submission fails

Handle onSubmitError and inspect FailedSubmitResult.errorCode, errorReason, and correlationId in restricted logs. Then verify the transaction state on your backend before showing a final result to the shopper.