Skip to content

Error Handling Guide

This section elaborates on the error codes returned by our API endpoints, aiming to equip developers with the knowledge needed to build resilient applications that gracefully handle errors, thus ensuring a seamless user experience.

Understanding HTTP Status Codes

Our API adheres to standard HTTP status codes to signify the outcome of an API request. Familiarity with these codes is crucial for effective error handling:

  • 200 OK: The request was successful.
  • 201 Created: The request was successful, and a new resource was created.
  • 204 No Content: The request was successful but does not return any content.
  • 400 Bad Request: The server could not process the request due to invalid syntax. Check your request format and retry.
  • 401 Unauthorized: The request lacks valid authentication for the target resource. Ensure that your authentication credentials are correct and have the necessary permissions.
  • 403 Forbidden: The server understood the request but refuses to authorize it. Verify your account's permissions and scopes.
  • 404 Not Found: The requested resource could not be found. Ensure the resource exists and your request URL is correct.
  • 409 Conflict: Request conflict with the current state of the target resource.
  • 429 Too many requests: Too Many Request, API rate limit exceeded, please try after sometime.
  • 500 Internal Server Error: The server encountered an unexpected condition. If this error persists, please contact our support team.
  • 503 Service Unavailable: The server is currently unable to handle the request due to temporary overloading or maintenance. Retry the request after some time.

Custom Error Codes and Resolutions

To further assist in diagnosing issues, our API provides detailed custom error codes alongside HTTP status codes:

HTTP Status CodeError CodeMessageSuggested Action
4004000001Invalid partnerIdVerify the partnerId parameter for correctness.
4004000002Missing purchaseRefEnsure the purchaseRef parameter is included in the request.
4004000003Missing csuIdInclude the csuId parameter in your request.
4004000004Invalid request dataReview and correct your request payload.
4004000005Unsupported product IDCheck if the product ID is valid and supported.
4004000006Unable to get user data for given csuIdEnsure the csuId is correct and the user exists.
4004000007Activation link already redeemedCreate a new activation link as the current one has already been redeemed.
4004000008Activation link was cancelledCreate a new activation link as the current one has already been cancelled.
4014010001Missing Auth TokenInclude a valid authentication token in your request header.
4014010002Invalid/Expired Auth TokenCheck the token's validity or refresh it before retrying.
4014010003Jwt not decodableEnsure the JWT is correctly formatted and encoded.
4014010004Missing jwt header with key idInclude the JWT header with the key ID in your token.
4014010005Jwt Unknown ErrorVerify the JWT's structure and encoding; contact support if the issue persists.
4094090001Purchase reference not uniqueEnsure that the purchaseRef is unique.
4294290001Too many requests, please retry after some timeEnsure that the next subsequent call is not immediate.
4034030001Auth Token missing required scopeEnsure your token has the necessary scopes for this operation.
4044040001Resource Not FoundDouble-check the requested resource's existence and ID.
5005000001Internal Server ErrorIf this error persists, contact our technical support team.
5005000002Unable to get user e-mail addressVerify the user's information and try again.
5005000003Invalid productIdCheck the productId for correctness and validity.
5005000004Unable to find product for given productIdEnsure the productId is correct and exists in the product catalog.
5005000005Purchase creation failedReview the purchase details and try again.

Note:

  • For 400 Bad Request errors, reviewing the request's structure and parameters is often the key to resolution.
  • 401 Unauthorized and 403 Forbidden statuses typically indicate issues with authentication or authorization; verify your credentials and permissions accordingly.
  • 429 Too Many Requests errors suggest exceeding the API rate limit; consider implementing rate limiting on your end to prevent this.
  • Persistent 500 Internal Server Error occurrences necessitate direct communication with our support to identify and resolve underlying issues.

Support

For additional guidance or support, please refer to our Developer Guides or contact our Support Team.