> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myproceeds.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a paywall

> Create a Proceeds paywall with POST /v1/paywalls.

Use the REST API to create a paywall under a service. For the dashboard path, see [Add a paywall](/quickstart/add-a-paywall).

## Endpoint

```
POST https://api.myproceeds.xyz/v1/paywalls
```

Requires scope `paywalls:write`. See [Authentication](/api-reference/authentication).

## Example

<Note>
  `price` is USDC in **micro-units** (6 decimals) as a string. `"1000000"` = `$1.00`. `"50000"` = `$0.05`.
</Note>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.myproceeds.xyz/v1/paywalls \
    -H "Authorization: Bearer mpk_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "serviceId": "YOUR_SERVICE_ID",
      "slug": "current-weather",
      "name": "Current weather",
      "targetType": "PROXY",
      "targetUrl": "https://api.example.com/v1/weather/current",
      "price": "50000",
      "currency": "USDC",
      "allowedMethods": ["GET"],
      "networks": ["base-sepolia"],
      "enabled": true
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.myproceeds.xyz/v1/paywalls", {
    method: "POST",
    headers: {
      Authorization: "Bearer mpk_your_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      serviceId: process.env.PROCEEDS_SERVICE_ID,
      slug: "current-weather",
      name: "Current weather",
      targetType: "PROXY",
      targetUrl: "https://api.example.com/v1/weather/current",
      price: "50000",
      currency: "USDC",
      allowedMethods: ["GET"],
      networks: ["base-sepolia"],
      enabled: true,
    }),
  });

  const { data: paywall } = await response.json();
  ```
</CodeGroup>

## Request body

| Field                     | Required    | Description                                  |
| ------------------------- | ----------- | -------------------------------------------- |
| `slug`                    | Yes         | `^[a-z0-9._-]+$`, unique per service         |
| `name`                    | Yes         | Display name                                 |
| `targetType`              | Yes         | Use `PROXY`                                  |
| `targetUrl`               | For PROXY   | Full upstream URL                            |
| `price`                   | Yes         | USDC micro-units (string)                    |
| `currency`                | Yes         | `USDC`                                       |
| `networks`                | Yes         | At least one network ID this paywall accepts |
| `serviceId`               | Recommended | Parent service id                            |
| `allowedMethods`          | No          | `GET`, `POST`, `PUT`, `PATCH`                |
| `headers` / `queryParams` | No          | Forwarded to upstream                        |
| `enabled`                 | No          | Defaults per API                             |

Merchant wallet is set automatically to your Proceeds wallet — do not pass it.

A duplicate `slug` in the same service returns `409`.

## Payment URLs after create

```
https://myproceeds.xyz/api/x402/pay/{serviceId}/{slug}
https://myproceeds.xyz/api/mpp/pay/{serviceId}/{slug}
```

MPP URLs require Tempo on the paywall networks. See [Payment URLs](/quickstart/add-a-paywall).

## Related endpoints

* `GET /v1/paywalls` — list (`serviceId`, `enabled` filters)
* `GET /v1/paywalls/{id}` — get
* `PATCH /v1/paywalls/{id}` — update
* `DELETE /v1/paywalls/{id}` — delete

<CardGroup cols={2}>
  <Card title="Make your first payment" icon="robot" href="/quickstart/make-your-first-payment">
    Pay the new URL end-to-end from an agent.
  </Card>

  <Card title="API overview" icon="code" href="/api-reference/overview">
    Envelope, pagination, and conventions.
  </Card>
</CardGroup>
