This document explores real-world applications and use cases for implementing secure payments with Fluxis API and the NASPIP protocol, demonstrating how to integrate blockchain payments into your applications using the supported merchant API flow.
::::tip Authentication pattern
All examples below assume you have already exchanged your API key and secret for a Bearer token via POST /v1/auth/token. Protected routes require bothAuthorization: Bearer <token> and x-fluxis-api-key: <api_key>. Never expose API secrets in client-side code.
::::
E-commerce and Retail
Online Store Payments
Scenario: An e-commerce platform wants to accept cryptocurrency payments alongside traditional payment methods.
Fluxis API Solution:
Code
const API_BASE = "https://api.fluxis.us/v1";const POS_ID = "YOUR_POINT_OF_SALE_ID";// 1) Exchange API key + secret for an access token (server-side only)const authRes = await fetch(`${API_BASE}/auth/token`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ api_key: process.env.FLUXIS_API_KEY, api_secret: process.env.FLUXIS_API_SECRET, }),});const { data: auth } = await authRes.json();// 2) Create a payment request for a checkoutconst prRes = await fetch(`${API_BASE}/pos/${POS_ID}/payment-request`, { method: "POST", headers: { Authorization: `Bearer ${auth.token}`, "x-fluxis-api-key": process.env.FLUXIS_API_KEY, "Content-Type": "application/json", }, body: JSON.stringify({ amount: "299.99", unique_asset_id: "npolygon_t0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", reference_id: "order-12345", }),});const { data: paymentRequest } = await prRes.json();// 3) Present paymentRequest.token to the payer (QR / deep link / hosted checkout)// Optional: POST /pos/:posID/payment-request-checkout for a hosted checkout URL
Benefits:
🚀 Rapid Integration: Get started in minutes with Fluxis API
🔐 Enterprise Security: Signed NASPIP (PASETO v4) payment instructions and webhook signature verification
🌐 Multi-Network: Support for configured EVM assets (UAIs) on enabled networks such as Polygon, Base, Avalanche, and Arbitrum
📱 Flexible checkout: NASPIP token QR, deep links, or hosted checkout
⚡ High Performance: Scalable infrastructure for production applications
Point-of-Sale (POS) Systems
Scenario: A retail store wants to accept cryptocurrency payments at physical locations using a cashier-style flow.