NOWPayments
Development API

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.

99.9% Uptime350+ Coins< 350ms ResponsePCI-DSS Safe
javascript
// 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 amount
350+
Supported coins
0.5%
Service fee
~5min
Avg confirmation
99.9%
API uptime
Integration

How the API works

Three API calls and your checkout is live. No wallet management required.

1

Create Payment

POST /v1/payment with price, currency and your order ID. Get back a crypto address and exact amount.

2

Show to User

Display the pay_address and pay_amount to your customer. They send crypto from any wallet.

3

Receive IPN

We POST a signed webhook to your callback URL when payment_status = 'finished'. Safe to fulfill order.

Features

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.

Security

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
javascript
// 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);
});
javascript
// 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 / expired
Payment Lifecycle

Full 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 user
confirmingTransaction seen on blockchain
confirmedEnough network confirmations
finishedPayment complete — fulfill order
expiredNo payment received in time
Why NOWPayments

Built for developers

FeatureNOWPaymentsOthers
350+ crypto assets20–50
IPN webhooks
Fixed-rate payments
Mass payouts API
Custody sub-accounts
Fiat off-ramp
No monthly fee
Open-source SDKs

Start accepting crypto payments today

Get your API key in under 60 seconds. No credit card required.

Create Free Account