Skip to main content

New rejection reason codes in Payments Apps API

The Payments Apps API now provides more granular decline reason codes for rejected payment sessions. Multiple new rejection codes have been added to the PaymentSessionStateRejectedReason enum alongside a new source field, giving payments apps more standardized, actionable ways to communicate to merchants why a payment was declined.

New rejection reason codes

The following error codes expand the existing set of rejection reasons with more specific rejection information:

Error CodeDescription
AMOUNT_TOO_LARGEThe amount exceeds the maximum amount allowed.
AMOUNT_TOO_SMALLThe amount is below the minimum amount allowed.
AUTHENTICATION_REQUIREDThe payment required 3D Secure authentication but was attempted without authentication.
CALL_ISSUERThe issuer declined the payment. The buyer should contact their issuer for more details.
CANCELLED_PAYMENTThe payment was cancelled.
CARD_TESTINGThe payment was blocked due to suspected card testing behaviour.
DO_NOT_HONORThe issuer declined the payment without providing a specific reason.
FRAUD_SUSPECTEDThe payment was declined due to suspected fraudulent activity.
HIGH_RISK_FRAUD_SUSPECTEDThe payment was declined due to high fraud risk indicators. The payment instrument may have been reported as lost or stolen.
INSTRUMENT_DECLINEDThe payment instrument was declined.
INSUFFICIENT_FUNDSThe payment method has insufficient funds to complete the payment.
INVALID_AMOUNTThe payment amount is invalid or incorrectly calculated.
INVALID_CURRENCYThe currency isn't supported.
INVALID_PAYMENT_METHODThe payment method or its associated account is invalid or not found.
INVALID_PURCHASE_TYPEThis payment method doesn't support the requested payment type.
INVALID_REQUESTThe payment request is missing required parameters or contains invalid values.
MERCHANT_ACCOUNT_ERRORThe payment couldn't be processed due to an issue with the merchant account.
MERCHANT_RULEThe payment was blocked due to merchant's custom payment risk rule.
PAYMENT_METHOD_UNSUPPORTEDThe payment method isn't supported.
PICK_UP_CARDThe card can't be used for this payment. The cardholder may have reported it as lost or stolen.
RETRY_DECLINEDThe payment retry attempt was declined.
TRANSACTION_LIMIT_EXCEEDEDThe payment instrument has exceeded the processing frequency limit.

New rejection source

A new source field has been added to both the PaymentSessionRejectionReasonInput input and the PaymentSessionStateRejected type. This field accepts a PaymentSessionStateRejectedSource enum value to indicate which entity declined the transaction:

  • NETWORK: The payment network or the issuer rejected the payment.
  • PROVIDER: The provider rejected the payment.

Deprecation

The RISKY rejection reason is now deprecated. If your app currently passes RISKY when calling paymentSessionReject, update your code to use FRAUD_SUSPECTED instead.

Example

Pass the new rejection reason and source in your paymentSessionReject mutation:

mutation PaymentSessionReject($id: ID!, $reason: PaymentSessionRejectionReasonInput!) {
  paymentSessionReject(id: $id, reason: $reason) {
    paymentSession {
      id
      state {
        ... on PaymentSessionStateRejected {
          reason
          source
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

With variables:

{
  "id": "gid://shopify/PaymentSession/1",
  "reason": {
    "code": "INSUFFICIENT_FUNDS",
    "source": "NETWORK"
  }
}
Was this section helpful?