Interactive API Explorer — powered by softycomp-node
Test and explore all SoftyComp API features with interactive examples
npm install softycomp-node
💡 Pro tip: Use number keys (1-8) to quickly switch between tabs
Create once-off and recurring payment bills with hosted checkout pages
Update, expire, and track bill status with full audit trail
Mobi-Mandate integration for monthly and yearly collections
Create client profiles and process payouts to bank accounts
Real-time payment notifications with signature verification
Full TypeScript support with autocomplete and type checking
Create hosted payment links for once-off or recurring bills
Get status, update, expire bills, and view audit trail. All operations are tracked and auditable.
Create debit order mandates and manage collection status. Customer signs mandate via secure mobile flow.
Create client profiles and process credit distributions
Live webhook feed and history
http://localhost:4021/webhook
Configure this URL in your SoftyComp dashboard
Real-time events via Server-Sent Events
Copy-paste examples for all SoftyComp operations
npm install softycomp-node
import { SoftyComp } from 'softycomp-node';
const client = new SoftyComp({
apiKey: 'your-api-key',
secretKey: 'your-secret-key',
sandbox: true,
});
const bill = await client.createBill({
amount: 299.00,
customerName: 'John Doe',
customerEmail: 'john@example.com',
customerPhone: '0825551234',
reference: 'INV-001',
frequency: 'once-off',
returnUrl: 'https://myapp.com/success',
cancelUrl: 'https://myapp.com/cancel',
notifyUrl: 'https://myapp.com/webhook',
});
// Redirect customer to payment page
console.log(bill.paymentUrl);
const bill = await client.createBill({
amount: 99.00,
customerName: 'John Doe',
customerEmail: 'john@example.com',
customerPhone: '0825551234',
reference: 'SUB-001',
description: 'Premium Monthly Subscription',
frequency: 'monthly',
commencementDate: '2026-04-01',
recurringDay: 1,
returnUrl: 'https://myapp.com/success',
cancelUrl: 'https://myapp.com/cancel',
notifyUrl: 'https://myapp.com/webhook',
});
const status = await client.getBillStatus('BILL-REF-123');
if (status.status === 'completed') {
console.log('Payment received on:', status.paidAt);
}
const mandate = await client.createMobiMandate({
customerEmail: 'john@example.com',
customerPhone: '0825551234',
surname: 'Doe',
initials: 'J',
amount: 99.00,
frequency: 'monthly',
debitDay: 1,
description: 'Monthly subscription',
successUrl: 'https://myapp.com/success',
});
// Redirect customer to sign mandate
console.log(mandate.url);
app.post('/webhook', express.json(), (req, res) => {
const event = client.parseWebhook(req.body);
switch (event.type) {
case 'successful':
console.log('Payment successful!');
console.log('Reference:', event.reference);
console.log('Amount: R' + event.amount);
break;
case 'failed':
console.log('Payment failed:', event.reference);
break;
}
res.status(200).send('OK');
});
// Full refund
const refund = await client.refund({
transactionId: 'TXN-123',
});
// Partial refund
const refund = await client.refund({
transactionId: 'TXN-123',
amount: 50.00,
});
await client.updateBillPresentment({
reference: 'BILL-REF-123',
amount: 399.00,
description: 'Updated description',
customerName: 'John Doe',
customerEmail: 'john@example.com',
customerPhone: '0825551234',
});
await client.setBillToExpiredStatus('BILL-REF-123', 'USER-REF-123');
const audits = await client.listBillPresentmentAudits(
'BILL-REF-123',
'USER-REF-123'
);
audits.forEach(audit => {
console.log(`${audit.timestamp}: ${audit.description}`);
});
const clientId = await client.createClient({
name: 'John',
surname: 'Doe',
email: 'john@example.com',
phone: '0825551234',
idNumber: '8001015009087',
});
await client.updateCollectionStatus({
collectionId: 12345,
statusTypeId: 2, // 1=Active, 2=Suspended, 6=Cancelled
});
const result = await client.createCreditDistribution({
amount: 500.00,
accountNumber: '1234567890',
branchCode: '123456',
accountName: 'John Doe',
reference: 'PAYOUT-001',
});
Complete list of all SoftyComp API endpoints
/api/paygatecontroller/requestbillpresentment
Create a payment bill (once-off or recurring)
/api/paygatecontroller/listBillPresentmentDetails/:ref/:userRef
Get bill payment status
/api/paygatecontroller/updateBillPresentment
Update bill details (amount, description, customer info)
/api/paygatecontroller/setBillToExpiredStatus/:ref/:userRef
Expire/cancel a bill
/api/paygatecontroller/listBillPresentmentAudits/:ref/:userRef
Get bill audit trail
/api/paygatecontroller/reauthBillPresentment
Re-authenticate bill for card expiry (creates new bill linked to old)
/api/paygatecontroller/requestCreditTransaction
Process full or partial refund
/api/clients/createclient
Create a new client profile
/api/mobimandate/generateMobiMandateRequest
Create Mobi-Mandate for debit order sign-up
/api/collections/updateCollectionStatus
Update collection status (activate/suspend/cancel)
/api/creditdistribution/createCreditDistribution
Create credit distribution (payout to bank account)
/api/auth/generatetoken
Generate Bearer token (handled automatically by SDK)
| Card Number | 3DS | MOTO | Description |
|---|---|---|---|
4790 4444 4444 4444 |
Success | Success | Both 3DS and MOTO succeed |
4790 3333 3333 3333 |
Success | Fail | 3DS succeeds, MOTO fails |
CVV: Any 3 digits | Expiry: Any future date