IkasCustomerStore
customerIkasCustomer | null | undefinedRefer to the IkasCustomer reference.
initializedbooleantrue if the store is successfully initialized.
customerConsentGrantedbooleantrue if the customer accepted the cookies.
isCaptchaRequiredbooleanThere are several operations that might require captcha validation.
The ikas merchant can select from the dashboard to utilize captcha or not.
If the merchant prefers to use captcha, this field will return true.
socialLoginfunctionInitiates the social login flow, by redirecting the customer to the appropriate provider's URL.
async socialLogin(provider: "facebook" | "google")
provider
:
"facebook" | "google"
socialLoginTokenfunctionPerforms login with the token received from the social login provider.
async socialLoginToken(token: string)
token
:
string
registerfunctionasync register( firstName: string, lastName: string, email: string, password: string, isMarketingAccepted?: boolean, attributes?: IkasCustomerAttributeValue[] )
firstName
:
string
lastName
:
string
email
:
string
isMarketingAccepted
:
boolean | undefined
attributes
:
IkasCustomerAttributeValue[] | undefined
recoverPasswordfunctionasync recoverPassword(password: string, passwordAgain: string, token: string)
password
:
string
passwordAgain
:
string
token
:
string
getOrderByEmailfunctionGet a specific customer order by email and orderNumber.
async getOrderByEmail(email: string, orderNumber: string)
getOrderTransactionsfunctionGet payment transactions of an order.
async getOrderTransactions(params: { checkoutId?: string; id?: string; orderId?: string; } = {})
params
:
{checkoutId?: string; id?: string; orderId?: string;}
createEmailSubscriptionfunctionSubscribe to the newsletter/marketing notifications.
async createEmailSubscription(email: string)
onCustomerConsentGrantfunctionCallback to call when the customer accepts the cookies.
onCustomerConsentGrant()
waitUntilInitializedfunctionUse this function to wait for the customer store initialization. The customer field will be filled if the customer is logged-in.
waitUntilInitialized()