Skip to main content

Overview

In sandbox only, POST /transactions can return a predefined error response without creating a transaction. Use this to test how your system behaves when monitoring is unavailable, times out, or rejects the request.
These triggers are ignored in production. A production organization always follows the normal create path, even if you send a simulation externalId or metadata code.

How it works

  1. Authenticate with an API key for a sandbox organization.
  2. Call POST /transactions with either:
    • externalId starting with SIMULATE-ERROR-, or
    • metadata.sandboxErrorCode (canonical) or metadata.error_code (alias).
  3. Gu1 returns the matching HTTP status and body immediately (or after a short capped delay for timeout). Nothing is written to transactions.

Code selection priority

  1. metadata.sandboxErrorCode (if present and recognized)
  2. metadata.error_code (if present and recognized)
  3. Suffix after SIMULATE-ERROR- in externalId (for example SIMULATE-ERROR-TIMEOUT)
Unrecognized codes return 400 with error.code UNKNOWN_SANDBOX_ERROR_CODE and the list of valid codes.

Catalog

Useful aliases

You may use short aliases in the suffix or metadata: TIMEOUT, UNAVAILABLE, 500, 504, 429, 409, 403, VALIDATION, DUPLICATE, QUOTA, INTERNAL_ERROR, FAILED_TO_CREATE.

Examples

Timeout (availability / no timely response)

Choose the error with metadata

Alias (same effect in sandbox):

Example 504 body

Scope

  • Applies only to single POST /transactions. Batch create endpoints are not covered.
  • Auth / permission failures (401 / 403 from middleware) are not simulated here β€” use an invalid key or role if you need those.
  • Successful creates (201) are unchanged; this feature only simulates errors.