Skip to main content
TR

Transbank

v0.2.0-alpha.2API Keyalpha

A credenciadora de cartões dominante do Chile — raízes de origem estatal, efetivamente o padrão pro comércio chileno. Webpay Plus (pagamentos avulsos) + Webpay OneClick Mall (recorrente com cartão armazenado). Pré-requisito pra qualquer alegação de cobertura LatAm que inclua o Chile.

19 ferramentas3 env vars🇨🇱 Chilealpha — validação pendente

O que seu agente faz

O Transbank dá ao seu agente 19 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • webpay_create_transactionCreate 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.
  • webpay_commit_transactionCommit a Webpay Plus transaction after the user has returned from the Webpay flow. Must be called to actually charge the card.
  • webpay_get_transaction_statusGet the current status of a Webpay Plus transaction by token.
Exemplo de chamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("webpay_create_transaction", { /* ... */ });

Instalar

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

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

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>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 19 ferramentas abaixo — teste webpay_create_transaction primeiro.

Variáveis de ambiente · 3

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

TRANSBANK_COMMERCE_CODE
obrigatório

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

TRANSBANK_API_KEY_SECRET
obrigatóriosecret

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

TRANSBANK_ENV
opcional

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

Ferramentas disponíveis · 19

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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.

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-transbank` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Transbank — MCP server · 19 tools | CodeSpar