<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "ApplePayontheWeb",
  "identifier" : "/documentation/ApplePayontheWeb/ApplePayErrorCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Apple Pay on the Web"
    ],
    "preciseIdentifier" : "enum/ApplePayErrorCode"
  },
  "title" : "ApplePayErrorCode"
}
-->

# ApplePayErrorCode

The error code that indicates whether an error on the payment sheet is for shipping or billing information, or for another kind of error.

```
enum ApplePayErrorCode
```

## Overview

Use the following error codes in the [`code`](/documentation/ApplePayontheWeb/ApplePayError/code) property of [`ApplePayError`](/documentation/ApplePayontheWeb/ApplePayError):

- `"shippingContactInvalid"`: The code that indicates that the shipping address or contact information is invalid or missing.
  
  Use with [`contactField`](/documentation/ApplePayontheWeb/ApplePayError/contactField).
- `"billingContactInvalid"`: The code that indicates that the billing address information is invalid or missing.
  
  Use with [`contactField`](/documentation/ApplePayontheWeb/ApplePayError/contactField).
- `"addressUnserviceable"`: The code that indicates that the merchant can’t provide service to the shipping address (for example, can’t deliver to a P.O. Box).
- `"couponCodeInvalid"`: The code that indicates an invalid coupon.
- `"couponCodeExpired"`: The code that indicates an expired coupon.
- `"unknown"`: The code that indicates an unknown but nonfatal error occurred during payment processing. The user can attempt authorization again.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)