docs
Get startedTroubleshootingPaymentsWebhooksAgent paymentsSwop MCPOviIdentity (swop.id)SwivyRPC (preview)API reference

Set up your website from chat

Have a connected AI assistant allow your site, add a webhook and write the server code for Swop checkout. What it can do, and the one step that stays with you.

If your assistant is connected to Swop, it can do most of the work of putting Swop checkout on a website you host yourself. Either endpoint works: these tools are on /mcp/commerce as well as /mcp.

What the assistant does, and what you do

StepWhoHow
Add what you sellYou or the assistantSwop app, or swop_create_product
Allow your website to show your checkoutThe assistantswop_register_embed_origin
Add a webhook and send a test eventThe assistantswop_register_webhook, swop_test_webhook
List products with SKUs and buy linksThe assistantswop_list_my_products, swop_get_product_link
Create the API keyYouSwop web app → Developer → API keys
Write the server codeThe assistantFrom these docs

The assistant can't create API keys

No MCP tool creates, lists or reveals a merchant API key. A key exists only because you made it in the Swop app while signed in. That is what stops a connected assistant, or anyone who gets hold of its connection, from minting a credential of its own.

The prompt

The Swop web app writes this for you, with your site filled in, at Developer → Your website (swopme.app/dashboard/developer?tab=site). Or copy it from here and change the two addresses:

Set up Swop checkout for my website https://your-site.com.
1. Show me which sites can already show my checkout, then allow https://your-site.com.
2. Add a webhook at https://your-site.com/webhooks/swop for paid checkouts and released payouts, send it a test event, and give me the signing secret once.
3. List my products with their SKUs and buy links.
4. Show me the server code to start a checkout from a cart with my Swop merchant key, and how to verify the webhook signature. I will create the key myself in Swop.
Confirm each change with me before you make it.

What to check afterwards

The same Developer → Your website tab shows a four-step checklist read from your account: products, allowed websites, a checkout key and a webhook. Each one turns to Done when it exists.

  • Allowed websites must be exact origins: https only (http://localhost is allowed for development), no path and no wildcard. https://acme.com and https://www.acme.com are different. See Framed checkout.
  • The webhook signing secret is shown once, when the webhook is created. If the assistant created it, the secret is in that chat. Store it on your server and see Verify signatures.
  • The key needs the right scope: commerce.checkout to start checkouts from your own cart (Headless checkout), or commerce.embed to show Swop's checkout inside your page (Framed checkout).

On this page