Skip to main content

Overview

The Join Markt Embed SDK drops modal checkout onto an external merchant site. Buyers stay on the merchant page; payment and delivery still run on Join Markt hosted checkout inside an iframe.
Globals: window.Markt and alias window.MarktEmbed. Local demo:
Dashboard: product page → Embed Checkout.

Quick start

Save the product once so variant UUIDs stay stable before shipping snippets.

Data attributes

JavaScript API

Markt.init

Binds [data-markt-product-id], observes late nodes, listens for close messages.

Markt.open

Only items[0] is sent. Multi-item carts are not supported in embed — use storefront checkout start instead.

Markt.close

Hides the overlay and blanks the iframe.

Server round-trip

open POSTs to Create Embed Checkout and loads the returned URL (?embed=1&theme=...) in the iframe. Rate limit: 30 requests / 60 seconds per client.

Close protocol

Checkout posts to the parent:
SDK closes the modal. If returnUrl is present, parent navigates there.

Affiliates

  1. Explicit affiliateCode
  2. ?ref= on the merchant page
  3. markt_affiliate cookie
Stored on the order as referralCode.

CSP

Join Markt allows frame-ancestors * on /embed/* and /checkout/*.

Constraints

  • Private / on-hold products rejected
  • Variants required when the product defines them
  • Quantity clamped 1-99
  • Debounce clicks to stay under the rate limit

Troubleshooting