iOS SDK - Response Handling

DOCS

Last updated: Aug 15th, 7:58am

Errors Passed to the SDK

Effective as of iOS SDK 5.4, the WLW platform passes failure response data in the PDPaydiantError class, which identifies the unchanged HTTP code, along with a context-specific description and an instance of PDErrorInformation object, encapsulating the raw failure response body. The errorCode and errorDescription represent the event status, plus an external error code passed by a third-party entity through the connector framework, if applicable.

The following XML sample depicts the general structure of the server error object.

    1<?xml version="1.0" encoding="UTF-8"?>
    2<PDPaydiantError>
    3 <statusCode>400</statusCode>
    4 <statusMessage>BAD_REQUEST</statusMessage>
    5 <description>"Account already exists."</description>
    6 <rawErrorDescription>...</rawErrorDescription>
    7 <localizedDescription>...</localizedDescription>
    8 <errorInformation>
    9 <PDErrorInformation>
    10 <errorCode>798</errorCode>
    11 <errorDescription>DUPLICATES_NOT_ALLOWED</errorDescription>
    12 <externalErrorDescription>
    13 ...
    14 Array of PDExternalErrorInformation
    15 ...
    16 </externalErrorDescription>
    17 </PDErrorInformation>
    18 </errorInformation>
    19</PDPaydiantError>

    ErrorInformation Values

    The PDErrorInformation is populated with the errorCode and errorDescription values defined in WLW’s platform. The following tables define each possible value within the code ranges that have been designated for specific operation types.

    Settlement Statuses (200 - 209)

    errorCodeerrorDescription
    200APPROVED
    201DECLINED
    202SETTLEMENT_FAILED
    203INSUFFICIENT_FUNDS
    204PARTIAL_PAYMENT_SUCCESS

    Authorization Statuses (210 - 219)

    errorCodeerrorDescription
    210AUTH_APPROVED
    211AUTH_FAILED
    212PARTIAL_PRE_AUTH_SUCCESS

    Scheduled Processing Statuses (220 - 229)

    errorCodeerrorDescription
    220AUTH_APPROVED_AND_SCHEDULED

    Refund Statuses (230 - 239)

    errorCodeerrorDescription
    230REFUND_APPROVED
    231REFUND_ON_HOLD
    232REFUND_FAILED
    235REFUND_NOT_POSSIBLE
    236REFUND_TRANSACTION_DATA_MISMATCH
    237REFUND_TRANSACTION_AMOUNT_EXCEED

    General Payment Processing Statuses (240 - 249)

    errorCodeerrorDescription
    240DUPLICATE_TRANSACTION
    241PROCESSING_ERROR
    242GATEWAY_PROCESSING_ERROR
    243TRANSACTION_NOT_ALLOWED
    244TRANSACTION_UNDER_REVIEW
    245TRANSACTION_NOT_SUPPORTED

    Payment Processing Input Statuses (250 - 299)

    errorCodeerrorDescription
    250INVALID_INPUTS
    251INVALID_AMOUNT
    252INVALID_CARD_NUMBER
    253INVALID_EXPIRY_DATE
    254EXPIRED_CARD
    255INVALID_ABA
    257AVS_MISMATCH
    258INVALID_CARD_CODE

    Non-Transaction Processing Statuses (340 - 349)

    errorCodeerrorDescription
    340SUCCESS
    341CRUD_NOT_POSSIBLE
    349ENTITY_IS_DELETED

    Non-Transaction Processing Input Statuses (350 - 369)

    errorCodeerrorDescription
    350ENTITY_NOT_EXISTING
    351DUPLICATES_NOT_ALLOWED
    352EMPTY_PARTNER_URI
    353EMPTY_TENANT_URI
    354EMPTY_MERCHANT_URI
    355EMPTY_USER_PROFILE_URI
    356EMPTY_CURRENCY_URI
    357EMPTY_FINANCIAL_INSTITUTE_URI
    358EMPTY_WALLET_ACCOUNT_URI
    359EMPTY_PAYMENT_PROCESSOR_URI
    360INVALID_PARTNER_URI
    361INVALID_TENANT_URI
    362NVALID_MERCHANT_URI
    363INVALID_USER_PROFILE_URI
    364INVALID_CURRENCY_URI
    365INVALID_FINANCIAL_INSTITUTE_URI
    366INVALID_WALLET_ACCOUNT_URI
    367INVALID_PAYMENT_PROCESSOR_URI
    368INVALID_PAYMENT_IMAGE_CATEGORY_URI
    369INVALID_PAYMENT_IMAGE_URI

    Balance Inquiry Statuses (370 - 379)

    errorCodeerrorDescription
    370BALANCE_INQUIRY_SUCCESS
    371BALANCE_INQUIRY_FAILED
    372BALANCE_TEMP_UNAVAILABLE
    373BALALNCE_NOT_SUPPORTED
    374INVALID_BALANCE_AMOUNT
    375INVALID_BALANCE_REQUEST

    Verification Statuses (380 - 389)

    errorCodeerrorDescription
    380VERIFICATION_SUCCESS
    381VERIFICATION_FAILED
    382VERIFICATION_AMOUNT_MISMATCH
    383VERIFICATION_PERIOD_EXPIRED
    384VERIFICATION_NOT_SUPPORTED
    385VERIFICATION_TEMP_NOT_AVAILABLE
    386INVALID_VERIFICATION_REQUEST
    387VERIFICATION_INITIATED
    388UNSUPPORTED_IIN
    389UNSUPPORTED_TENDER_TYPE

    Loyalty Account Statuses (400 - 409)

    errorCodeerrorDescription
    400ALLOWED_LOYALTY_CARD_LIMIT_EXCEEDED
    errorCodeerrorDescription
    500INVALID_TRANSACTION
    501SUSPECTED_FRAUD
    errorCodeerrorDescription
    550MERCHANT_ERROR

    Full Reversal Statuses (600 - 619)

    errorCodeerrorDescription
    600FULL_REVERSAL_SUCCESS
    601FULL_REVERSAL_DENIED
    602FULL_REVERSAL_EXT_SYSTEM_FAILED
    603FULL_REVERSAL_SYSTEM_FAILED
    604FULL_REVERSAL_NOT_POSSIBLE
    605TRANSACTION_NOT_FOUND_FOR_REVERSAL

    Void Statuses (620 - 639)

    errorCodeerrorDescription
    620VOID_SUCCESS
    621VOID_DENIED
    622VOID_EXT_SYSTEM_FAILED
    623VOID_SYSTEM_FAILED
    624VOID_NOT_POSSIBLE

    Loyalty Transaction Statuses (700 - 749)

    errorCodeerrorDescription
    700ADD_LOYALTY_POINTS_SUCCESS
    701ADD_LOYALTY_POINTS_FAILED
    702ADD_LOYALTY_POINTS_NOT_SUPPORTED
    703INVALID_POINTS_AMOUNT
    704SUBTRACT_LOYALTY_POINTS_FOR_REFUND_SUCCESS
    705SUBTRACT_LOYALTY_POINTS_FOR_REFUND_FAILED
    706SUBTRACT_LOYALTY_POINTS_FOR_REFUND_NOT_SUPPORTED
    707SUBTRACT_LOYALTY_POINTS_SUCCESS
    708SUBTRACT_LOYALTY_POINTS_FAILED
    709SUBTRACT_LOYALTY_POINTS_NOT_SUPPORTED
    710ADD_LOYALTY_POINTS_FOR_SALE_SUCCESS
    711ADD_LOYALTY_POINTS_FOR_SALE_FAILED
    712ADD_LOYALTY_POINTS_FOR_SALE_NOT_SUPPORTED
    713LOYALTY_POINTS_VOID_SUCCESS
    714LOYALTY_POINTS_VOID_FAILED
    715LOYALTY_POINTS_VOID_NOT_POSSIBLE
    716LOYALTY_POINTS_FULL_REVERSAL_SUCCESS
    717LOYALTY_POINTS_FULL_REVERSAL_FAILED
    718LOYALTY_POINTS_FULL_REVERSAL_NOT_POSSIBLE

    Load Account Statuses (750 - 759)

    errorCodeerrorDescription
    750ADD_VALUE_SUCCESS
    751ADD_VALUE_FAILED
    752ADD_VALUE_NOT_SUPPORTED
    753MAX_VALUE_EXCEEDED
    754MAX_BALANCE_EXCEEDED

    Provisioning Statuses (760 - 769)

    errorCodeerrorDescription
    760CARD_PROVISIONING_SUCCESS
    761CARD_PROVISIONING_FAILED
    762CARD_PROVISIONING_NOT_SUPPORTED
    763CARD_PROVISIONING_LIMIT_EXCEEDED
    764CARD_PROVISIONING_DECLINED

    Identity Provider Statuses (780 - 789)

    errorCodeerrorDescription
    780IDP_AUTHENTICATION_SUCCESS
    781IDP_AUTHENTICATION_FAILURE
    782IDP_PROCESSING_ERROR
    783IDP_EXTERNAL_PROCESSING_ERROR

    Variable-Step Payment Account Enrollment Statuses (790 - 809)

    errorCodeerrorDescription
    790PAYMENT_ACCOUNT_ENROLLMENT_SUCCESSFUL
    791PAYMENT_ACCOUNT_ENROLLMENT_FAILED
    792PAYMENT_ACCOUNT_ENROLLMENT_CANCELLED
    793PAYMENT_ACCOUNT_ENROLLMENT_EXPIRED
    794PAYMENT_ACCOUNT_ENROLLMENT_CARD_PROVISIONING_LIMIT_EXCEEDED
    795PAYMENT_ACCOUNT_ENROLLMENT_CARD_PROVISIONING_DECLINED
    796PAYMENT_ACCOUNT_ENROLLMENT_NOT_SUPPORTED
    797PAYMENT_ACCOUNT_ENROLLMENT_CRUD_NOT_POSSIBLE
    798PAYMENT_ACCOUNT_ENROLLMENT_DUPLICATED_NOT_ALLOWED
    799PAYMENT_ACCOUNT_ENROLLMENT_VERIFICATION_AMOUNT_MISMATCH
    800PAYMENT_ACCOUNT_ENROLLMENT_VERIFICATION_NOT_SUPPORTED
    801PAYMENT_ACCOUNT_ENROLLMENT_VERIFICATION_TEMP_NOT_AVAILABLE
    802PAYMENT_ACCOUNT_ENROLLMENT_INVALID_VERIFICATION_REQUEST
    803PAYMENT_ACCOUNT_ENROLLMENT_VERIFICATION_INITIATED
    804PAYMENT_ACCOUNT_ENROLLMENT_CANCELLATION_NOT_POSSIBLE
    805PAYMENT_ACCOUNT_ENROLLMENT_ALREADY_CANCELLED

    Payment Status Code Reference

    Payment status codes are not error codes in that they are not returned to the app in failure responses. Rather, they represent the outcome of a payment authorization request as it is returned to WLW by the processor and are returned to the app within the PaymentStatusCode attribute of a PDTransactionAccount instance returned in a success response at completion of a payment transaction. In transactions where one or more payment attempts failed before the transaction was ultimately successful, the previousPaymentResults attribute of the PDTransactionDetail object may include PDTransactionAccount instances populated with values from this list.

    Authorization Status

    CodeStatus MessageDescription
    200Approved PaymentPayment for the transaction has been approved.
    201Declined PaymentPayment for the transaction has been declined.
    203Insufficient FundsThe account from which the payment is being drawn does not have enough money to cover the amount due.
    210Auth_ApprovedThe authorization has been approved.
    211Auth_FailedThe authorization has not succeeded.
    212Partial_Pre_Auth_SuccessThe amount for pre-authorization was approved for an amount that was less than the approved pre-authorization amount.

    Payment Status

    CodeStatus MessageDescription
    240Duplicate TransactionThe transaction has already been submitted.
    241Processing ErrorApproval of the payment authorization has failed.
    242Gateway Processing ErrorAn error has occurred in an external system while processing the payment.
    243Transaction Not AllowedThis transaction cannot be processed at the customer’s financial institution.

    Payment Input Failures

    CodeStatus MessageDescription
    250Invalid InputsThe transaction contains one or more invalid parameter entries.
    251Invalid AmountThe amount entered is not a valid format (e.g., multiple decimal points may have been entered).
    252Invalid Card NumberThe credit card number entered is not valid (e.g., too many or too few digits).
    253Invalid Expiry DateThe credit card expiration date is not a valid date.
    254Expired CardThe credit card expiration date has already passed.
    255Invalid ABAThe ABA code is not valid for the card.
    256Invalid Account NumberThe account number is invalid.
    257AVS MismatchThe transaction resulted in an AVS mismatch. The address provided does not match billing address of card holder.
    258Invalid Card CodeThe card code (CVV2/CVC2/CID) is invalid.
    CodeStatus MessageDescription
    500Invalid TransactionThe transaction request is not valid; contact Issuer.
    501Suspected FraudA fraudulent transaction is suspected; contact Issuer.
    CodeStatus MessageDescription
    550Merchant ErrorThe data transmitting from the POS terminal has resulted in an error.