UQPayClient. Each namespace maps to a UQPAY product.
Account
// Retrieve a single account
const account = await client.account.accounts.retrieve('acc-123')
// List accounts
const page = await client.account.accounts.list({ page_number: 1, page_size: 20 })
// Create a sub-account
const subAccount = await client.account.subAccounts.create({
business_type: 'BANKING',
entity_type: 'COMPANY',
nickname: 'My Sub-account',
})
// Get required additional documents for a country
const docs = await client.account.additionalDocs.get({
country: 'SG',
business_code: 'BANKING',
})
Global Account
Balances
const balances = await client.banking.balances.list({ page_number: 1, page_size: 20 })
const transactions = await client.banking.balances.listTransactions({ page_number: 1, page_size: 20 })
Deposits
const deposits = await client.banking.deposits.list({ page_number: 1, page_size: 20 })
Transfers
const transfer = await client.banking.transfers.create({
source_account_id: 'acc-123',
destination_account_id: 'acc-456',
currency: 'SGD',
amount: 100,
})
const transfers = await client.banking.transfers.list({ page_number: 1, page_size: 20 })
Payouts
const payout = await client.banking.payouts.create({
beneficiary_id: 'ben-123',
currency: 'SGD',
amount: 50,
purpose_code: 'PERSONAL',
})
Beneficiaries
const beneficiary = await client.banking.beneficiaries.create({
// ...
})
const beneficiaries = await client.banking.beneficiaries.list({ page_number: 1, page_size: 20 })
Conversions
// Get a quote
const quote = await client.banking.conversions.createQuote({
sell_currency: 'SGD',
buy_currency: 'USD',
amount: 100,
fixed_side: 'SELL',
})
// Execute the conversion
const conversion = await client.banking.conversions.create({
quote_id: quote.quote_id,
})
// Get current exchange rates
const rates = await client.banking.conversions.listCurrentRates({
currency_pairs: ['SGD/USD', 'USD/SGD'],
})
Virtual accounts
const va = await client.banking.virtualAccounts.create({
currency: 'SGD',
})
Payment methods
const methods = await client.banking.paymentMethods.list({ page_number: 1, page_size: 20 })
Card Issuance
Cardholders
const cardholder = await client.issuing.cardholders.create({
email: 'user@example.com',
first_name: 'Jane',
last_name: 'Smith',
country_code: 'SG',
phone_number: '+6512345678',
})
Cards
// Create a card
const card = await client.issuing.cards.create({
card_currency: 'SGD',
cardholder_id: cardholder.cardholder_id,
card_product_id: 'prod-123',
})
// List and retrieve
const cards = await client.issuing.cards.list({ page_number: 1, page_size: 20 })
const retrieved = await client.issuing.cards.retrieve(card.card_id)
// Freeze / unfreeze
await client.issuing.cards.updateStatus(card.card_id, { card_status: 'FROZEN' })
await client.issuing.cards.updateStatus(card.card_id, { card_status: 'ACTIVE' })
// Recharge and withdraw
await client.issuing.cards.recharge(card.card_id, { amount: 100 })
await client.issuing.cards.withdraw(card.card_id, { amount: 50 })
Secure card display (iframe)
Returns a short-lived URL (60 seconds) that renders card number, CVV, and expiry in a PCI-compliant embedded iframe hosted by UQPAY:const { iframeUrl, expires_at } = await client.issuing.cards.getSecureIframeUrl(card.card_id)
console.log(iframeUrl) // https://embedded-sandbox.uqpaytech.com/iframe/card?token=...
console.log(expires_at) // 2026-04-02T18:50:23+08:00
const { iframeUrl } = await client.issuing.cards.getSecureIframeUrl(card.card_id, {
lang: 'zh',
styles: { '.card-number': { color: '#333', 'font-size': '18px' } },
})
Balances and transactions
const balances = await client.issuing.balances.list({ page_number: 1, page_size: 20 })
const balance = await client.issuing.balances.retrieve('SGD')
const txns = await client.issuing.balances.listTransactions({ page_number: 1, page_size: 20 })
const transactions = await client.issuing.transactions.list({ page_number: 1, page_size: 20 })
Transfers
const transfer = await client.issuing.transfers.create({
source_account_id: 'acc-123',
destination_account_id: 'acc-456',
currency: 'SGD',
amount: 100,
})
Products and reports
const products = await client.issuing.products.list({ page_number: 1, page_size: 20 })
const report = await client.issuing.reports.create({
report_type: 'SETTLEMENT',
start_time: '2026-01-01T00:00:00Z',
end_time: '2026-01-31T23:59:59Z',
})
Payment
Payment intents
const intent = await client.payment.paymentIntents.create({
amount: '100.00',
currency: 'SGD',
})
await client.payment.paymentIntents.confirm(intent.payment_intent_id, { /* ... */ })
await client.payment.paymentIntents.capture(intent.payment_intent_id, { /* ... */ })
await client.payment.paymentIntents.cancel(intent.payment_intent_id)
const intents = await client.payment.paymentIntents.list({ page_number: 1, page_size: 20 })
Refunds
const refund = await client.payment.refunds.create({
payment_intent_id: intent.payment_intent_id,
amount: '50.00',
})
const refunds = await client.payment.refunds.list({ page_number: 1, page_size: 20 })
Bank accounts
const bankAccount = await client.payment.bankAccounts.create({
currency: 'USD',
bank_account_number: '1234567890',
bank_routing_number: '021000021',
bank_address: '12 Marina Blvd, Singapore',
})
Payouts
const payout = await client.payment.payouts.create({
bank_account_id: bankAccount.bank_account_id,
amount: '100.00',
currency: 'USD',
})
Balances, attempts, and settlements
const balances = await client.payment.balances.list({ page_number: 1, page_size: 20 })
const attempts = await client.payment.paymentAttempts.list({ page_number: 1, page_size: 20 })
const settlements = await client.payment.settlements.list({ page_number: 1, page_size: 20 })
Supporting (file upload / download)
import { readFileSync } from 'fs'
// Upload a file
const uploaded = await client.supporting.files.upload(
readFileSync('./kyc-document.pdf'),
{ filename: 'kyc-document.pdf', mimeType: 'application/pdf' }
)
console.log(uploaded.file_id)
// Get download links
const links = await client.supporting.files.downloadLinks([uploaded.file_id])
Simulator (sandbox only)
The simulator is only available in the
sandbox environment. Calling any simulator method in production throws a SimulatorNotAvailableError.// Simulate a card authorization
const auth = await client.simulator.issuing.authorize({
card_id: 'card-123',
transaction_amount: 25,
transaction_currency: 'SGD',
merchant_name: 'Coffee Shop',
merchant_category_code: '5734',
})
// Simulate a reversal
await client.simulator.issuing.reverse({
transaction_id: auth.transaction_id,
})
// Simulate a deposit
const deposit = await client.simulator.deposits.simulate({
currency: 'SGD',
amount: 500,
sender_swift_code: 'WELGBE22',
})

