# RedVPN

> RedVPN is a VPN for people who need the open internet. Prepaid Premium periods (no subscription, no auto-renewal) can be bought by AI agents on behalf of a human through the Agentic Commerce Protocol (ACP) endpoints below or a short REST flow; delivery is instant: an account code plus connection credentials.

## Products and prices

- `usd-monthly` — 1 month: 3.99 USD (one-time, no auto-renew)
- `usd-year` — 1 year: 39.99 USD (one-time, no auto-renew)

Item ids are the `line_items[].id` values for checkout. Prices are in minor units in the API (`unit_amount`), major units here.

## Buy as an agent (short version)

1. Get an agent API key from the operator (`support@vpn.red`) — `Authorization: Bearer rvk_…` on every call. Keys are rate-limited.
2. `POST https://vpn.red/agentic/checkout_sessions` with `Idempotency-Key` and body `{"line_items":[{"id":"usd-monthly"}],"currency":"usd","buyer":{"email":"human@example.com"},"capabilities":{}}` → `status: ready_for_payment` and `capabilities.payment.handlers`.
3. `POST https://vpn.red/agentic/checkout_sessions/{id}/complete` with `payment_data`:
   - Stripe Shared Payment Token (ChatGPT / any agent holding one): `{"handler_id":"card_spt","instrument":{"type":"card","credential":{"type":"spt","token":"spt_…"}}}` → `status: completed`, `order` present.
   - No token: `{"handler_id":"card_hosted"}` → `status: complete_in_progress` + `continue_url`. Show the URL to the human, then poll `GET https://vpn.red/agentic/checkout_sessions/{id}` until `completed`.
4. Read the delivery: `order.fulfillments[0].digital_delivery.license_key` is the account code, `metadata.redvpn` has `cid`, `account_code`, `paid_until`, `profile` (redsocket endpoints + server public key) and `profile_url`.

## How the human redeems

- Install RedVPN (Android, iOS, macOS, Windows). Open Sign in › Account code, enter the code. Premium is active until `paid_until`.
- Linux CLI: `redvpn login --cid <cid>`.
- If an email was given at checkout, the same receipt (code + steps) is emailed and `https://vpn.red/me` shows the order after signing in with that address.

## Links

- [Discovery document](https://vpn.red/.well-known/acp.json): protocol version, API base URL, services.
- [OpenAPI for the agent endpoints](https://vpn.red/agentic/openapi.json)
- [ACP product feed](https://vpn.red/agentic/feed.json) and [OpenAI feed lines](https://vpn.red/agentic/feed.jsonl)
- [Human-readable page](https://vpn.red/agents)
- [Privacy](https://vpn.red/privacy)

## Optional

- [Full agent guide](https://vpn.red/llms-full.txt): every endpoint, every field, MCP server configuration, error codes.
