Toucan API Error Handling

If the Toucan API fails, you'll receive an error in the format of the following example:

{

 "errorDetails": {

   "reason": "CardEligibilityError",

   "message": "This card is not eligible for network tokenization."

 }

}

HTTP Response Codes

What Toucan API endpoint you call determines the types of HTTP response codes you can potentially receive. This table outlines the types of errors you can receive:

EndpointHTTP Response Codes
/tokenize201, 400, 401, 429, 500, 503
/transact200, 401, 404, 429, 500, 503
/status200, 401, 404, 429, 500, 503
/account200, 401, 404, 429, 500, 503
/asset200, 401, 404, 429, 500, 503
/resume200, 400, 401, 404, 429, 500, 503
/suspend200, 400, 401, 404, 429, 500, 503
/delete200, 400, 401, 404, 429, 500, 503

API Error Details

HTTP Response CodeerrorDetails reasonerrorDetails messageRecommended Action
400InvalidPropertyA property validation check has failed.Re-submit your request after correcting the input
400InvalidInputThe tokenization service could not find data linked with provided input.Check your Token Reference Id or Asset UUID; if you can't identify an issue, contact your Pagos account manager
400InvalidRequestThe tokenization service could not validate the request.Review the error JSON object for more details
400UnavailableMerchantAccountThe merchant account is not available.Contact your Pagos account manager
400CardEligibilityErrorThe card is not eligible for network tokenization.No further action required
400InvalidPanReferenceFormatThe PAN reference format is invalid.Contact your Pagos account manager
400InvalidPanReferenceThe requested PAN could not be found.Contact your Pagos account manager
400InvalidTokenReferenceFormatThe token reference format is invalid.Re-submit your request after correcting the input
400InvalidMerchantStatusThe merchant account is in an invalid status for the requested operation.Contact your Pagos account manager
400NoActiveTokensThere are no active (not suspended) Tokens for the given Account PAN and consumer account.Re-tokenize the PAN
400InvalidAssetReferenceThe requested asset could not be found.Re-submit your request after correcting the input
400InvalidUuidFormatThe Uuid format is invalid.Re-submit your request after correcting the input
400InvalidPanFormatThe PAN format is invalid, or other data associated with the PAN was incorrect or entered incorrectly.Re-submit your request after correcting the input
400InvalidPanThe PAN is invalid.Re-submit your request after correcting the input
400InvalidTridThe TRID is invalid.Contact your Pagos account manager
400InvalidTridNetworkThe TRID network is invalid.Contact your Pagos account manager
400InvalidPanNetworkThe PAN network is invalid.Contact your Pagos account manager
400InvalidPanExpiryFormatThe PAN expiry format is invalid.Re-submit your request after correcting the input
400InvalidPanExpiryThe PAN expiry is invalid.Re-submit your request after correcting the input
400InvalidTokenStatusThe current token's status doesn't support the requested operation.Call /status to get Token’s current status
400ProvisionDataExpiredThe PAN information provided is considered stale.No further action required
400CardVerificationFailedInvalid payment instrument or data associated with the payment instrument.No further action required
400CardNotEligibleThis card cannot be used for tokenization at this moment.No further action required
400CardNotAllowedThe requested action is not allowed for a given PAN.No further action required
400CardDeclinedThis card is considered not eligible for tokenization at this time.No further action required
400CardExpiredCard expired.No further action required
400CardCancelledCard is cancelled.No further action required
400IssuerNotSupportedThe Issuer of the Card provided does not support provisioning for cards they issue.No further action required
400ProvisionNotAllowedFurther operations for this card are no longer allowed.No further action required
400UserLockedOutFromProvisioningUser is locked out from provisioning.Contact your Pagos account manager
400DuplicateRequestThe PAN has already been provisioned to the device or the same request is currently being processed.No further action required
401AuthenticationFailedThe tokenization service could not authenticate the request.Re-submit your request with correct credentials
404InvalidTokenReferenceThe requested token could not be found.Contact your Pagos account manager if the problem persists
404MetadataNotAvailableThe requested token's metadata is not available.Re-submit your request with a valid Token Reference ID
404AccountNotFoundAccount not found.Contact your Pagos account manager
404BatchJobNotFoundBatch job was not found.Re-submit your request with a valid Batch job ID
429concurrentLimitExceededYou exceeded the maximum allowed concurrent API calls.Keep concurrent API calls within the allowed Concurrent API Request Limits
500SystemErrorA system error occurred.Contact your Pagos account manager
503NetworkErrorThe network cannot process the request.Re-submit your request later; contact Pagos if the problem persists