Troubleshooting - Reference

DocsLimited

Last updated: Apr 10th, 8:32pm

If there's a problem with your integration, errors are shown in the response to your request. You can troubleshoot the problem based on the issue code or HTTP code in the response.

Apple Pay issue codes

PayPal’s Apple Pay on the Web integration includes issue codes for 2 additional error responses. These issue codes show up in the response.body.details[].issue parameter of the JSON response:

Issue Code Description
NOT_ENABLED_FOR_APPLE_PAY The API caller or payee isn't set up to process Apple Pay. Contact your Account Manager.
APPLE_PAY_AMOUNT_MISMATCH The amount specified in the order needs to match the amount that was viewed and authorized by the buyer on Apple Pay. If the amount has changed, redirect the buyer to authorize the order again using Apple Pay.

400 Bad Request

A 400 Bad Request response can mean:

  • Apple Pay token value is empty.
  • payment_method or payment_data_type parameter is missing in the Apple Pay decrypted_token.
  • Amounts don't match.

Sample error response: Payment data missing required parameter

    1HTTP status: 400 Bad Request
    2
    3HTTP headers:
    4{
    5 "Content-Type":"application/json"
    6}
    7
    8Response payload:
    9{
    10 "name": "INVALID_REQUEST",
    11 "details": [
    12 {
    13 "field": "/payment_source/apple_pay/decrypted_token/payment_data",
    14 "issue": "MISSING_REQUIRED_PARAMETER",
    15 "description": "A required field or parameter is missing.",
    16 "location": "body"
    17 }
    18 ],
    19 "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
    20 "debug_id": "90957fca61718",
    21 "links": [
    22 {
    23 "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER",
    24 "rel": "information_link",
    25 "method": "GET"
    26 }
    27 ]
    28}

    Sample error response: Payment data missing required payment data type

      1HTTP status: 400 Bad Request
      2
      3HTTP headers:
      4{
      5 "Content-Type":"application/json"
      6}
      7
      8Response payload:
      9{
      10 "name": "INVALID_REQUEST",
      11 "details": [
      12 {
      13 "field": "/payment_source/apple_pay/decrypted_token/payment_data_type",
      14 "issue": "MISSING_REQUIRED_PARAMETER",
      15 "description": "A required field or parameter is missing.",
      16 "location": "body"
      17 }
      18 ],
      19 "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
      20 "debug_id": "90957fca61718",
      21 "links": [
      22 {
      23 "href": "https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_REQUIRED_PARAMETER",
      24 "rel": "information_link",
      25 "method": "GET"
      26 }
      27 ]
      28}

      Sample error response: Authentication amount doesn't match total order amount

        1HTTP status: 400 Bad Request
        2
        3HTTP headers:
        4{
        5 "Content-Type":"application/json"
        6}
        7
        8Response payload:
        9{
        10 "name": "UNPROCESSABLE_ENTITY",
        11 "details": [
        12 {
        13 "issue": "APPLE_PAY_AMOUNT_MISMATCH",
        14 "description": "The 'amount' specified in the Order should match the amount that was viewed and authorized by the payer/buyer on Apple Pay. If the amount has changed, please redirect the buyer to authorize the order again via Apple Pay."
        15 }
        16 ],
        17 "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
        18 "debug_id": "90957fca61718",
        19 "links": [
        20 {
        21 "href": "https://developer.paypal.com/docs/api/orders/v2/#error-APPLE_PAY_AMOUNT_MISMATCH",
        22 "rel": "information_link",
        23 "method": "GET"
        24 }
        25 ]
        26}

        422 Unprocessable Entity

        A 422 Unprocessable Entity response can mean:

        • Apple Pay token value is incorrect.
        • cryptogram value is missing from the decrypted_token object.
        • payment_method or payment_data_type parameter in the Apple Pay decrypted_token is incorrect.

        Sample error response: Incorrect payment data type

          1HTTP status: 422 Unprocessable Entity
          2
          3HTTP headers:
          4{
          5 "Content-Type":"application/json"
          6}
          7
          8Response payload:
          9{
          10 "name": "UNPROCESSABLE_ENTITY",
          11 "details": [
          12 {
          13 "field": "/payment_source/apple_pay/decrypted_token/payment_data_type",
          14 "location": "body",
          15 "issue": "INCOMPATIBLE_PARAMETER_VALUE",
          16 "description": "The value of the field is incompatible with other fields in the order. Please refer to the documentation of the field for details on compatibility with other fields in the order."
          17 },
          18 {
          19 "field": "/payment_source/apple_pay/decrypted_token/payment_data",
          20 "location": "body",
          21 "issue": "INCOMPATIBLE_PARAMETER_VALUE",
          22 "description": "The value of the field is incompatible with other fields in the order. Please refer to the documentation of the field for details on compatibility with other fields in the order."
          23 }
          24 ],
          25 "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
          26 "debug_id": "90957fca61718",
          27 "links": [
          28 {
          29 "href": "https://developer.paypal.com/docs/api/orders/v2/#error-INCOMPATIBLE_PARAMETER_VALUE",
          30 "rel": "information_link",
          31 "method": "GET"
          32 }
          33 ]
          34}