useCustomer
SolvaPay SDK / react/src / useCustomer
Function: useCustomer()
useCustomer():
CustomerInfo
Defined in: packages/react/src/hooks/useCustomer.ts:45
Hook to access customer information Returns customer data (email, name, customerRef) separate from subscription data
Returns
Example
import { useCustomer } from '@solvapay/react';
function MyComponent() {
const { email, name, customerRef } = useCustomer();
return (
<div>
<p>Email: {email || 'Not provided'}</p>
<p>Name: {name || 'Not provided'}</p>
</div>
);
}