Skip to main content
Version: v2

API Error Codes Reference

Auto-generated. Do not edit manually.

Agent Object Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
First Name ValidationINVALID_REQUEST400 BAD REQUESTagent.firstName cannot be more than 50 charactersWhen first name exceeds 50 charactersEnsure the agent's first name is 50 characters or less
Last Name ValidationINVALID_REQUEST400 BAD REQUESTagent.lastName cannot be more than 50 charactersWhen last name exceeds 50 charactersEnsure the agent's last name is 50 characters or less
User ID ValidationINVALID_REQUEST400 BAD REQUESTagent.userId is requiredWhen agent user ID is missing, null or emptyInclude a valid agent.userId in the request
Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Merchant Consent Text ValidationINVALID_REQUEST400 BAD REQUESTConsent is Invalid!Merchant consent text is invalid or contains unsupported charactersRemove special characters from consent text
Merchant Consent Id ValidationINVALID_REQUEST400 BAD REQUESTmerchantConsentId is requiredMerchant consent id is missing or invalidProvide a valid merchant consent ID in the request
Consent Collection Timestamp ValidationINVALID_REQUEST400 BAD REQUESTcollectionTimestamp is requiredConsent collection timestamp is missing or invalidInclude a valid collection timestamp in ISO 8601 format
Consent Collection Details ValidationINVALID_REQUEST400 BAD REQUESTcollectionDetails are not validConsent collection details are missing or invalidProvide complete and valid collection details
Agent Object Requirement with PPD ConsentINVALID_REQUEST400 BAD REQUESTagent object is required with PPD consentPPD consent requires agent object informationInclude agent object with all required fields when using PPD consent

Customer Object Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Identifier Validation
Missing Required IdentifiersINVALID_REQUEST400 BAD REQUESTcustomer should contain hsid, enterpriseId or metadataRequired customer identifiers are missingInclude at least one of hsid, enterpriseId, or metadata in the customer object
Invalid Enterprise IDINVALID_REQUEST400 BAD REQUESTinvalid enterpriseIdEnterprise ID is not all digitsEnsure enterpriseId contains only numeric digits
Invalid HSIDINVALID_REQUEST400 BAD REQUESTinvalid hsidHSID is not a valid UUIDProvide a valid UUID format for the hsid
Customer Not found for given Enterprise IdNOT_FOUND404 NOT FOUNDCustomer not found for given enterpriseIdNo customer found for the provided enterpriseIdVerify the enterpriseId is correct and exists in the system
Metadata Validation
Exceeded Metadata EntriesINVALID_REQUEST400 BAD REQUESTExceeded the max number of entries in metadata. Max 20Metadata has more than 20 entriesReduce the number of metadata entries to 20 or fewer
Metadata Key Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata key size bigger than: 40Metadata key exceeds 40 charactersEnsure all metadata keys are 40 characters or less
Metadata Value Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata value size bigger than: 100Metadata value exceeds 100 charactersEnsure all metadata values are 100 characters or less
Demographics Validation
Email ValidationINVALID_REQUEST400 BAD REQUESTcustomer.email Email should be validEmail is not in valid formatProvide a valid email address format (e.g., user@example.com)
First Name Length ExceededINVALID_REQUEST400 BAD REQUESTFirst name max length is 100First name exceeds 100 charactersEnsure the first name is 100 characters or less
Last Name Length ExceededINVALID_REQUEST400 BAD REQUESTLast name max length is 100Last name exceeds 100 charactersEnsure the last name is 100 characters or less
SSN ValidationINVALID_REQUEST400 BAD REQUESTcustomer.ssnLastFour must match "^[0-9]4$"SSN last four is not 4 digitsProvide exactly 4 digits for the SSN last four
ZIP Code ValidationINVALID_REQUEST400 BAD REQUESTZip 5 must be exactly 5 digits long.ZIP code is not 5 digitsProvide exactly 5 digits for the ZIP code
Date of Birth ValidationINVALID_REQUEST400 BAD REQUESTcustomer.dateOfBirth Invalid date of birth: <value>Date of birth is not in ISO formatUse ISO 8601 format for date of birth (YYYY-MM-DD)
Country Code ValidationINVALID_REQUEST400 BAD REQUESTcustomer.phoneNumber.countryCode invalid countryCodeCountry code is not validUse a valid country code (e.g., 01, 91)
Phone Number ValidationINVALID_REQUEST400 BAD REQUESTcustomer.phoneNumber.number invalid numberPhone number is not validProvide a valid phone number format

Payment Details Object Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Payment Details Validation
Payment Details Not ValidINVALID_REQUEST400 BAD REQUESTpayment details are not validWhen Qualified Amount is either missing or nullInclude a valid qualified amount in the payment details
Qualified + Vision Amount Exceeds Total AmountINVALID_REQUEST400 BAD REQUESTdetails qualified amount + vision amount cannot be greater than amountWhen the sum of qualified amount and vision amount exceeds the total amountEnsure the sum of qualified and vision amounts is less than or equal to the total amount
Prescription Amount Exceeds Qualified AmountINVALID_REQUEST400 BAD REQUESTdetails prescription amount cannot be greater than qualified amountWhen prescription amount is greater than qualified amountEnsure prescription amount is less than or equal to qualified amount

Payment Object Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Payment Object Validation
Partial Authorization Not AllowedINVALID_REQUEST400 BAD REQUESTPartial authorization not allowed for authorizeCard = falseWhen sending a request with partialAuthorization=true, authorizeCard=false, and a card included in the requestSet authorizeCard=true when using partialAuthorization=true
Statement Descriptor Suffix InvalidINVALID_REQUEST400 BAD REQUESTpayment.statementDescriptorSuffix only allows alphanumeric, space, hyphen and dot with at least one letter and allowed maximum length is 10When statement descriptor suffix is invalidUse only alphanumeric characters, spaces, hyphens, and dots in the suffix; include at least one letter; and keep it under 10 characters
Invalid AmountINVALID_REQUEST400 BAD REQUESTInvalid amount ${validatedValue}, it must be between 1 and 99999999 and not contain decimalsWhen amount format is invalidEnsure amount is a whole number between 1 and 99999999 and does not contain decimals
Exceeded Metadata EntriesINVALID_REQUEST400 BAD REQUESTExceeded the max number of entries in metadata. Max 20When exceeding the maximum number of metadata entriesReduce the number of metadata entries to 20 or fewer
Metadata Key Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata key size bigger than: 40When a metadata key exceeds maximum allowed lengthEnsure metadata keys are 40 characters or less
Metadata Value Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata value size bigger than: 100When a metadata value exceeds maximum allowed lengthEnsure metadata values are 100 characters or less
Merchant Transaction ID RequiredINVALID_REQUEST400 BAD REQUESTmerchantTransactionId is requiredWhen merchant transaction ID is missing in the payment objectInclude a unique merchantTransactionId in the payment request
Customer RequiredINVALID_REQUEST400 BAD REQUESTCustomer is requiredWhen customer object is missingInclude the customer object with appropriate identifiers in the request

Payment Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Consent RequirementINVALID_REQUEST400 BAD REQUESTConsent is required!When a ACH payment is initiated without the required consent informationInclude a valid consent object with all required fields for ACH Payments
VendorPaymentMethodId ReuseINVALID_REQUEST400 BAD REQUESTVendorPaymentMethodId cannot be reused.When attempting to use a vendor payment method ID that has already been usedUse a unique vendor payment method ID that hasn't been used before
Payment Method Not FoundNOT_ACCEPTABLE406 NOT ACCEPTABLEPayment Method not foundWhen the requested payment method cannot be found in the systemVerify the payment method ID is correct and exists for the customer
Payment Method Authorization FailedNOT_ACCEPTABLE406 NOT ACCEPTABLEPayment method could not be authorized. Please try a different payment method.When the payment method cannot be authorized for the transactionTry a different payment method or check with the customer about potential issues with their payment method
Payment Method Type Not ConfiguredNOT_ACCEPTABLE406 NOT ACCEPTABLEPayment method type is not configured.When the payment method type is not configured for the merchantContact support to ensure your merchant account is configured for the payment method type you're trying to use
Payment Already ProcessedINVALID_REQUEST400 BAD REQUESTPayment already processed or in process for given transactionIdWhen attempting to process a payment with merchant transaction id that is already processed or currently being processedUse a unique merchant transaction ID for each payment request
Maximum Retries ReachedPAYMENT_ERROR403 FORBIDDENPayment failed after maximum retriesWhen the maximum number of payment retry attempts has been reachedCreate a new payment transaction or contact support for assistance
Payment Information Not FoundNOT_FOUND404 NOT FOUNDPayment information not found.When the requested payment information cannot be found in the system or when the payment is not associated to the merchantVerify the payment ID is correct and belongs to your merchant account
Missing Merchant Transaction ID in GetPayment CallINVALID_REQUEST400 BAD REQUESTRequired query parameter 'merchantTransactionId' is not present. Please review API specs https://docs.healthsafepay.com/api-reference/When the merchantTransactionId is missing from the requestInclude the merchantTransactionId as a query parameter in your request

Stripe Payment Processing Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Card Authentication ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEThis card requires an additional security step to be performed by the customer. Please have the customer enter the card via text or email; otherwise, have the customer provide a different payment method.When card requires 3D Secure authentication in agent sessionGuide the customer to complete the card entry via SMS or email where 3D Secure can be handled, or request an alternative payment method.
NOT_ACCEPTABLE406 NOT ACCEPTABLEPayment method could not be authorized. This payment method requires authentication from a customer.When card requires 3D Secure authentication in agent sessionGuide the customer to complete the card entry via SMS or email where 3D Secure can be handled, or request an alternative payment method.
Card Decline ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEThe card was declined for an unknown reason. Contact issuer for more information.Card declinedAdvise the customer to contact their card issuer to determine the reason for the decline, or use an alternative payment method.
NOT_ACCEPTABLE406 NOT ACCEPTABLEAn error occurred while processing the card, please try again.Generic processing errorAttempt the transaction again. If the issue persists, request a different payment method from the customer.
NOT_ACCEPTABLE406 NOT ACCEPTABLEPayment method could not be authorized. Please try a different payment method.General payment authorization failureRequest that the customer provide an alternative payment method.
NOT_ACCEPTABLE406 NOT ACCEPTABLEPayment method is canceled by a customer or expired by the financial partnerCard no longer validAsk the customer to update their card information or provide a new payment method.
Card Validation ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEThe CVC number is incorrect.Invalid CVCPrompt the customer to re-enter the correct CVC for their card.
NOT_ACCEPTABLE406 NOT ACCEPTABLEThe card has expired.Expired cardRequest that the customer provide a card that has not expired.
Financial Limit ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEThe customer's account has insufficient funds to complete the purchase. Please use an alternative payment method.Insufficient funds error (specific to payments)Advise the customer to use a different payment method or to fund their account before attempting the transaction again.
NOT_ACCEPTABLE406 NOT ACCEPTABLEThe customer has exceeded the balance, credit limit, or transaction amount limit available on their card. Contact issuer for more information.Card limit exceeded (specific to payments)Suggest that the customer contact their card issuer regarding their limits, or use a different payment method.
Bank Account ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEThe customer's bank account has been closed.Account closedInform the customer that the bank account has been closed and request an alternative payment method.
NOT_ACCEPTABLE406 NOT ACCEPTABLEThe customer's bank account could not be located.Account not foundVerify the bank account details with the customer and correct any errors, or request an alternative payment method.
Early Warning System ErrorsNOT_ACCEPTABLE406 NOT ACCEPTABLEearlyWarningMessageEarly warning system validation errorReview the specific early warning message and take appropriate action based on the warning type. This may require additional verification or an alternative payment method.

Refund Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Refund Amount ValidationINVALID_REQUEST400 BAD REQUESTRefund amount cannot be more than the un-refunded amount of the original paymentWhen attempting to refund more than the available amountEnsure refund amount is less than or equal to the available (un-refunded) amount
INVALID_REQUEST400 BAD REQUESTWhen paymentMethodId is present, amount is requiredWhen using paymentMethodId without specifying an amountInclude a valid amount when using paymentMethodId
Payment Status ValidationPAYMENT_ERROR400 BAD REQUESTCannot issue refund for this paymentWhen attempting to refund a payment not in COMPLETED statusOnly attempt to refund payments that are in COMPLETED status
Payment Status ValidationINVALID_REQUEST400 BAD REQUESTCannot issue refund for this paymentWhen attempting to refund for disputed fraudulent transactionDisputed fraudulent transactions cannot be refunded
INVALID_REQUEST400 BAD REQUESTRefunds can only be processed for captured paymentsWhen attempting to refund a payment in AUTHORIZED statusCapture the payment before attempting to refund it or cancel the payment if not required.
INVALID_REQUEST400 BAD REQUESTThe amount given exceeds the allowed refund limitWhen attempting to issue Credit beyond allowed refund limitReduce the refund amount to be within the allowed limit
Payment Identifier ValidationINVALID_REQUEST400 BAD REQUESTpaymentId or paymentMethodId is requiredWhen neither paymentId nor paymentMethodId is providedInclude either paymentId or paymentMethodId in the request
INVALID_REQUEST400 BAD REQUESTEither paymentId or paymentMethodId should be provided. The request has both paymentId and paymentMethodIdWhen both paymentId and paymentMethodId are providedUse either paymentId or paymentMethodId, not both
INVALID_REQUEST400 BAD REQUESTWhen paymentMethodId is present, customer should contain hsid, enterpriseId or metadataWhen customer identifiers are missing with paymentMethodIdInclude customer identifiers when using paymentMethodId
Payment Method Status ValidationINVALID_REQUEST400 BAD REQUESTPayment method is canceled by a customer or expired by the financial partnerWhen attempting to refund using an invalid payment methodUse only valid, active payment methods for refunds
INVALID_REQUEST400 BAD REQUESTCredit is not allowed for bank accounts.When attempting to refund to a bank account payment methodUse card payment methods for unlinked refunds/credits
INVALID_REQUEST400 BAD REQUESTInvalid paymentMethodIdWhen attempting to issue Credit for Invalid or Deleted Payment MethodUse only valid, active payment methods for refunds
Payment Dispute ValidationINVALID_REQUEST400 BAD REQUESTPayment is in dispute and not available for refundWhen attempting to refund a payment that is in disputeRefunds are not applicable for payments where the merchant has lost the dispute, as the customer has already received the funds through the dispute resolution process.
Refund Already ExistsINVALID_REQUEST400 BAD REQUESTThis payment is already refundedWhen attempting to create a refund on already completed paymentIf the payment has already been fully refunded, additional linked refunds are not allowed. To provide more funds to the customer, issue a credit using a valid payment method.
Refund Already Exists (merchantTransactionId)INVALID_REQUEST400 BAD REQUESTRefund already exists for the given merchantTransactionIdWhen attempting to create a refund with a duplicate merchantTransactionIdProvide a unique merchantTransactionId for every refund transaction

Checkout Session Authorization Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Checkout Session AuthorizationFORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using completed sessionAttempting to save payment method with a completed checkout sessionCreate a new session for saving payment methods; completed sessions cannot be reused
FORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using PAYMENT modeAttempting to save payment method when session is in payment modeUse PAYMENT_METHOD_ENTRY or WALLET or PAYMENT_WITH_WALLET mode for saving payment methods
FORBIDDEN403 FORBIDDENAccess denied when attempting to poll setup payment method using PAYMENT modeAttempting to poll for setup status when session is in payment modeUse PAYMENT_METHOD_ENTRY or WALLET or PAYMENT_WITH_WALLET mode for saving payment methods
FORBIDDEN403 FORBIDDENAccess denied when attempting to save payment method using cancelled sessionAttempting to save payment method with a cancelled checkout sessionCreate a new session; cancelled sessions cannot be reused
FORBIDDEN403 FORBIDDENNot allowed to access this sessionWhen merchant2 tries to access a session initiated by merchant1Use the same merchant credentials that were used to create the session

Config Object Error Codes

Location
Error Code Summary
Error Title ReferenceError & StatusDetail MessageScenarioResolution
Config Parameter Validation
saveDisabled/paymentMethodSaveMode not supported in [modes]INVALID_REQUEST 400 BAD REQUESTInvalid Request. Request parameter saveDisabled or paymentMethodSaveMode not supported in Mode: [modes]When sending a request with saveDisabled=true or paymentMethodSaveMode specified, and mode contains fallback-not-possible modesRemove saveDisabled or paymentMethodSaveMode parameters when using non-supported modes
Payment Method ID required for PAYMENT_METHOD_DISPLAYINVALID_REQUEST 400 BAD REQUESTPayment Method ID is required for mode - PAYMENT_METHOD_DISPLAYWhen sending a request with PAYMENT_METHOD_DISPLAY mode but omitting the payment method IDInclude a valid payment method ID when using PAYMENT_METHOD_DISPLAY mode
saveDisabled and paymentMethodSaveMode cannot be used togetherINVALID_REQUEST 400 BAD REQUESTInvalid request: 'saveDisabled' and 'paymentMethodSaveMode' cannot be used together. Use only 'paymentMethodSaveMode'.When sending a request with both saveDisabled and paymentMethodSaveMode specifiedUse only paymentMethodSaveMode parameter, not both parameters together
Merchant name contains invalid charactersINVALID_REQUEST 400 BAD REQUESTconfig.merchant.name Merchant name contains invalid charactersWhen the merchant name in the config object contains unsupported characters (only alphanumeric, space, hyphen, and dot)Use only alphanumeric characters, spaces, hyphens, and dots in the merchant name
Merchant name must not be blankINVALID_REQUEST 400 BAD REQUESTconfig.merchant.name Merchant name must not be blankWhen the merchant name in the config object is blank or not providedProvide a non-empty merchant name in the config object
Merchant name character limitINVALID_REQUEST 400 BAD REQUESTconfig.merchant.name Merchant name must be less than or equal to 80 charactersWhen the merchant name in the config object exceeds 80 charactersEnsure merchant name is 80 characters or less
Invalid modeINVALID_REQUEST 400 BAD REQUESTInvalid modeWhen providing an invalid session modeUse one of the supported session modes (PAYMENT, PAYMENT_WITH_WALLET, WALLET, etc.)
Invalid PaymentMethodChannelINVALID_REQUEST 400 BAD REQUESTInvalid PaymentMethodChannelWhen providing an invalid payment method channelUse one of the supported payment method channels
Payment method type is not configuredINVALID_REQUEST 400 BAD REQUESTPayment method type is not configured.Payment method type is missing or not configured for the merchant during session creationEnsure the payment method type is configured for your merchant account
You have no capture methods availableINVALID_REQUEST 400 BAD REQUESTYou have no capture methods available.No available channels for configured payment methods (e.g., merchant configuration or session error)Contact support to enable appropriate capture methods for your account
config.privacyPolicyUrl must be a valid URLINVALID_REQUEST 400 BAD REQUESTconfig.privacyPolicyUrl must be a valid URLWhen privacyPolicyUrl in config is not a valid URLProvide a valid, properly formatted URL for the privacy policy
Session Mode not applicable for guest checkoutINVALID_REQUEST 400 BAD REQUESTSession Mode not applicable for guest checkout!When a session mode is not allowed for guest checkout (WALLET, PAYMENT_METHOD_SELECT, PAYMENT_METHOD_ENTRY, PAYMENT_WITH_WALLET)For guest checkout, use only supported modes like PAYMENT or PAYMENT_METHOD_DISPLAY
Invalid Card Category typeINVALID_REQUEST 400 BAD REQUESTInvalid card category type config.cardCategories.typeWhen a card categories type is not given as Merchant configured type ( ex: MANUFACTURER_CARD )Use only merchant-configured card category types
More than 100 medicationsINVALID_REQUEST 400 BAD REQUESTMaximum of 100 medications allowed in cardCategories[].medicationWhen a card categories medication having a more than 100 medicationsLimit medications to 100 per card category
Card Categories given but Medication not providedINVALID_REQUEST 400 BAD REQUESTMedications cannot be empty in cardCategories[].medicationsWhen a Card Categories given as Manufacturer card, medication should have to be providedProvide at least one medication in cardCategories[].medications
More than 100 char in cardCategories.labelINVALID_REQUEST 400 BAD REQUESTCategory label cannot exceed 100 charactersWhen a Card Categories label consisting more then 100 charactersLimit card category label to 100 characters or less
More than 100 char or empty string in medication.valueINVALID_REQUEST 400 BAD REQUESTMedication value cannot be empty and maximum allowed length is 100When a Card Categories medication label consisting more then 100 charactersProvide a non-empty medication value of 100 characters or less
More than 100 char or empty string in medication.labelINVALID_REQUEST 400 BAD REQUESTMedication label cannot be empty and maximum allowed length is 100When a Card Categories medication value consisting more then 100 charactersProvide a non-empty medication label of 100 characters or less

Sessions API Error Codes

Location
Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Session Controller Validation
Card WS2 check has failedINVALID_REQUEST400 BAD REQUESTCard WS2 check has failed.WS2 verification of agent information (e.g., MSID) failed during session creationEnsure agent userid is part of PCI_WorkStation group
Session Id not foundNOT_FOUND404 NOT FOUNDSession Id not foundWhen requesting a session that doesn't existCheck that the session ID is correct and the session has been created
Your session has been canceledSESSION_CANCELED410 GONEYour session has been canceledWhen requesting a canceled sessionCreate a new session; canceled sessions cannot be reused
Your session is no longer validSESSION_TIMEOUT401 UNAUTHORIZEDYour session is no longer validWhen requesting an expired sessionCreate a new session; expired sessions cannot be reused
Not allowed to access this sessionFORBIDDEN403 FORBIDDENNot allowed to access this sessionWhen merchant ID in request doesn't match the session's merchant IDUse the same merchant credentials that were used to create the session
Customer Identifier is MissingINVALID_REQUEST400 BAD REQUESTCustomer identifier is missingWhen customer identifier is not provided for session modes: PAYMENT_METHOD_ENTRY, WALLET, PAYMENT_METHOD_SELECT, PAYMENT_METHOD_DISPLAYInclude a valid customer identifier (hsid, enterpriseId, or metadata)
Consent is requiredINVALID_REQUEST400 BAD REQUESTConsent is required!When consent is missing in PAYMENT modeInclude a valid consent object with the required fields
payment is requiredINVALID_REQUEST400 BAD REQUESTpayment is requiredWhen payment object is missing for session modes: PAYMENT, PAYMENT_WITH_WALLETInclude a valid payment object with the required fields