Skip to main content

IkasCustomerStore

Refer to the IkasCustomer reference.

initializedboolean

true if the store is successfully initialized.

customerConsentGrantedboolean

true if the customer accepted the cookies.

isCaptchaRequiredboolean

There 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.

socialLoginfunction
Initiates the social login flow, by redirecting the customer to the appropriate provider's URL.
async socialLogin(provider: "facebook" | "google")
provider
:
"facebook" | "google"
socialLoginTokenfunction
Performs login with the token received from the social login provider.
async socialLoginToken(token: string)
token
:
string
refundOrderfunction
async refundOrder(order: IkasOrder)
order
:
IkasOrder
async login(email: string, password: string)
email
:
string
password
:
string
logoutfunction
logout()
registerfunction
async 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
saveContactFormfunction
async saveContactForm(input: IkasContactForm)
input
:
IkasContactForm
checkEmailfunction
async checkEmail(email: string)
email
:
string
forgotPasswordfunction
async forgotPassword(email: string)
email
:
string
recoverPasswordfunction
async recoverPassword(password: string, passwordAgain: string, token: string)
password
:
string
passwordAgain
:
string
token
:
string
saveCustomerfunction
async saveCustomer(customer: IkasCustomer)
customer
:
IkasCustomer
getOrdersfunction
List orders of the currently logged-in customer.
async getOrders()
getOrderfunction
Get a specific customer order by id.
async getOrder(id: string)
getOrderByEmailfunction
Get a specific customer order by email and orderNumber.
async getOrderByEmail(email: string, orderNumber: string)
getOrderTransactionsfunction
Get payment transactions of an order.
async getOrderTransactions(params: { checkoutId?: string; id?: string; orderId?: string; } = {})
params
:
{checkoutId?: string; id?: string; orderId?: string;}
getFavoriteProductsIdsfunction
async getFavoriteProductsIds()
getFavoriteProductsfunction
async getFavoriteProducts()
addProductToFavoritesfunction
async addProductToFavorites(productId: string)
removeProductFromFavoritesfunction
async removeProductFromFavorites(productId: string)
isProductFavoritefunction
async isProductFavorite(productId: string)
createEmailSubscriptionfunction
Subscribe to the newsletter/marketing notifications.
async createEmailSubscription(email: string)
sendReviewfunction
async sendReview(input: IkasCustomerReviewForm)
onCustomerConsentGrantfunction
Callback to call when the customer accepts the cookies.
onCustomerConsentGrant()
waitUntilInitializedfunction
Use this function to wait for the customer store initialization. The customer field will be filled if the customer is logged-in.
waitUntilInitialized()
waitUntilCaptchaTokenInitializedfunction
waitUntilCaptchaTokenInitialized()
getCustomerAttributesfunction
async getCustomerAttributes()