Skip to main content

Overview

This guide will walk you through integrating Sticker into your platform. The entire process takes approximately 2-4 hours and requires implementing two API endpoints.

Prerequisites

Before you begin, make sure you have:
  • Partner API Key (provided by Sticker)
  • Partner ID (UUID provided by Sticker)
  • Backend server capable of making HTTPS requests
  • Frontend capable of rendering iframes
  • HTTPS enabled (required for production)
  • OAuth endpoint (if using OAuth flow)
  • User authentication system
  • Organization/practice data structure

Integration Steps

1

Get Your API Credentials

Contact the Sticker team to receive your:
  • Partner ID
  • Partner API Key
  • API base URL (production or sandbox)
# Store these securely in your environment variables
STICKER_PARTNER_ID=your-partner-uuid
STICKER_API_KEY=your-api-key
STICKER_API_URL=https://api.usesticker.com/v1/
STICKER_SANDBOX_API_KEY=your-staging-api-key
STICKER_API_SANDBOX_URL=https://api.staging.usesticker.com/v1/
2

Implement Organization Setup

When a customer enables the supplies module, call the organization setup endpoint to provision their account.
const response = await fetch('https://api.staging.usesticker.com/v1/partner/organization-setup', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${STICKER_SANDBOX_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    organization: {
      name: 'Terry Health Care',
      email: 'admin@terry.com',
      phone: '+1-555-123-4567',
      addresses: [
        {
          line1: '123 Medical Plaza',
          line2: 'Suite 200',
          city: 'San Francisco',
          state: 'CA',
          zip: '94102',
          country: 'US',
          is_primary: true
        }
      ]
    },
    users: [
      {
        email: 'dr.smith@terry.com',
        first_name: 'Terry',
        last_name: 'Smith',
        role: 'admin'
      }
    ],
    partner_org_id: 'your-internal-org-id',
    access_token: 'oauth-access-token' // Optional, for OAuth flow
  })
});
The partner_org_id is your internal identifier for this organization. You’ll use this to link future requests.
3

Implement User Handshake

Every time a user opens the supplies module, call the handshake endpoint to authenticate them.
const response = await fetch('https://api.staging.usesticker.com/v1/partner/handshake', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${STICKER_SANDBOX_API_KEY}`,
    'Content-Type': 'application/json',
    'X-Partner-Signature': generateSignature(requestBody)
  },
  body: JSON.stringify({
    partner_org_id: 'your-internal-org-id',
    user: {
      email: 'dr.smith@acmemedical.com',
      first_name: 'John',
      last_name: 'Smith'
    }
  })
});

const { session_key, iframe_url } = await response.json();
Session keys expire after 5 minutes and are single-use only. Generate a new one for each user session.
4

Embed the iframe

Use the returned iframe_url with the session_key to embed Sticker in your application.
<iframe
  src="https://app.usesticker.com/{partner_org_id}?session_key=${session_key}"
  width="100%"
  height="800px"
  frameBorder="0"
  allow="payment"
  sandbox="allow-same-origin allow-scripts allow-forms allow-popups"
/>
Make the iframe responsive by setting height: 100vh or using our postMessage API to dynamically adjust height.
5

Test Your Integration

Use our sandbox environment to test your integration before going live.
  • Organization provisioning creates profiles correctly
  • User handshake returns valid session tokens
  • iframe loads and displays products
  • User can add items to cart
  • Checkout process completes successfully
  • Order appears in both platforms

Code Examples

Choose your preferred language/framework:
const express = require('express');
const app = express();

// Organization Setup
app.post('/enable-supplies', async (req, res) => {
  const { organization, users } = req.body;
  
  const response = await fetch('https://api.staging.usesticker.com/v1/partner/organization-setup', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.STICKER_SANDBOX_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      organization,
      users,
      partner_org_id: organization.id
    })
  });
  
  const data = await response.json();
  res.json({ success: true, data });
});

// User Handshake
app.post('/supplies/auth', async (req, res) => {
  const { orgId, user } = req.body;
  
  const response = await fetch('https://api.staging.usesticker.com/v1/partner/handshake', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.STICKER_SANDBOX_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      partner_org_id: orgId,
      user
    })
  });
  
  const { session_key, iframe_url } = await response.json();
  res.json({ session_key, iframe_url });
});

Next Steps

Getting Help

Need assistance? Our team is available to help you with your integration: