https://api.sapiom.ai/v1/mcp, connected with the buyer’s key. Argument names are case-sensitive.
sapiom_check_transaction_compatibility
{ "domain": "shop.example" }. Takes a bare domain or HTTPS origin.
Returns merchant, status, reason, protocol, capabilities: [{ name, supported }], checkedAt, expiresAt and retryAfterSeconds.
sapiom_list_payment_methods
{}. Returns { data: [...] }, newest first, with pending and active cards. Each card includes id, status, brand, last4, expMonth, expYear, isDefault and readiness. A card can pay when status is active and readiness is not not_ready. Card numbers are never returned.
sapiom_add_payment_method
{ "returnUrl": "https://your-app.example/cards/done" }. returnUrl is optional: HTTPS, or HTTP for localhost, up to 2,048 characters.
Returns url and setupLink: { id, status, expiresAt }, plus instructions in nextStep. url is returned only once. See Vault a card.
sapiom_delete_payment_method
{ "cardId": "<uuid>" }. Returns { cardId, status, message }. Calling again with the same ID safely retries cleanup. Removal does not cancel or refund orders.
sapiom_request_transaction
Returns the transaction view. See Authorize a transaction.
sapiom_get_transaction
{ "transactionId": "<uuid>", "since": "<version>", "waitSeconds": 20 }. since and waitSeconds (0 to 22, default 0) are optional. Reads stored state only; it never pays or refreshes the merchant.
sapiom_update_transaction
{ "transactionId", "version", "idempotencyKey", "checkout" }. checkout replaces the whole checkout, so build it from the latest transaction plus your change. Changing items or totals can require the buyer to approve again.
sapiom_cancel_transaction
{ "transactionId", "idempotencyKey" }. Cancels an unfinished checkout. It cannot stop a completion in progress or refund a placed order.
What transaction tools return
All four transaction tools return the same object. This one is ready for your browser worker to pay:totals and unitPriceMinor are in minor units (cents), while payment.amount is a decimal string. Pass version as since on your next read. Other nextAction types are listed in Authorize a transaction.
Spending-limit tools
These tools need a key that can manage limits, such as your platform key. Buyer keys can’t call them, so an agent connected with a buyer’s key can’t read or raise its own limits.
sapiom_get_card_spending_limits
{ "cardId": "<uuid>" }. Returns the card’s three limits, the saved version, and usage, which shows what the period and date-range limits have used and have remaining. Same as Get spending limits.
sapiom_set_card_spending_limits
{ "cardId", "version", "purchaseLimit", "recurringLimit", "customLimit" }. Replaces all three limits, so send null for any you don’t want, with the version you read (0 the first time). Same as Set spending limits. See Spending limits for each limit’s shape.