KaspaNova.io

API Documentation
FR EN

Introduction

The KaspaNova API lets merchants create payments in $KAS , display a payment session to customers, and verify confirmation directly on the Kaspa blockchain.

Create a Payment

POST /api/create-payment

Creates a payment session that your frontend or checkout flow can redirect to.

Request body

{
  "amountFiat": 49.99,
  "currency": "CAD",
  "merchantId": "WIX-123"
}

Response

{
  "paymentId": "d98551ce-939a-4205-8613-350f4bf0d717",
  "merchantId": "WIX-123",
  "currency": "CAD",
  "amountFiat": 49.99,
  "kasPrice": 0.365,
  "amountKas": 136.92,
  "kasAddress": "kaspa:demo_WIX-123_ab19d4f22d91",
  "expiresAt": 1736114189000
}

cURL example

curl -X POST https://kaspanova.io/api/create-payment \
  -H "Content-Type: application/json" \
  -d '{
    "amountFiat": 49.99,
    "currency": "CAD",
    "merchantId": "WIX-123"
  }'

Verify a Payment

GET /api/verify-payment/:paymentId

Retrieves the blockchain status of an existing payment session.

Response example

{
  "status": "confirmed",
  "expectedKas": 136.92,
  "receivedKas": 137.02,
  "expiresAt": 1736114189000,
  "kasAddress": "kaspa:demo_WIX-123_ab19d4f22d91"
}

Possible statuses

Quick Integration

Redirect to the payment page

After creating a session, redirect your customer to your hosted payment page:

// Example (JavaScript)
const paymentUrl = "https://kaspanova.io/pay/?id=" + session.paymentId;
window.location.href = paymentUrl;

Node.js example

const res = await fetch("https://kaspanova.io/api/create-payment", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    amountFiat: 49.99,
    currency: "CAD",
    merchantId: "SHOP-22"
  })
});

const session = await res.json();
console.log(session.paymentId, session.kasAddress);

Best Practices