Skip to main content

Error Codes

When a GStable API request fails, even if the HTTP status code returns 200 OK, the code field in the response body will contain a non-zero error code.

This page lists all predefined business error codes to help you handle exceptions programmatically.

Error Response Structure

As described in the Introduction, you need to check the code in the JSON response.

{
"code": 100203,
"message": "Session is expired",
"data": null
}

Dynamic Error Messages

The message field is usually a fixed error description, but in some validation errors, it may contain specific context information in the format Error Description: Specific Info.

For example:

  • Standard Message: "Invalid field format"
  • Detailed Message: "Invalid field format: email is required"
Best Practice

Do not write business logic by parsing the message string, as the text may be adjusted. Always use the code (error code) for program flow control.


1. Payment Flow Errors (Payment Flow)

Business logic errors involving Payment Links, Checkout Sessions, and Products.

CodeMessageDescription & Cause
100101Payment link not foundThe specified Payment Link ID does not exist.
100102Payment link is archivedThe payment link has been archived and cannot be accessed or modified again.
100103Payment link is not activeThe payment link has been disabled.
100104Invalid payment link versionThe requested link version is not supported.

Checkout Session (1002XX)

CodeMessageDescription & Cause
100201Session not foundThe specified Checkout Session ID does not exist.
100202Session client key is invalidThe provided Client Key failed validation.
100203Session is expiredThe session has expired (default 30 minutes) and payment cannot proceed.
100204Session is paidThe session has already been paid and cannot be paid again.
100205Session is cancelledThe user or merchant actively cancelled the session.
100206Session payer mismatchThe actual payer does not match the session's preset payer information.
100207Receipt not foundThe transaction receipt for the session could not be found.
100208Payment session is not completedAttempted to query results while the session payment is not yet completed.
100209Onchain transaction not foundThe associated transaction hash could not be traced on the blockchain.
100210Session lock failedThe session is currently locked by another process. Please retry later.
100211Session is not cancellableThe session cannot be cancelled in its current state.

Product Management (1003XX)

CodeMessageDescription & Cause
100301Product not foundThe specified Product ID does not exist.
100302Product partial missingSome product IDs in a batch operation do not exist.
100303Product partially unavailableSome products in a batch operation are unavailable.
100304Product is not activeThe product is not active and cannot be used to create links or sessions.
100305Product has been usedThe product has been linked/used and certain modifications cannot be performed.
100306Product has been removedThe product has been logically deleted.

2. Integration & Configuration Errors (Integration)

Errors involving API Key authentication and Webhook configuration.

API Key (2001XX)

CodeMessageDescription & Cause
200101API key not foundKey not provided in Request Header or Key does not exist.
200102API key is rotatingThe Key is currently rotating and temporarily unavailable.
200103API key is revokedThe Key has been revoked, please generate a new Key.
200104Invalid expired timeThe expiration time setting for the Key is invalid.
200105API key limit reachedThe number of API Keys generated for the account has reached the limit.
200106API key is not activeThe API Key is not in an active state.

Webhook (2002XX)

CodeMessageDescription & Cause
200201Webhook not foundThe specified Webhook ID does not exist.
200202Failed to ping webhookFailed to test send Webhook, please check if the target URL is reachable.
200203Webhook limit reachedThe number of Webhook Endpoints has reached the limit.

3. User & Account Errors (User & Account)

Errors involving merchant login, account status, and report queries.

Authentication & Status (3001XX - 3002XX)

CodeMessageDescription & Cause
300101Invalid sign inInvalid login credentials.
300102Authentication check failedTwo-factor authentication or security check failed.
300201User not foundUser does not exist.
300202User is blockedUser has been blocked and cannot perform operations.

Account Configuration (3003XX)

CodeMessageDescription & Cause
300301Account is not foundMerchant account does not exist.
300302Account is removedMerchant account has been removed.
300303Account address already existsThe collection address attempted to be added already exists.
300304Unsupported settlement token of the accountThe account does not support this settlement token configuration.
300305Account count limit reachedThe number of accounts has reached the system limit.
300306At least one account is requiredOperation failed because at least one account must remain.

Report Query (3004XX)

CodeMessageDescription & Cause
300401Report not foundThe requested report does not exist.
300402Report is duplicatedDuplicate creation of the same report task.
300403Report has no data in the time rangeNo data available to generate report within the specified time range.
300404Report data count is too largeThe amount of requested data is too large, please shorten the query time range.

4. Common & Validation Errors (Common)

Request parameter format validation and unsupported channel errors.

CodeMessageDescription & Cause
400101Invalid field formatParameter format error (e.g., illegal email, URL, or number).
400201Unsupported currencyThe requested currency is not in the GStable supported list.
400202Unsupported channelThe requested blockchain channel or network is not supported.
400203Settlement capabilities not foundThe system could not find valid settlement capabilities for this configuration.
400301Stat not foundThe requested statistical data does not exist.

5. Platform System Errors (Platform)

Errors involving system rate limiting, database, and internal exceptions.

CodeMessageDescription & Cause
900101Too many requestsRequest frequency exceeded quota (QPS limit). Suggest implementing backoff retry.
900201Failed to create recordDatabase write failed.
900202Failed to update recordDatabase update failed.
900203Failed to query recordDatabase query failed.
900301Image processing failedImage upload or processing failed.
999999Internal system errorUnknown internal system error. Please contact the GStable support team and provide the Trace ID.