DOCUMENTATION API v2

MCP Server

Connect an AI development assistant to Tyga Pay through the Model Context Protocol. Search the API reference, create and retrieve orders, inspect payment receipts, and manage checkout sessions from a compatible MCP client.

One key, one workspace, one environment

Use a separate API key and named MCP connection for every workspace and environment. Sandbox is for testing; production connects to live order infrastructure.

Connect your assistant

  1. Sign in to the developer portal, select one merchant workspace and create an API key with the order scopes your assistant needs. The key is bound to that workspace and to the selected sandbox or production environment.
  2. Use a client that supports Streamable HTTP and custom request headers. Add one uniquely named MCP server entry for each workspace/environment key. The exact settings format can vary by client.
  3. Replace the placeholders in the example with the matching keys in your client’s private configuration. If you belong to multiple workspaces, repeat the entries for each workspace. Never put keys in a prompt, repository or browser code.
  4. Choose the named connection for the workspace and environment you want to use, then connect and list the available tools. Start with search_docs, use check_order_reference before creating an order, and look up an existing order by its ID or merchant reference.
One connection per workspace and environment
{
  "mcpServers": {
    "tyga-pay-<workspace>-sandbox": {
      "url": "https://mcpapi-kj4lhbgxiq-uc.a.run.app/mcp",
      "headers": {
        "x-api-key": "YOUR_SANDBOX_KEY_FOR_THIS_WORKSPACE"
      }
    },
    "tyga-pay-<workspace>-production": {
      "url": "https://mcpapi-rdqehkur6a-uc.a.run.app/mcp",
      "headers": {
        "x-api-key": "YOUR_PRODUCTION_KEY_FOR_THIS_WORKSPACE"
      }
    }
  }
}

The portal environment selector is used when you create the key. Your MCP client switches environments by selecting the corresponding named connection; no tenant or environment switch parameter is accepted by the API.

OAuth login connections are not supported in this release. A client that only accepts an OAuth server URL cannot use this API-key connection. Browser origins are rejected.

Available tools

search_docsRead only
Search the merchant API reference and error guidance. Requires a valid key with an order scope.
check_order_referenceorders_read
Check whether a merchant reference is already used in the selected workspace and environment. This is a read-only preflight; the final order creation still needs idempotency.
get_orderorders_read
Retrieve an order belonging to your merchant using exactly one of orderId or merchantReference.
get_checkout_sessionorders_read
Read session status and timestamps by sessionId. Checkout URLs and bearer tokens are never returned.
get_order_payment_historyorders_read
Read payment status and canonical transaction receipt records for an order. Results are paged with nextCursor; this is on-chain transaction evidence, not an invoice or tax document.
create_orderorders_write
Create a USD order in the selected workspace and environment. Supply an order object and a stable idempotencyKey. Item totals must reconcile to amountMinor; items may be empty, and optional successUrl/cancelUrl values must be registered for the merchant.
cancel_orderorders_write
Cancel an active order that is not fully paid. This does not refund or reverse payment; any funds already received are marked for review.
create_checkout_sessionorders_write
Create a checkout link using orderId and idempotencyKey. Optional expiresAt must remain within the order expiry.
revoke_checkout_sessionorders_write
Disable a checkout link using sessionId. This does not cancel an order or refund a payment.

Keep control of changes

Require your assistant to ask before creating orders, cancelling orders, or creating and revoking checkout links. MCP tool annotations describe the action; your client controls approval prompts.

Use a dedicated, minimally scoped key. Every request rechecks the key’s workspace, environment and merchant access. A key cannot read another workspace’s data or switch environments. Existing IP restrictions and rate limits apply. Revoking a key blocks subsequent requests.

If you belong to multiple workspaces, create a separate key and named MCP connection for each one. Do not share a key between workspaces or environments.

Reuse the same idempotency key and unchanged arguments when retrying a creation request. Checkout URLs are bearer secrets: only share them with the intended customer. Tool results may be retained by your AI client.

This release cannot execute payments, manage API keys or access Vault operations. An open order is not proof of payment.

Authentication · Retries and idempotency