# Quickstart (/docs/get-started/quickstart)

This takes about five minutes. You need a Swop account with at least one product. Create products in the Swop app, or ask an AI to do it through the [Swop MCP](/docs/mcp).

<Callout type="warn">
  There's no sandbox yet, so this takes a **real** payment. Use a low-priced product and pay it from a different wallet than the one that sells it. See [Test vs live](/docs/get-started/test-vs-live).
</Callout>

<Steps>
<Step>
### Create an API key [#create-an-api-key]

In the Swop web app, open **Dashboard → Developer**, name a key and tick `commerce.read` and `commerce.checkout`. Copy the secret: it starts with `swop_sk_` and is **shown once**. Store it on your server as `SWOP_MERCHANT_KEY`.

Details: [Authentication and API keys](/docs/get-started/authentication).
</Step>

<Step>
### Check the key works [#check-the-key-works]

<CodeTabs items={['curl', 'Node', 'Python']}>
<Tab value="curl">
```bash
curl https://apps.apiswop.co/api/v5/merchant/me \
  -H "Authorization: Bearer $SWOP_MERCHANT_KEY"
```
</Tab>
<Tab value="Node">
```js
const res = await fetch('https://apps.apiswop.co/api/v5/merchant/me', {
  headers: { Authorization: `Bearer ${process.env.SWOP_MERCHANT_KEY}` },
});
console.log(await res.json());
```
</Tab>
<Tab value="Python">
```python
import os, requests

res = requests.get(
    "https://apps.apiswop.co/api/v5/merchant/me",
    headers={"Authorization": f"Bearer {os.environ['SWOP_MERCHANT_KEY']}"},
)
print(res.json())
```
</Tab>
</CodeTabs>

```json title="Response"
{
  "state": "success",
  "data": {
    "merchant": { "id": "65f…", "name": "Acme", "ens": "acme.swop.id" },
    "keyId": "mk_…",
    "effectiveScopes": ["commerce.read", "commerce.checkout"],
    "cardEnabled": false
  }
}
```

`effectiveScopes` is what the key can do **right now**. `cardEnabled` is `false` until your account is verified for card; crypto works either way.
</Step>

<Step>
### Find a product ID [#find-a-product-id]

```bash
curl "https://apps.apiswop.co/api/v5/merchant/products?limit=20" \
  -H "Authorization: Bearer $SWOP_MERCHANT_KEY"
```

Each product's ID is its `_id`.
</Step>

<Step>
### Take a payment: no code [#take-a-payment-no-code]

Share your product's Swop page:

```text
https://www.swopme.app/p/<your-swop-id>/<productId>
```

People get a Buy page. AI agents that request the same link pay in USDC automatically. That's a complete integration.
</Step>

<Step>
### Take a payment: from your own site [#take-a-payment-from-your-own-site]

When you want your own cart, have your server create a checkout. Send products and quantities, **never prices**: Swop prices every item from your catalogue.

```bash
curl -X POST https://apps.apiswop.co/api/v5/merchant/checkout-intents \
  -H "Authorization: Bearer $SWOP_MERCHANT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "items": [ { "productId": "<productId>", "quantity": 1 } ] }'
```

The response holds the payment details the buyer completes on your page. The full flow is in [Payments](/docs/payments).
</Step>

<Step>
### Hear about it [#hear-about-it]

When the payment lands, Swop creates the order, emails the receipt and pays you out. You never call a "confirm" endpoint. To react in your own system, register a [webhook](/docs/webhooks) for `checkout.paid`.
</Step>
</Steps>
