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

# Quickstart

> Four steps to your first paid request.

## Prerequisites

* A Pesso account on the **Business** plan, which includes API keys and webhooks. [See plans](https://pesso.xyz/plans).
* A server that can make HTTPS calls and receive a webhook.

Payment requests and the API work wherever you are. What your customers need is in [Where Pesso works](https://docs.pesso.xyz/index.md#where-pesso-works).

### 1. Get an API key

Copy it now — Pesso shows it once. It looks like `psk_` followed by 43 characters. Keep it on your server, never in a browser or an app.

### 2. Add a webhook endpoint

Use a public `https` URL. Copy the signing secret, `whsec_…` — also shown once.

### 3. Create a payment request

```bash cURL theme={null}
curl https://api.pesso.xyz/send \
  -H "Authorization: Bearer $PESSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "0.01",
    "concept": {"Order": "#4418", "Items": "2 bags of coffee"},
    "successUrl": "https://shop.example.com/orders/4418/paid",
    "cancelUrl": "https://shop.example.com/cart"
  }'
```

```js Node.js theme={null}
const res = await fetch("https://api.pesso.xyz/send", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PESSO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    amount: "0.01",
    concept: { Order: "#4418", Items: "2 bags of coffee" },
    successUrl: "https://shop.example.com/orders/4418/paid",
    cancelUrl: "https://shop.example.com/cart",
  }),
});
if (res.status !== 201) throw new Error(`Pesso answered ${res.status}`);
const { id, url } = await res.json();
```

```python Python theme={null}
import os, requests

res = requests.post(
    "https://api.pesso.xyz/send",
    headers={"Authorization": f"Bearer {os.environ['PESSO_API_KEY']}"},
    json={
        "amount": "0.01",
        "concept": {"Order": "#4418", "Items": "2 bags of coffee"},
        "successUrl": "https://shop.example.com/orders/4418/paid",
        "cancelUrl": "https://shop.example.com/cart",
    },
    timeout=10,
)
res.raise_for_status()
request_id, url = res.json()["id"], res.json()["url"]
```

```json 201 Created theme={null}
{
  "id": "6a1f9d3c-27e4-4b8a-a0c5-93d81e2f4b76",
  "url": "https://pesso.xyz/send/?uid=6a1f9d3c-27e4-4b8a-a0c5-93d81e2f4b76",
  "expiresAt": null
}
```

Save `id` with your order and redirect your customer to `url`.

`concept` takes a string or a JSON object. With an object, the first key’s **value** is the headline your customer sees, and the other keys follow as labelled rows. [How concept renders](https://docs.pesso.xyz/api-reference/create-payment-request.md#body-concept), or try it in the [playground](https://docs.pesso.xyz/api-reference/create-payment-request.md).

### 4. Pay it, and get the webhook

Open `url` signed in to a **second** Pesso account that holds USDC, and pay. Pesso refuses a payment to your own request. Your endpoint receives:

```jsonc payment.succeeded theme={null}
{
  "type": "payment.succeeded",
  "data": {
    "requestId": "6a1f9d3c-27e4-4b8a-a0c5-93d81e2f4b76",
    "amount": "0.01",
    "concept": "{\"Order\":\"#4418\",\"Items\":\"2 bags of coffee\"}",
    // …
  }
}
```

> [!WARNING]
>
> **There is no test mode.** This is a real payment in USDC on Base. Use `"0.01"` and pay from another Pesso account of your own.

`data.concept` arrives as a JSON **string** — `JSON.parse` it. Match `data.requestId` to your order, then [verify the signature](https://docs.pesso.xyz/webhooks.md) before you trust it.

## Next

> [card] [Webhooks](https://docs.pesso.xyz/webhooks.md)
>
> A complete handler, signature checks and retries.

> [card] [Go live](https://docs.pesso.xyz/go-live.md)
>
> Errors, edge cases and a checklist before your first real customer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.