Skip to main content
In a few minutes you will set up one buyer end to end: create the buyer, save a card for them, and connect an agent that acts as them. No transaction is made. The setup steps, API URLs and MCP URL are the same in sandbox and production. Your key selects the environment. Sandbox buyers, keys and cards are separate from production. You need: Set SAPIOM_PLATFORM_KEY to your saved platform key:
1

Create a buyer

A buyer represents one of your users. Use your own ID for that user as externalId:
Save the id from the response as BUYER_ID.
2

Create a key for the buyer

Save plainKey from the response as SAPIOM_BUYER_KEY. It is shown only once.
3

Save a card for the buyer

Create a setup link with the buyer’s key:
Open the url from the response. In sandbox, use an approved test card. In production, send the link to your user to save their card.
4

Connect your agent as the buyer

Ask your agent: “List my Sapiom payment methods.” It shows the card you just saved, with its brand and last four digits.
5

Check a merchant

For a sandbox check, use sapiom-test-store.myshopify.com as the store’s domain.Ask your agent: “Can Sapiom buy from shop.example?”, with a real store’s domain. The answer is supported, unsupported or unknown. supported means the store offers UCP checkout. Otherwise your agent can use browser checkout, if Browser Pay can pay it.
You now have a buyer with a saved card and an agent that acts for that buyer. In production, your agent switches keys for each user it serves. See Connect your agent.

Next steps

Authorize a transaction

Send a merchant checkout and get the buyer’s approval.

Manage buyers

Set up buyers for real users in production.