Products
SWSS Pay
Pre-launch
Section
Products
Documentation category
Type
Guide
Technical reference
Summary
SWSS Pay, the SwssChain payment infrastructure for merchants and developers to accept SWSS Coin payments with instant settlement and on-chain confirmation.
SWSS Foundation Notice

This documentation is restricted to authorised members of the SWSS Developer Community. Access is granted exclusively through SWSS DevHub, after KYB and SWSS Foundation approval.

All SwssChain GitHub repositories are private. Significant updates are currently deploying across the full SWSS Ecosystem. SDK and API specifications are subject to change at any time in accordance with security requirements and SwssChain Foundation governance decisions.

Join SWSS DevHub →Have a question? Use the Need Help? button below.
SDK Update Notice

SWSS SDK v2.1 is deploying across the ecosystem. API signatures may change during this period. Ensure your integration uses the latest schema from SWSS DevHub.

Article Content

SWSS Pay

SWSS Pay is the SwssChain payment infrastructure layer for merchants, service providers, and developers requiring a structured mechanism for accepting SWSS Coin payments. It provides payment request creation, real-time confirmation monitoring, webhook notifications, and settlement reconciliation tools, all anchored to SwssChain's one-second block time and two-second finality.

Core Features

  • Payment Request Generation: Create signed payment requests with a specified amount, reference identifier, and expiry time. Payment requests can be rendered as QR codes or deep links compatible with SWSS App.
  • Real-Time Confirmation: SWSS Pay monitors the SwssChain network for payment transactions matching the payment request. Confirmation notification is issued within 2 to 3 seconds of transaction submission.
  • Webhook Notifications: Configure HTTP webhook endpoints to receive payment confirmation events in real time. Webhooks include a cryptographic signature for authenticity verification.
  • Refund Management: Issue partial or full refunds as new SWSS Coin transactions referenced to the original payment. Refund records are linked on-chain for auditability.
  • Settlement Reporting: Exportable settlement reports in CSV and JSON format, filterable by date range, amount, reference, and confirmation status.

Integration

// Create a payment request
const response = await fetch(`${process.env.SWSS_PAY_API}/v1/payment-requests`, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.SWSS_PAY_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    amount: '150.00',           // SWSS Coin amount
    currency: 'SWSS',
    reference: 'ORDER-20250001',
    description: 'Product purchase',
    expiresIn: 900,             // 15 minutes
    callbackUrl: 'https://yourapp.com/webhooks/swss-pay',
  }),
});

const { paymentRequestId, paymentUrl, qrCode } = await response.json();
// Verify webhook signature
import crypto from 'crypto';

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}

Supported Use Cases

Use Case Description
E-commerceCheckout payment for digital or physical goods
Service BillingInvoice payment for professional services
SubscriptionRecurring payment authorisation (requires SWSS App consent flow)
In-App PurchaseMobile and web application micro-transactions
Deed Service FeePlatform fees associated with Deed settlement services

Settlement Combustion Model

All SWSS Pay payment transactions are standard SwssChain transactions subject to the Transactional Settlement Levy. The TSL is applied at the network level: SWSS Pay does not add any additional levy. The settlement value net of the TSL is credited to the receiving address.

Merchant Registration

Merchants must register with SWSS Pay and complete the applicable business verification process before accepting live payments. Testnet access for integration development is available without verification. API keys for mainnet payment acceptance are issued upon verification completion.