Guide10 min
Create Your First Customer
Learn how to create a customer record, understand KYC verification states, and manage the customer lifecycle.
Prerequisites
- Hyperscale SDK installed
- API key configured using Docs → Credentials
- Completed the quickstart
1
Create a Customer
Create a customer by providing basic identity information. The customer will be created in a pending KYC state until verification completes.
create-customer.ts
typescript
1import { Hyperscale } from '@hyperscale/sdk';23const hyperscale = new Hyperscale({4 apiKey: process.env.HYPERSCALE_API_KEY,5 product: 'my-neobank',6});78// Create a new customer9const customer = await hyperscale.customers.create({10 // Required fields11 nationalId: '1234567890',12 email: 'ahmed@example.com',13 phone: '+966501234567',1415 // Optional profile16 firstName: 'Ahmed',17 lastName: 'Al-Rashid',18 dateOfBirth: '1990-05-15',19 nationality: 'SA',20});2122console.log('Customer ID:', customer.id);23console.log('KYC Status:', customer.kycStatus);Required Fields
nationalIdSaudi ID or Iqama number
emailValid email address
phonePhone with country code
2
Understand KYC States
Customers progress through KYC verification states. Monitor these states to know when a customer can access financial services.
pendingAwaiting verification
in_reviewManual review needed
verifiedReady for services
rejectedVerification failed
3
Retrieve Customer
Retrieve a customer by ID to check their current status and KYC verification state.
get-customer.ts
typescript
1// Retrieve customer by ID2const customer = await hyperscale.customers.retrieve('cus_abc123');34console.log('Status:', customer.status);5console.log('KYC Status:', customer.kycStatus);6console.log('Created:', customer.createdAt);4
Update Customer
Update customer profile information. Note that changing certain fields may trigger re-verification.
update-customer.ts
typescript
1// Update customer profile2const updated = await hyperscale.customers.update('cus_abc123', {3 email: 'new.email@example.com',4 phone: '+966509876543',5});67console.log('Updated:', updated.updatedAt);