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
| Step | Who | How |
|---|---|---|
| Add what you sell | You or the assistant | Swop app, or swop_create_product |
| Allow your website to show your checkout | The assistant | swop_register_embed_origin |
| Add a webhook and send a test event | The assistant | swop_register_webhook, swop_test_webhook |
| List products with SKUs and buy links | The assistant | swop_list_my_products, swop_get_product_link |
| Create the API key | You | Swop web app → Developer → API keys |
| Write the server code | The assistant | From 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:
httpsonly (http://localhostis allowed for development), no path and no wildcard.https://acme.comandhttps://www.acme.comare 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.checkoutto start checkouts from your own cart (Headless checkout), orcommerce.embedto show Swop's checkout inside your page (Framed checkout).