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 Create a payment for an exact amount and send the customer to its checkout.
- Hosted checkout Cards, Apple Pay, Google Pay and five coins on five networks, on one page.
- Webhooks A signed event for every change, retried until your server answers.
- Wallet 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.
- No code
Payment link
Create a link in the dashboard and share it anywhere: your site, an invoice, a chat or a QR code.
Payment links- 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
- Recommended
Your server and hosted checkout
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- 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
- Most control
Your own checkout
Your server still creates the payment, and your app shows the payment screens itself, on the public checkout endpoints.
Build your own- 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
- Verify a webhook signature
- Find a payment by your order ID
- Rehearse underpaid and late transfers
- Ask for the rest of an underpaid payment
- Limit what a secret key can do
Base URL
Every path in these docs is relative to it.
Where to next
- Quickstart Take your first payment in five steps, from a new account to a fulfilled order.
- Core concepts Payments, checkouts, links, customers, events and your wallet, and how they fit together.
- Webhooks Signed events for every change, retried until your server answers.
- Introduction The base URL, how requests and responses are shaped, and every endpoint.