> For the complete index of the 402pay docs, see [llms.txt](https://402pay.co/docs/llms.txt).

# Overview

What you can build with the 402pay API, and where to start.

The 402pay API is a REST API. It takes and returns JSON, uses standard HTTP status codes, and authenticates with a secret key. Your server creates payments, customers pay on a hosted checkout, and every confirmed payment lands in a wallet only your business controls, so there's nothing to withdraw.

- [Payments](https://402pay.co/docs/guides/accept-a-payment.md): Create a payment for an exact amount and send the customer to its checkout.
- [Hosted checkout](https://402pay.co/docs/guides/hosted-checkout.md): Cards, Apple Pay, Google Pay and five coins on five networks, on one page.
- [Webhooks](https://402pay.co/docs/guides/webhooks.md): A signed event for every change, retried until your server answers.
- [Wallet](https://402pay.co/docs/guides/settlement.md): Balances and transactions for the self-custody wallet every payment lands in.

## Choose your integration

Every option lands payments in your wallet the same way. They differ in how much you build.

### Payment link

 No code

Create a link in the dashboard and share it anywhere: your site, an invoice, a chat or a QR code.

[Payment links](https://402pay.co/docs/guides/payment-links.md)

- **Code needed**: None
- **Time**: Minutes
- **Customization**: The link's name, price and currency, plus your checkout settings
- **Best for**: One price for many customers, such as a product, a donation or a fixed invoice

### Your server and hosted checkout

 Recommended

Your server creates a payment for each order and sends the customer to its checkout. A webhook says when it's paid.

[Accept a payment](https://402pay.co/docs/guides/accept-a-payment.md)

- **Code needed**: One API call and a webhook handler
- **Time**: An afternoon
- **Customization**: Amount, reference, metadata, redirects and expiry on every payment
- **Best for**: Stores and apps with their own orders

### Your own checkout

 Most control

Your server still creates the payment, and your app shows the payment screens itself, on the public checkout endpoints.

[Build your own](https://402pay.co/docs/guides/hosted-checkout.md#custom-checkout)

- **Code needed**: The server calls, plus your own payment screens
- **Time**: A few days
- **Customization**: Every screen, in your app's own design
- **Best for**: Apps that keep customers on their own pages

## Popular tasks

- [Create a payment and send the customer to checkout](https://402pay.co/docs/guides/accept-a-payment.md)
- [Verify a webhook signature](https://402pay.co/docs/guides/webhooks.md#verify)
- [Find a payment by your order ID](https://402pay.co/docs/api/payments/list.md)
- [Handle underpaid and late transfers](https://402pay.co/docs/guides/underpayments.md)
- [Ask for the rest of an underpaid payment](https://402pay.co/docs/guides/underpayments.md#request-the-rest)
- [Limit what a secret key can do](https://402pay.co/docs/authentication.md)

## Base URL

Base URL: `https://api.402pay.co/api/v1`

Wallet base URL: `https://wallet.402pay.co/api/v1`

The API has two hosts. Wallet paths are relative to the wallet base URL: `/wallet`, everything under `/wallet/` and `/wallet-changes/`, and `/exchange-rates`. Every other path is relative to the base URL. Both take the same secret key and answer in the same shapes, and each endpoint's page and samples show the full URL.

## Where to next

- [Quickstart](https://402pay.co/docs/quickstart.md): Accept your first payment in five steps, from a new account to a fulfilled order.
- [Core concepts](https://402pay.co/docs/concepts.md): Payments, checkouts, links, customers, events and your wallet, and how they fit together.
- [Webhooks](https://402pay.co/docs/guides/webhooks.md): Signed events for every change, retried until your server answers.
- [Introduction](https://402pay.co/docs/api.md): The base URL, how requests and responses are shaped, and every endpoint.
