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
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',
currency: 'SWSS',
reference: 'ORDER-20250001',
description: 'Product purchase',
expiresIn: 900,
callbackUrl: 'https://yourapp.com/webhooks/swss-pay',
}),
});
const { paymentRequestId, paymentUrl, qrCode } = await response.json();
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-commerce | Checkout payment for digital or physical goods |
| Service Billing | Invoice payment for professional services |
| Subscription | Recurring payment authorisation (requires SWSS App consent flow) |
| In-App Purchase | Mobile and web application micro-transactions |
| Deed Service Fee | Platform 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.