PinkWallet Website Logo
Join early access
SDK · Official MCP SDKsSign in or agent keyAbout 5 minVerified 2026-10-01

Connect Your own agent to Pink Agentic AI Payments

Any agent built on an official MCP SDK connects with a Streamable HTTP client; there is also a plain REST mirror. Works with TypeScript, Python, Java, Kotlin, C#, Swift, Go, Ruby and Rust. Plans: Open source.

What you get

Your own agent asks Pink before it pays

Once connected, Your own agent can see its budget, the payees it may pay and the rules that apply, run a dry run, request a payment and file the receipt. The rules you set in Pink decide each request: allowed on the spot, sent to a person on the phone, or blocked. Your own agent never holds a card number or a bank login.

Step by step

  1. 1

    Create a free sandbox workspace

    Open agentic-sandbox.pinkwallet.com, type a company name, pick a template (coffee shop, startup or e-commerce) and click Create workspace. You get an admin key for the console and one key per AI agent. Keep the admin key: the sign-in page asks for it.
    After creating a workspace: the admin key and one key per agent are shown once
    After creating a workspace: the admin key and one key per agent are shown once
  2. 2

    Copy an agent key

    From the workspace page or the console.
    The console's Keys & connect tab with the OAuth URL and the agent keys
    The console's Keys & connect tab with the OAuth URL and the agent keys
  3. 3

    Connect a Streamable HTTP client

    Create the SDK's Streamable HTTP client transport for https://agentic-sandbox.pinkwallet.com/mcp with the Authorization header, list the tools, and call pink.request_payment. This exact loop is the sandbox's own test.
  4. 4

    Or use REST

    If you would rather not speak MCP, every tool has a REST twin under /v1: POST /v1/payments/check, POST /v1/payments, GET /v1/payments/{id}, POST /v1/payments/{id}/receipt.
  5. 5

    Watch the approval land in the console

    Open the sandbox console (link on the workspace page). Requests that cleared, asked a person or were blocked are all listed with the rule that decided them. Approve the pending one and the agent continues.
    Approvals in the console: the rule that stopped the request, the agent's reason, the evidence
    Approvals in the console: the rule that stopped the request, the agent's reason, the evidence

The configuration, ready to paste

Your own agent · javascript
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

const pink = new Client({ name: 'purchasing-agent', version: '1.0.0' });
await pink.connect(new StreamableHTTPClientTransport(new URL('https://agentic-sandbox.pinkwallet.com/mcp'),
  { requestInit: { headers: { Authorization: 'Bearer <agent_key>' } } }));
const r = await pink.callTool({ name: 'pink.request_payment', arguments: { payee_id: 'p_cc', amount: 420, purpose: '20 kg espresso beans', idempotency_key: 'order-2291' } });
console.log(JSON.parse(r.content[0].text).decision); // allowed · pending_human · blocked

Replace <agent_key> with the key of the agent this sdk should act as. Each agent has its own key, budget and rules.

Try it: say this to Your own agent

Say this

“Check my budget with Pink, then order 20 kg of espresso beans from Counter Culture Coffee for $420. After that, order $890 of weekly supplies from Sysco.”

What you will see

The first order is allowed on the spot and the agent receives a single-use test credential. The second stops at the store manager's rule ($500–$2,000): it shows up under Approvals in the console, and the agent waits for a person. Approve it there and the agent picks up the credential.

Why those two rules exist →

Pink's side, in three screens

The sandbox workspace page with the admin key and one key per agent
Keys are shown once when the workspace is created.
Pink's sign-in page: admin key, agent selector, Allow and Deny
Sign-in: choose which agent the app acts as.
The console's Approvals tab with a pending request
Requests that need a person wait here and on the phone.

FAQ

Which SDKs exist?

Official SDKs are maintained for TypeScript, Python, Java, Kotlin, C#, Swift, Go, Ruby and Rust under the modelcontextprotocol organisation.

Do I need sessions or SSE?

No. Pink is stateless Streamable HTTP with JSON responses; every request is self-contained.

Official documentation

Menu names and settings paths follow each vendor's documentation at the verified date. If a vendor moves a menu, the linked page is the source of truth; the Pink side does not change.

Other clients