Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fype.dev/llms.txt

Use this file to discover all available pages before exploring further.

Exhaustive Error Code Catalog

Fype uses standardized error codes to help you programmatically handle issues. All errors include an error_code, a message, and an optional details array.

Client Errors (4xx)

Error CodeHTTP StatusDescriptionRecommended Action
VALIDATION_ERROR422Input validation failed (e.g., invalid email format).Check the details field for specific field errors.
IDEMPOTENCY_CONFLICT409Idempotency-Key reused with different parameters.Use a unique key per intent, or identical params for retries.
CONFLICT409Resource already exists (e.g. signup with existing email).Use a different unique identifier or login.
API_KEY_REVOKED401The API key has been deleted/revoked.Generate a new key in the dashboard.
API_KEY_INVALID401The API key provided does not exist.Double-check the key in your dashboard.
MISSING_AUTH401Authorization header is required.Include Authorization: Bearer <key> header.
INVALID_CREDENTIALS401Incorrect email or password during dashboard login.Check your credentials.
MERCHANT_NOT_FOUND401Merchant account associated with key doesn’t exist.Contact support.
INVALID_TOKEN401Dashboard JWT session is invalid or expired.Log out and log back in to the dashboard.
FORBIDDEN403You do not have access to this resource.Verify you are using the correct merchant context.
NOT_FOUND404The resource (Payment, Refund, etc.) was not found.Verify the ID in your request.
GONE410The resource (e.g., Checkout Session) has expired.Initiate a new payment request.
RATE_LIMIT_EXCEEDED429Too many requests sent in a short period.Implement exponential backoff.
INVALID_CURSOR400The pagination cursor provided is invalid or malformed.Ensure you are passing the exact next_cursor from the previous response.
BAD_REQUEST400Generic bad request or malformed payload.Check your JSON structure and required fields.

Server Errors (5xx)

Error CodeHTTP StatusDescriptionRecommended Action
INTERNAL_ERROR500An unexpected error occurred on Fype servers.Retry the request after a few seconds.
GATEWAY_ERROR502The payment provider (Razorpay) returned an error.Check the error message for details from the provider.

SDK Mapping

If you are using our SDKs, these errors are raised as typed exceptions:

Node.js

  • FypeAuthenticationError (401)
  • FypeInvalidRequestError (400, 422, 404, 409)
  • FypeApiConnectionError (500, 502, timeouts)
  • FypeError (Generic fallback)

Python

  • AuthenticationError (401)
  • InvalidRequestError (400, 422, 404, 409, 410)
  • ApiConnectionError (500, 502, timeouts)
  • FypeError (Generic fallback)

Webhook Verification Errors

If signature verification fails on your server, the SDK will throw a:
  • Node.js: FypeSignatureVerificationError
  • Python: SignatureVerificationError
This usually means your Webhook Secret (whsec_...) is mismatched or you are not passing the raw request body for verification.