https://api.sapiom.ai/v1/mcp/pay, connected with the buyer’s key. The server lists only the eight tools below. Call each by its full name. 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.
shipping
Send anaddress, a contact, or both. The fields match shipping on Create a transaction.
addressneedsstreet_address,address_localityandaddress_country(two capital letters, such asUS). The rest is optional.- Leave out fields you don’t have.
nulland unknown fields are refused. - With no
addressand no contactemailorphone_number, the call returnsinvalid_input.
shipping into the checkout on create and on every update. Anything you set in checkout wins.
sapiom_get_transaction
{ "transactionId": "<uuid>", "since": "<version>", "waitSeconds": 20 }. since and waitSeconds (0 to 22, default 0) are optional. It reads stored state and never pays. The one exception: while a UCP order is completing (wait with reason complete_in_progress), it also asks the merchant whether the order completed.
sapiom_update_transaction
{ "transactionId", "version", "idempotencyKey", "checkout" }. checkout replaces the whole checkout, so any field you leave out is dropped.
Build it from two sources: the line items, quantities and delivery choices in the latest sapiom_get_transaction result, and the buyer and merchant-specific fields from your last request, which that result leaves out. Apply your change and send the latest version. If the result shows someone else’s change that conflicts with yours, ask the buyer first. After stale_version, read again, rebuild from both sources and use a new key.
Changing items, the amount or the delivery address can require the buyer to approve again and re-enter their CVV, even at the same total. If the update times out or reports change_unconfirmed, stop. Your team recovers it with the merchant, using the original request and key.
UCP only. A browser purchase returns not_revisable: cancel it, and once the cancellation is confirmed, request the revised purchase with a new key.
sapiom_cancel_transaction
{ "transactionId", "idempotencyKey" }. Cancels an unfinished checkout. It cannot stop a completion in progress or refund a placed order. For a browser purchase, this cancels the card payment and contacts no merchant. After your agent pays, it returns card_relayed. Never pay or buy again for it.
If a UCP cancellation is uncertain, stop. Your team recovers it with the merchant, using the original request and key. If a browser cancellation times out or may not have been saved, read the transaction; if it is not closed, send the same cancellation with the same key.
What transaction tools return
All four transaction tools return the same object. This one is ready for your browser worker to pay:continueUrl. Its host can be different from checkout.merchantOrigin, as in this example. Do not compare the two. See Pay in the browser.
A browser purchase has no checkout. purchase holds your agent’s statement, and order is null.
totals and unitPriceMinor are in minor units (cents), while payment.amount is a decimal string. A confirmed order also carries id, label, permalinkUrl and links (Show the order confirmation). Pass version as since on your next read. Other nextAction types are listed in Authorize a transaction.
Spending-limit tools
These tools are onhttps://api.sapiom.ai/v1/mcp, not /v1/mcp/pay.
Your backend can also use the spending-limit REST API.
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.