Accept Crypto
in Any App
A powerful REST API to integrate 350+ crypto payments into any website, mobile app, or backend service — without handling wallets.
// Create a payment
const response = await fetch(
'https://api.nowpayments.io/v1/payment',
{
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
price_amount: 100,
price_currency: 'usd',
pay_currency: 'btc',
order_id: 'ORDER-001',
order_description: 'Premium Plan',
ipn_callback_url: 'https://yoursite.com/ipn',
}),
}
);
const payment = await response.json();
console.log(payment.pay_address); // BTC address to show user
console.log(payment.pay_amount); // Exact BTC amountHow the API works
Three API calls and your checkout is live. No wallet management required.
Create Payment
POST /v1/payment with price, currency and your order ID. Get back a crypto address and exact amount.
Show to User
Display the pay_address and pay_amount to your customer. They send crypto from any wallet.
Receive IPN
We POST a signed webhook to your callback URL when payment_status = 'finished'. Safe to fulfill order.
Everything you need to build
From simple payment buttons to complex custody flows.
REST API
Clean JSON API with predictable endpoints, full Postman collection and OpenAPI spec.
IPN Webhooks
HMAC-SHA512 signed callbacks sent instantly on every payment status change.
Fixed Rate
Lock the USD price for 20 minutes. Merchants absorb zero volatility risk.
Instant Estimates
GET /estimate to preview exact crypto amounts before creating a payment. Show live rates.
Recurring Payments
Built-in subscription API for monthly/yearly billing with automatic crypto conversion.
IP Whitelisting
Restrict API key usage to your server IPs. Prevents unauthorized payout calls.
Secure IPN Verification
Every webhook is signed with HMAC-SHA512 using your IPN secret. Always verify the signature before fulfilling orders — this prevents spoofed payment notifications.
- ✓Sort JSON keys before hashing
- ✓Compare signatures in constant time
- ✓Respond 200 immediately, process async
// Verify IPN webhook (Node.js / Express)
import crypto from 'crypto';
app.post('/ipn', (req, res) => {
const sig = req.headers['x-nowpayments-sig'];
const body = JSON.stringify(
JSON.parse(req.rawBody),
Object.keys(JSON.parse(req.rawBody)).sort()
);
const hmac = crypto
.createHmac('sha512', process.env.IPN_SECRET)
.update(body)
.digest('hex');
if (hmac !== sig) return res.status(401).send('Unauthorized');
const { payment_status, order_id } = req.body;
if (payment_status === 'finished') {
fulfillOrder(order_id); // ✓ safe to fulfil
}
res.sendStatus(200);
});// Poll payment status
const status = await fetch(
`https://api.nowpayments.io/v1/payment/${paymentId}`,
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
).then(r => r.json());
// payment_status values:
// waiting → awaiting deposit
// confirming → tx seen, waiting confirmations
// confirmed → enough confirmations
// sending → sending to your wallet
// finished → payment complete ✓
// failed / refunded / expiredFull Status Tracking
Poll GET /v1/payment/:id or rely on IPN webhooks. Seven distinct statuses let you build granular UX (pending screen, confirmation progress bar, success page).
waitingAwaiting deposit from userconfirmingTransaction seen on blockchainconfirmedEnough network confirmationsfinishedPayment complete — fulfill orderexpiredNo payment received in timeBuilt for developers
Start accepting crypto payments today
Get your API key in under 60 seconds. No credit card required.
Create Free Account