Process a Payment
Learn how to transfer funds between accounts, send local payments via SARIE, and process international transfers via SWIFT. Hyperscale routes payments through the optimal provider automatically.
Payment Types
Choose the right payment type based on destination and speed requirements.
Internal Transfer
Instant
Transfer between Hyperscale accounts
- →No fees
- →24/7 availability
- →Instant settlement
SARIE (Local)
Same day
Saudi local payments via SARIE network
- →Low fees
- →All Saudi banks
- →Real-time settlement
SWIFT (International)
1-5 days
Cross-border payments worldwide
- →200+ countries
- →Multiple currencies
- →Correspondent banking
Internal Transfer
Transfer funds instantly between accounts on the Hyperscale platform. No fees, instant settlement.
1import { Hyperscale } from '@hyperscale/sdk';23const hyperscale = new Hyperscale({4 apiKey: process.env.HYPERSCALE_API_KEY,5});67// Transfer between Hyperscale accounts (instant)8const transfer = await hyperscale.payments.transfer({9 sourceAccountId: 'acc_01HXK4N...',10 destinationAccountId: 'acc_02JYL5M...',11 amount: {12 value: 1000.00,13 currency: 'SAR',14 },15 reference: 'Invoice #1234',16});1718console.log('Transfer ID:', transfer.id);19console.log('Status:', transfer.status); // 'COMPLETED'SARIE Local Payment
Send payments to any Saudi bank account through the SARIE real-time payments network.
1// SARIE transfer (Saudi local payments)2const sariePayment = await hyperscale.payments.sendLocal({3 sourceAccountId: 'acc_01HXK4N...',4 beneficiary: {5 name: 'Ahmed Mohammed',6 iban: 'SA0380000000608010167519',7 bankCode: 'NCBK', // Al-Ahli Bank8 },9 amount: {10 value: 5000.00,11 currency: 'SAR',12 },13 purpose: 'SALA', // Salary payment14 reference: 'Payroll March 2024',15});1617console.log('Payment ID:', sariePayment.id);18console.log('Status:', sariePayment.status); // 'PENDING' -> 'COMPLETED'Purpose Codes: SAMA requires a purpose code for all local payments. Common codes: SALA (salary), SUPP (supplier), RENT (rent), LOAN (loan repayment).
SWIFT International Payment
Send payments worldwide through the SWIFT network. Supports multiple currencies and 200+ countries.
1// SWIFT transfer (international)2const swiftPayment = await hyperscale.payments.sendInternational({3 sourceAccountId: 'acc_01HXK4N...',4 beneficiary: {5 name: 'John Smith',6 iban: 'GB82WEST12345698765432',7 swiftCode: 'WESTGB2L',8 address: {9 line1: '123 High Street',10 city: 'London',11 country: 'GB',12 },13 },14 amount: {15 value: 10000.00,16 currency: 'USD',17 },18 chargeBearer: 'SHA', // Shared charges19 reference: 'Contract Payment',20});2122console.log('Payment ID:', swiftPayment.id);23console.log('Expected arrival:', swiftPayment.estimatedArrival);Payment Lifecycle
Payments transition through states as they are processed.
| State | Description |
|---|---|
PENDING | Payment initiated, awaiting processing |
PROCESSING | Being processed by the network |
COMPLETED | Successfully delivered to beneficiary |
FAILED | Payment failed, funds returned |
CANCELLED | Cancelled before processing |
Cancel a Payment
Payments in PENDING state can be cancelled before processing begins.
1// Cancel a pending payment2const cancelled = await hyperscale.payments.cancel(payment.id, {3 reason: 'USER_REQUESTED',4});56if (cancelled) {7 console.log('Payment cancelled successfully');8}