Improved

AeroPay errors in the embed now include an errorCode

Availability: Sandbox since November 4, 2026 · Production since November 5, 2026

The AeroPay endpoints under /embed/v1/payment/aeropay now return AeroPay's own error code as errorCode (for example AP111) when AeroPay refuses a request, so the embedded UI can show the matching message. errorCode is only present when AeroPay sent a code in the AP plus 3 or 4 digits format. See Embedded UI.

  • errorCode added to the 400 responses of POST /embed/v1/payment/aeropay/confirm (mfa_rejected), POST /embed/v1/payment/aeropay/widget/link (link_failed) and POST /embed/v1/payment/aeropay/deposit (aeropay_rejected), and to the deposit 500 aeropay_outcome_unknown.
  • New 400 responses: when AeroPay refuses the request, GET /embed/v1/payment/aeropay (code aeropay_user_rejected), GET /embed/v1/payment/aeropay/accounts (aeropay_accounts_rejected) and GET /embed/v1/payment/aeropay/widget (aeropay_widget_rejected) now answer 400 instead of 500. Each includes errorCode. Refusals where the outcome is uncertain, such as AeroPay server errors, stay 500.
  • 500 bodies: server errors on these endpoints now return {error, code?, errorCode?} with a fixed error string instead of {"msg": ...}, and no longer include AeroPay's raw response text.

If you handle these endpoints' errors yourself, treat these 400 responses like the 500 you saw before, and read errorCode instead of parsing msg.