Search.../

getCurrentMemberCoupons( )

Developer Preview

Retrieves the loyalty coupons for the currently logged-in member.

Syntax

function getCurrentMemberCoupons(): Promise<GetCurrentMemberCouponsResponse>

getCurrentMemberCoupons Parameters

This function does not take any parameters.

Returns

Return Type:

Promise<
GetCurrentMemberCouponsResponse
>
NAME
TYPE
DESCRIPTION
loyaltyCoupons
Array<
LoyaltyCoupon
>

Retrieved loyalty coupons.

Was this helpful?

getCurrentMemberCoupons example

Copy Code
1import { coupons } from 'wix-loyalty.v2';
2
3 async function getCurrentMemberCoupons() {
4 try {
5 const result = await coupons.getCurrentMemberCoupons();
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13