Customers API
Manage customer records and risk profiles.
Methods
create
const customer = await zenpays.customers.create({
email: 'john@example.com',
name: 'John Doe',
phone: '+1234567890',
})
get
const customer = await zenpays.customers.get('cust_xxx')
update
const customer = await zenpays.customers.update('cust_xxx', {
name: 'John Smith',
})
list
const { data } = await zenpays.customers.list({ limit: 50 })
search
const customers = await zenpays.customers.search('john@example.com')
getRiskProfile
const risk = await zenpays.customers.getRiskProfile('cust_xxx')
getActivityHistory
const activity = await zenpays.customers.getActivityHistory('cust_xxx')
block / unblock
await zenpays.customers.block('cust_xxx', 'Fraudulent activity')
await zenpays.customers.unblock('cust_xxx')