Skip to content

System Provider

The System Provider handles manual payment methods - specifically cash payments and manual bank transfers.

Overview

AttributeValue
Provider KeySYSTEM
Payment Methods000_CASH, 200_BANK_TRANSFER
SettlementImmediate (manual)
External IntegrationNone

Features

  • Always available - No external dependencies
  • Offline capable - Works without internet
  • Manual confirmation - Cashier confirms receipt
  • Split payment support - Combine with other methods
  • Change calculation - Automatic for cash

Payment Methods

Cash Payment

typescript
const response = await paymentService.checkout({
  source: { type: 'Order', id: 'order-uuid' },
  payment: {
    provider: 'SYSTEM',
    method: '000_CASH',
    total: 150000,
    currency: 'VND',
  },
});

Bank Transfer

typescript
const response = await paymentService.checkout({
  source: { type: 'Order', id: 'order-uuid' },
  payment: {
    provider: 'SYSTEM',
    method: '200_BANK_TRANSFER',
    total: 500000,
    currency: 'VND',
  },
});

Payment Flow

Confirm Payment

typescript
const result = await paymentService.confirmSystemPayment({
  attempt: { id: 'att-uuid' },
  tendered: 200000,
  note: 'Cash payment',
});

// Response
{
  transaction: { status: '302_SUCCESS' },
  attempt: {
    amount: '150000.0000',
    tendered: '200000.0000',
  },
  change: '50000.0000',
}

Split Payment

typescript
// Part 1: QR Payment for 150,000
const qrResponse = await paymentService.checkout({
  source: { type: 'Order', id: orderId },
  payment: { provider: 'VNPAY_QR_MMS', method: '100_QR_CODE', total: 150000 },
});

// Part 2: Cash for remaining 50,000
const cashResponse = await paymentService.checkout({
  transactionId: qrResponse.transaction.id,
  source: { type: 'Order', id: orderId },
  payment: { provider: 'SYSTEM', method: '000_CASH', total: 50000 },
});

// Confirm cash
await paymentService.confirmSystemPayment({
  attempt: { id: cashResponse.attempt.id },
  tendered: 50000,
});

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.