Skip to content

Installation

  1. Open your Appy Stamp admin panel
  2. Go to Settings > Developers
  3. Click Generate Keys if you haven’t already
  4. Copy your SDK Key (public) and SDK Secret (private, keep this server-side)

Place this snippet in your HTML, ideally before the closing </body> tag:

<script>
window.APPY_SDK = {
sdkKey: 'YOUR_SDK_KEY'
};
</script>
<script async src="https://storage.googleapis.com/scripts.appydesign.io/sdk/v1/appy-stamp-sdk.min.js"></script>

This loads the SDK with public-only access. Shop settings, earning rules, rewards, and VIP tiers will be available, but customer-specific data will not.

To access customer data (balance, activity, redemption), you need to pass customer details and an HMAC hash. The hash must be computed server-side using your SDK Secret.

<script>
window.APPY_SDK = {
sdkKey: 'YOUR_SDK_KEY',
customer: {
id: 12345,
email: 'customer@example.com',
firstName: 'John',
lastName: 'Doe',
hash: 'HMAC_SHA256_HASH'
}
};
</script>
<script async src="https://storage.googleapis.com/scripts.appydesign.io/sdk/v1/appy-stamp-sdk.min.js"></script>

See Authentication for how to compute the hash in different languages.

Open your browser console and run:

appyStamp.shop().then(console.log);

You should see your shop settings (program name, stamp branding, etc). If a customer is authenticated:

appyStamp.customer().then(console.log);

The window.APPY_SDK object accepts these properties:

PropertyRequiredDescription
sdkKeyYesYour public SDK key from Settings > Developers
customerNoCustomer object for authenticated access
customer.idYes (if customer)The customer’s ID in your system
customer.emailYes (if customer)The customer’s email address
customer.firstNameYes (if customer)The customer’s first name
customer.lastNameYes (if customer)The customer’s last name
customer.hashYes (if customer)HMAC-SHA256 hash (see Authentication)
baseUrlNoOverride the API base URL (for testing only)