One customer billing embed
Configure plans, wallet connection, checkout and access management in one embed.
Design in Builder
- 1
Prepare the catalog
Create features and active provider plans. Authorize and fund provider gas in Network & gas before opening paid checkout.
- 2
Design your embed
Open /app/builder. Choose plans, edit Content and Appearance, and preview the actual unified customer component on desktop or mobile.
- 3
Save or publish
Save draft keeps changes private. Publish embed creates an explicit hosted snapshot. Concurrent edits require the latest revision rather than overwriting another tab.
- 4
Add to your app
Choose React or Website installation. The unified cmp_customer component includes Plans, My access and Checkout. Customer payments and cancellation still require wallet approval.
React installation
import { BagsevenEmbed } from "@bagseven/sdk/react";
// holder and customerToken come from your authenticated backend.
<BagsevenEmbed
component="cmp_customer"
mode="inline"
apiUrl="/api/public"
holder={holder}
accessToken={customerToken}
planIds={["your-plan-id"]}
/>This example uses the console BFF. In another application, provide a suitable authenticated proxy/API base and CORS policy. React configuration is a snapshot; copy it again after changing the installation settings.
The console supplies its themed wallet controls. Default SDK payment helpers need a compatible injected EVM wallet. Supply walletProvider and walletAddress for the host EIP-1193 connector. walletSlot changes presentation; it does not select a payment provider by itself. Multiple authorized accounts have an explicit paying-account selector.
Hosted iframe installation
Copy the Website snippet from Builder after publishing. The iframe references /embed?design=DESIGN_ID&parent=MERCHANT_ORIGIN. The parent waits for bagseven:ready, obtains a short-lived token from its own authenticated customer-token endpoint, then sends bagseven:authorize with token and holder. Both sides verify the exact origin and window source.
Your backend authenticates the customer, calls BagsevenClient.identify with that holder using a server secret, and returns only the scoped token. Never accept an unauthenticated holder or put customer tokens in iframe URLs, saved designs or copied public snippets.
A published design can show public plans. Personal access and mutations require the authenticated host handshake. Publishing a design does not issue grants or create subscriptions.