> ## Documentation Index
> Fetch the complete documentation index at: https://paperplane-justin-winter-s-projects.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutorial: send a security deposit demand letter

> A complete end-to-end walkthrough — from quote to certified delivery proof.

This tutorial walks a realistic use case: a landlord owes a security deposit, and you want **proof of delivery** that would hold up if you later pursue it.

## 1. Price it certified with e-Return Receipt

For something you may later show a judge, use `certified_err` (\$14.99) — it gives a signature, date, and tracking record.

```bash theme={null}
curl -X POST https://sendpaperplane.com/v1/quotes \
  -H 'Content-Type: application/json' \
  -d '{
    "mail_class": "certified_err",
    "page_count": 1,
    "to":   { "name": "Property LLC", "line1": "1 Main St",
              "city": "Richmond", "state": "VA", "zip": "23220" },
    "from": { "name": "Alex Rivera", "line1": "12 Grove Ave",
              "city": "Richmond", "state": "VA", "zip": "23221" },
    "text": "Formal demand for return of my $1,200 security deposit within 14 days per VA code..."
  }'
```

The response includes the all-in price and a `confirmation_token`.

## 2. Create the order

```python theme={null}
import requests

quote = requests.post("https://sendpaperplane.com/v1/quotes", json={...}).json()

order = requests.post("https://sendpaperplane.com/v1/orders", json={
    "mail_class": "certified_err",
    "to":   { "name": "Property LLC", "line1": "1 Main St", "city": "Richmond", "state": "VA", "zip": "23220" },
    "from": { "name": "Alex Rivera", "line1": "12 Grove Ave", "city": "Richmond", "state": "VA", "zip": "23221" },
    "text": "Formal demand for return of my $1,200 security deposit within 14 days...",
    "email": "alex@example.com",
    "confirmation_token": quote["confirmation_token"],
})
```

Save the `order.id` and the `capability.cancel_token`.

## 3. Send the payment link to the human

`order.payment_url` — the landlord-aggrieved party pays, then it's screened and mailed automatically.

## 4. Track with webhooks (or polling)

Prefer a webhook so you're pushed the outcome:

```bash theme={null}
curl -X POST https://sendpaperplane.com/v1/orders \
  ... # include "webhook_url": "https://your-app.example.com/hooks/paperplane"
```

Verify incoming events with `X-paperplane-Signature` (see [Webhooks](/docs/guides/webhooks)).

## 5. Keep the receipt

On `delivered`, the tracking number + e-Return Receipt record is your proof. The webhook event includes `tracking_number` and `event_url`.

## Done

You mailed a certified, court-ready demand letter from code in under a minute, with delivery proof wired into your own system.
