Skip to main content

πŸ”— Sharing a Wishlist

The Wishlist Plugin supports sharing a wishlist via a secure token system.


πŸ“€ How It Works​

  1. A user (guest or customer) clicks "Share"
  2. Your frontend calls the POST /store/wishlists/:id/share endpoint
  3. The server returns a share token
  4. You generate a shareable link (e.g. /wishlist/import?token=...)
  5. Another user (guest or logged-in) opens the link
  6. Your frontend uses the token to import the list using POST /store/wishlists/import

✨ Use Cases​

  • πŸ› Sharing curated lists with friends
  • 🎁 Gift wishlists for birthdays or weddings
  • πŸ‘€ Guest β†’ Guest transfers
  • πŸ§‘β€πŸ€β€πŸ§‘ Guest β†’ Logged-in or vice versa

πŸ” Is It Secure?​

Yes. The token is signed using your plugin’s shareTokenSecret, and includes only the wishlist_id.
No private user data is embedded.


πŸ“¬ Share a Wishlist​

const { share_token } = await sdk.alphabite.wishlist.share({
id: "wl_...",
});
API Reference

Learn more about our Medusa SDK Wrapper Alphabite Medusa SDK Wrapper πŸ”—

You can view the full endpoint documentation for Create a Wishlist πŸ”—

Frontend Example:​

Generate a shareable link like:

https://yourstore.com/wishlist/import?token=eyJhbGciOi


πŸ“₯ Import a Wishlist​

const { share_token } = await sdk.alphabite.wishlist.import({
share_token: "ey...",
});
API Reference

Learn more about our Medusa SDK Wrapper Alphabite Medusa SDK Wrapper πŸ”—

You can view the full endpoint documentation for Create a Wishlist πŸ”—


πŸ“ Notes​

  • Works for both guest and logged-in customers
  • The import operation copies the original list β€” it doesn’t link or transfer it
  • You can choose to:
    • Automatically import on page load (e.g. /wishlist/import)
    • Or show a confirmation modal before import