# API reference

Every endpoint, with its parameters, responses and code samples. Requests go to `https://api.weavpayments.com` with your API key as a Bearer token. See [Authentication](https://docs.weavpayments.com/authentication). Example values are samples, fees included: your fees are in your agreement with Weav.

## Checkouts

- [List checkouts](https://docs.weavpayments.com/reference/checkouts/list-checkouts): `GET /v1/checkouts`
- [Create a checkout](https://docs.weavpayments.com/reference/checkouts/create-checkout): `POST /v1/checkouts`
- [Retrieve a checkout](https://docs.weavpayments.com/reference/checkouts/retrieve-checkout): `GET /v1/checkouts/{reference_id}`
- [Cancel a checkout](https://docs.weavpayments.com/reference/checkouts/cancel-checkout): `POST /v1/checkouts/{reference_id}/cancel`

## Payments

- [List payments](https://docs.weavpayments.com/reference/payments/list-payments): `GET /v1/payments`
- [Create a payment](https://docs.weavpayments.com/reference/payments/create-payment): `POST /v1/payments`
- [Retrieve a payment](https://docs.weavpayments.com/reference/payments/retrieve-payment): `GET /v1/payments/{reference_id}`
- [Cancel a payment](https://docs.weavpayments.com/reference/payments/cancel-payment): `POST /v1/payments/{reference_id}/cancel`

## Payment methods

- [List saved payment methods](https://docs.weavpayments.com/reference/payment-methods/list-payment-methods): `GET /v1/payment-methods`
- [Save a payment method](https://docs.weavpayments.com/reference/payment-methods/create-payment-method): `POST /v1/payment-methods`
- [Retrieve a payment method](https://docs.weavpayments.com/reference/payment-methods/retrieve-payment-method): `GET /v1/payment-methods/{id}`
- [Remove a payment method](https://docs.weavpayments.com/reference/payment-methods/remove-payment-method): `DELETE /v1/payment-methods/{id}`

## Balance

- [Get your balance](https://docs.weavpayments.com/reference/balance/get-balance): `GET /v1/balance`
- [List ledger entries](https://docs.weavpayments.com/reference/balance/list-ledger-entries): `GET /v1/ledger-entries`

## Withdrawals

- [List withdrawals](https://docs.weavpayments.com/reference/withdrawals/list-withdrawals): `GET /v1/withdrawals`
- [Retrieve a withdrawal](https://docs.weavpayments.com/reference/withdrawals/retrieve-withdrawal): `GET /v1/withdrawals/{reference_id}`

## Channels

- [List channels](https://docs.weavpayments.com/reference/channels/list-channels): `GET /v1/channels`

## Webhooks

- [Repost a payment's latest webhook](https://docs.weavpayments.com/reference/webhooks/repost-payment-webhook): `POST /v1/payments/{reference_id}/webhooks/repost`
- [Get your webhook URL](https://docs.weavpayments.com/reference/webhooks/get-webhook-endpoint): `GET /v1/webhook-endpoint`
- [Set your webhook URL](https://docs.weavpayments.com/reference/webhooks/set-webhook-endpoint): `PUT /v1/webhook-endpoint`
- [Remove your webhook URL](https://docs.weavpayments.com/reference/webhooks/remove-webhook-endpoint): `DELETE /v1/webhook-endpoint`

## Try it

Each endpoint's page has **Try it**, next to the endpoint's path. It opens a playground: fill in the request on the left, and see it as cURL and Weav's answer on the right, with the status, time, size and headers. Press ⌘↵ (Ctrl+Enter) to send.

- **Test keys only.** It takes a `wv_test_` key and refuses a live one, and so does the API: a live key sent from a browser gets `403` with code `4030001`.
- **Your key stays in this tab.** It's kept in memory while you move between pages here, never saved, and gone when you reload or close the tab. **Forget it** clears it sooner. No cookies go with the request.
- **Copy it as cURL.** The cURL view uses `$WEAV_API_KEY`, never your key. Paste it into a terminal, or import it into Postman.
- **It's a real test-mode request.** A payment you create is a real test payment in your account, and its webhooks go to your test webhook URL.
- A key limited to an IP allowlist gets `403` here: your browser's address isn't on the list.

## For your tools

This reference is made from Weav's OpenAPI 3.1 file. Import [openapi.yaml](https://docs.weavpayments.com/openapi.yaml) or [openapi.json](https://docs.weavpayments.com/openapi.json) into Postman (**Import → Link**), Insomnia, Swagger UI or a code generator. For AI assistants: [llms.txt](https://docs.weavpayments.com/llms.txt) and [llms-full.txt](https://docs.weavpayments.com/llms-full.txt).
