Connecting...

Welcome to SoftyComp Developer Playground

Test and explore all SoftyComp API features with interactive examples

🔐
Loading...
Authentication
🌐
Sandbox
Environment
📦
v1.1.0
SDK Version
📡
0
Webhooks Received

Quick Start

npm install softycomp-node

💡 Pro tip: Use number keys (1-8) to quickly switch between tabs

💳 Card Payments

Create once-off and recurring payment bills with hosted checkout pages

📝 Bill Management

Update, expire, and track bill status with full audit trail

🔄 Debit Orders

Mobi-Mandate integration for monthly and yearly collections

👥 Client Management

Create client profiles and process payouts to bank accounts

🔔 Webhooks

Real-time payment notifications with signature verification

🔐 Type-Safe

Full TypeScript support with autocomplete and type checking

Card Payments (Bill Presentment)

Create hosted payment links for once-off or recurring bills

Bill Management

Get status, update, expire bills, and view audit trail. All operations are tracked and auditable.

Get Bill Status

Update Bill

Expire / Cancel Bill

Bill Audit Trail

Re-authenticate Bill (Card Expiry)

Debit Orders (Mobi-Mandate)

Create debit order mandates and manage collection status. Customer signs mandate via secure mobile flow.

Create Mobi-Mandate

Update Collection Status

Clients & Payouts

Create client profiles and process credit distributions

Create Client

Credit Distribution (Payout)

Process Refund

Webhooks

Live webhook feed and history

Webhook URL: http://localhost:4021/webhook

Configure this URL in your SoftyComp dashboard

Live Feed Status: Connecting...

Real-time events via Server-Sent Events

Event Types:
Pending Successful Failed Cancelled

Live Feed

No webhooks received yet. Create a payment to see events.

History

No webhook history

Code Examples

Copy-paste examples for all SoftyComp operations

Installation & Setup

npm install softycomp-node
import { SoftyComp } from 'softycomp-node';

const client = new SoftyComp({
  apiKey: 'your-api-key',
  secretKey: 'your-secret-key',
  sandbox: true,
});

Create Once-off Bill

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);

Create Monthly Subscription

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',
});

Get Bill Status

const status = await client.getBillStatus('BILL-REF-123');

if (status.status === 'completed') {
  console.log('Payment received on:', status.paidAt);
}

Create Debit Order Mandate

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);

Webhook Handler

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');
});

Process Refund

// Full refund
const refund = await client.refund({
  transactionId: 'TXN-123',
});

// Partial refund
const refund = await client.refund({
  transactionId: 'TXN-123',
  amount: 50.00,
});

Update Bill

await client.updateBillPresentment({
  reference: 'BILL-REF-123',
  amount: 399.00,
  description: 'Updated description',
  customerName: 'John Doe',
  customerEmail: 'john@example.com',
  customerPhone: '0825551234',
});

Expire/Cancel Bill

await client.setBillToExpiredStatus('BILL-REF-123', 'USER-REF-123');

Get Bill Audit Trail

const audits = await client.listBillPresentmentAudits(
  'BILL-REF-123',
  'USER-REF-123'
);

audits.forEach(audit => {
  console.log(`${audit.timestamp}: ${audit.description}`);
});

Create Client

const clientId = await client.createClient({
  name: 'John',
  surname: 'Doe',
  email: 'john@example.com',
  phone: '0825551234',
  idNumber: '8001015009087',
});

Update Collection Status

await client.updateCollectionStatus({
  collectionId: 12345,
  statusTypeId: 2, // 1=Active, 2=Suspended, 6=Cancelled
});

Credit Distribution (Payout)

const result = await client.createCreditDistribution({
  amount: 500.00,
  accountNumber: '1234567890',
  branchCode: '123456',
  accountName: 'John Doe',
  reference: 'PAYOUT-001',
});

API Reference

Complete list of all SoftyComp API endpoints

Bill Presentment

POST /api/paygatecontroller/requestbillpresentment

Create a payment bill (once-off or recurring)

GET /api/paygatecontroller/listBillPresentmentDetails/:ref/:userRef

Get bill payment status

POST /api/paygatecontroller/updateBillPresentment

Update bill details (amount, description, customer info)

POST /api/paygatecontroller/setBillToExpiredStatus/:ref/:userRef

Expire/cancel a bill

GET /api/paygatecontroller/listBillPresentmentAudits/:ref/:userRef

Get bill audit trail

POST /api/paygatecontroller/reauthBillPresentment

Re-authenticate bill for card expiry (creates new bill linked to old)

Refunds

POST /api/paygatecontroller/requestCreditTransaction

Process full or partial refund

Client Management

POST /api/clients/createclient

Create a new client profile

Debit Orders

POST /api/mobimandate/generateMobiMandateRequest

Create Mobi-Mandate for debit order sign-up

POST /api/collections/updateCollectionStatus

Update collection status (activate/suspend/cancel)

Payouts

POST /api/creditdistribution/createCreditDistribution

Create credit distribution (payout to bank account)

Authentication

POST /api/auth/generatetoken

Generate Bearer token (handled automatically by SDK)

Test Cards (Sandbox Only)

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