Skip to main content
TR

Transbank

v0.2.0-alpha.1API Keyalpha

Chile's dominant card acquirer โ€” state-origin roots, effectively default for Chilean commerce. Webpay Plus (single payments) + Webpay OneClick Mall (stored-card recurring). Prerequisite for any LatAm-coverage claim that includes Chile.

19 tools3 env vars๐Ÿ‡จ๐Ÿ‡ฑ Chilealpha โ€” pending validation

Install

terminal
$ npm install @codespar/mcp-transbank@alpha

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "transbank": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-transbank@alpha"
      ],
      "env": {
        "TRANSBANK_COMMERCE_CODE": "<your_transbank_commerce_code>",
        "TRANSBANK_API_KEY_SECRET": "<your_transbank_api_key_secret>"
      }
    }
  }
}

After restart, your agent can call any of the 19 tools below โ€” try webpay_create_transaction first.

Environment variables ยท 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

TRANSBANK_COMMERCE_CODE
required

Transbank merchant commerce code (sent as Tbk-Api-Key-Id header)

TRANSBANK_API_KEY_SECRET
requiredsecret

Transbank API secret key (sent as Tbk-Api-Key-Secret header)

TRANSBANK_ENV
optional

Environment: 'integration' (default, https://webpay3gint.transbank.cl) or 'production' (https://webpay3g.transbank.cl)

Available tools ยท 19

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

WRITEwebpay_create_transaction
Create a Webpay Plus transaction. Returns { token, url } โ€” redirect the user to url?token_ws=<token> to complete payment. After the user returns to return_url, call webpay_commit_transaction.
READwebpay_commit_transaction
Commit a Webpay Plus transaction after the user has returned from the Webpay flow. Must be called to actually charge the card.
READwebpay_get_transaction_status
Get the current status of a Webpay Plus transaction by token.
DELETEwebpay_refund_transaction
Refund a committed Webpay Plus transaction. Full refund if amount equals original; partial otherwise.
READwebpay_increase_amount
Capture a previously authorized Webpay Plus transaction (partial-capture / deferred-capture flow).
WRITEwebpay_capture_transaction
Deferred-capture for a previously authorized Webpay Plus transaction. Uses the official PUT /capture endpoint โ€” prefer this over webpay_increase_amount for standard deferred-capture flows.
WRITEwebpay_mall_create_transaction
Create a Webpay Mall transaction โ€” one parent buy_order split across several seller commerce codes. Returns { token, url } exactly like Webpay Plus. Each details entry is a child charge with its own commerce_code, buy_order, and amount.
READwebpay_mall_commit_transaction
Commit a Webpay Mall transaction after the user has returned. Charges all child commerce codes at once.

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar