Diagnose and resolve common Aeropay setup, verification, bank-linking, and transaction issues.
Aeropay failures are reported through different paths:
| Failure type | Where to handle it |
|---|---|
| Invalid component or SDK configuration | Catch the exception thrown by pxpCheckout.create(.aeropayButton, componentConfig:). |
Custom validation returns false | Handle it in your own onCustomValidation logic. No SDK error is raised. |
| Recognised shopper, user, OTP provider, bank account, or Aerosync error | Handle onError. |
| Transaction submission failure | Handle onSubmitError. |
| Shopper dismisses the popup | Handle onCancel. Cancellation isn't an error. |
| Inline field or OTP format error | The component displays the message and prevents progression. |
Use these error paths in your integration:
do {
let config = AeropayButtonComponentConfig()
config.onCancel = {
resetCheckoutState()
}
config.onPreAuthorisation = { true }
config.onPostAuthorisation = { result in
verifyPaymentOnBackend(result)
}
config.onSubmitError = { error in
guard let failed = error as? FailedSubmitResult else { return }
// Log failed.errorCode, failed.errorReason, and failed.correlationId in restricted logs
showPaymentError("Unable to complete the transaction.")
}
config.onError = { _ in
showPaymentError("Unable to continue with Aeropay.")
}
let aeropayButton = try pxpCheckout.create(.aeropayButton, componentConfig: config)
} catch let error as 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.
These SDK errors occur when creating the component:
| Error code | Meaning | Check |
|---|---|---|
SDK0106 | Unsupported Aeropay intent. | Use .authorisation, .purchase, .estimatedAuthorisation, or .payout. With the current public AeropayIntentType cases, typed Aeropay creation won't hit this path. |
SDK0113 | Aeropay funding configuration is missing. | Confirm that the session contains non-empty externalMerchantId and configurationId. |
SDK0114 | Unsupported entry type. | Set transactionData.entryType to .ecom. |
SDK0115 | Aeropay intent is missing. | Set transactionData.intent.aeropay. |
SDK0116 | Unsupported currency. | Set transactionData.currency to USD. |
These errors can occur after the shopper starts the Aeropay flow:
| Error code | Meaning | Check |
|---|---|---|
SDK1300 | Shopper data is invalid. | Correct values returned by onGetShopper. |
SDK1301 | Aeropay user creation failed. | Check consumer values, provider details, credentials, and network status. |
SDK1302 | User verification failed. | Confirm the OTP, network status, and provider response. Provider code AP112 also surfaces as SDK1302. |
SDK1303 | Missing or invalid Aerosync payload (including bank-list load when no verified Aeropay user ID is available on the bank-selection screen), or the SDK can't parse a valid account-linking payload from the Aerosync success result. | Prefer this code when diagnosing a missing verified user ID on the live bank UI. Calls onError in most cases; some link-bank / credentials paths show only inline or alert feedback without onError. |
SDK1304 | Aerosync failed. | Check network access, environment configuration, and the provider response. |
SDK1305 | Linking the bank account failed. | Retry linking and check PXP or Aeropay service status. |
SDK1306 | Retrieving bank accounts failed. | Check the user, provider response, session, and network. |
SDK1307 | The Aeropay user isn't active. | Remove the stored ID and offer the new-shopper flow. |
SDK1308 | Retrieving the Aeropay user failed. | Check the stored ID, session, network, and provider availability. |
SDK1311 | AeropayAerosyncConfigMissingException with message Aeropay Aerosync token and deeplink are required. Uncommon on the current Aerosync screen callbacks for a missing user ID — don't use this as the primary missing-verification signal. Prefer SDK1303 for bank-list load without a verified user ID. | Confirm verification or userId first via SDK1303 / shopper flow; treat SDK1311 as rare unless debugging helper code paths. |
SDK1319 | Aggregator credentials lookup failed. | Check the verified user, session, and provider availability. |
Missing a verified Aeropay user ID on the bank-selection screen typically surfaces as SDK1303 on onError when the bank list loads. Some link-bank / credentials paths show only inline or alert feedback without onError. Don't diagnose missing verification primarily via SDK1311.
Network or transport failures during these Aeropay service calls typically call onError with SDK0500 (NetworkSdkException). Other mapped failures use the Aeropay-specific codes in the table.
Mapped failed Unity transaction responses call onSubmitError with a FailedSubmitResult and emit ComponentError analytics with SDK1326. Network or transport failures after Unity submission also call onSubmitError, but their analytics code can differ. Don't expect SDK1326 on onError.
Record identifiers and configuration presence without logging credentials or personal data:
func logAeropayDiagnostics(
session: SessionData,
transactionData: TransactionData,
environment: Environment
) {
let 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:
- Revoke or replace the affected credential.
- Update the backend secret store and redeploy the affected service.
- Review logs, analytics, screenshots, and support records for further exposure.
- Retest session creation and the Aeropay flow with the replacement credential.
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:
- Go to Merchant setup > Merchant groups in the Unity Portal.
- Select the merchant group and open the Services tab.
- Add or enable Aeropay service.
- Return to the site and configure the service.
See Aeropay onboarding for the complete steps.
The session doesn't contain allowedFundingTypes.payByBanks.aeropay.
Check that:
- The session request uses the correct merchant and site.
- Aeropay is active for that site.
- Merchant ID, API key, API secret, and configuration ID are saved.
- The session was created after the portal configuration was saved.
- Session request: include a supported Aeropay intent (for example
transactionMethod.intent.aeropay). iOS SDK: settransactionData.intent.aeropaywhen buildingCheckoutConfig.
Create a new session after correcting the service.
Inspect the session response for both Aeropay funding values:
let aeropay = session.allowedFundingTypes?.payByBanks?.aeropay
let hasExternalMerchantId = !(aeropay?.externalMerchantId?.isEmpty ?? true)
let hasConfigurationId = !(aeropay?.configurationId?.isEmpty ?? true)If externalMerchantId is missing, check the Aeropay Merchant ID in the site configuration. If configurationId is missing, check the Aerosync Configuration ID.
Check the following causes:
createthrew an exception that wasn't caught.- The component wasn't stored in
@StatebeforebuildContent()ran. - The view left the hierarchy before creation finished.
- The button is disabled, hidden, or covered by another view.
- Custom styles hide the button against the checkout background.
Create the component in a lifecycle-aware Task, then render buildContent() only after creation succeeds.
Check whether:
- The button is disabled.
- A popup is already open.
- A previous start operation is still loading.
onCustomValidationreturnedfalse.onGetShopperis waiting indefinitely.- Invalid shopper data caused
SDK1300. - A returning-user lookup is still running or failed.
Add onClick, onCustomValidation, and onError logging, then check Xcode console 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.
- View recreation without restoring component state.
- An unhandled exception.
- Session or network failure.
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
+1followed by exactly ten digits.
Return empty values for unknown fields instead of placeholders such as N/A.
skipConsumerDataCollection only skips the screen when all four fields are non-empty and editableFields is omitted, nil, or empty. If any field is missing or editable, the screen still appears.
The stored Aeropay user ID isn't usable.
Resolve the issue:
- Remove the stored ID for that customer.
- Start the new-shopper flow.
- Save the new verified ID from
onUserVerificationSuccess.
Check that:
- The shopper completed verification or entered with a valid
userId. - Your app handles
{callbackScheme}://aerosync/callback, where the scheme comes from the SDK configuration and defaults topxpcheckout. - The callback scheme is registered in
Info.plist(CFBundleURLSchemes). Sample apps usepxpcheckout. If you setPXP_CALLBACK_SCHEMEinsdk-config.json, use the same value. A mismatched or missing URL type prevents Aerosync OAuth from returning to your app during UAT. - The URL scheme matches the SDK distribution you're using.
- The SDK environment matches the Aeropay UAT or production configuration.
Missing a verified Aeropay user ID on the bank-selection screen typically surfaces as SDK1303 on onError when the bank list loads. Some link-bank / credentials paths show only inline or alert feedback without onError. Don't diagnose missing verification primarily via SDK1311.
By default, payouts hide bank linking. Set bankSelectionConfig.allowLinkBankOnPayout to true if shoppers need to link an account during payout.
Confirm that onPreAuthorisation is implemented and returns true. Omitting the callback or returning false aborts submission without calling onSubmitError, onCancel, or onError — the bank-selection screen stays open.
Handle onSubmitError and cast to FailedSubmitResult before reading errorCode, errorReason, and correlationId. Those properties aren't on BaseSubmitResult.
config.onSubmitError = { error in
guard let failed = error as? FailedSubmitResult else { return }
// Log failed.errorCode, failed.errorReason, and failed.correlationId in restricted logs
}Then verify the transaction state on your backend before showing a final result to the shopper.