Default Mode: A Purchase Panel at the Bottom of the Page
The simplest way to integrate: include the SDK and a RAKUFUN purchase panel appears at the bottom of the page. Then tell the SDK which product this is, and you're ready. No changes to your page layout are needed.
When to use it: you want the fastest integration, or you're not sure yet which mode to use. If you want the purchase entry at a specific spot on the page, see Button Mode or Banner Mode.
Live Demo
🎨 默认模式实时演示
查看底部滑动面板的效果
Integration Steps
Step 1: Include the SDK
Add this line to the HTML of your product page, usually right before </body>:
<script src="https://sdk.rakufun.com/rakufun-universal.min.js"></script>After the page finishes loading, the purchase panel appears at the bottom automatically (hidden by default for Japanese IPs, see the FAQ below).
Step 2: Set the product information
Right after that line, tell the SDK which product the current page is about. When the user clicks the purchase button in the panel, the RAKUFUN product page opens in a new tab with this information.
<script>
rakufun.setUIProductData({
url: window.location.href, // Address of the current product page
title: 'iPhone 15 Pro Max', // Product name
price: '189800', // Price, digits only, no ¥ or commas
images: ['https://example.com/iphone.jpg'], // Product images, full addresses
description: 'Latest flagship model, 256GB' // Product description (optional)
});
</script>setUIProductData must come after the line that includes the SDK, otherwise you'll see rakufun is not defined. For the other fields you can pass, see API Reference - Product Information Fields.
FAQ
The bottom panel doesn't show?
Check in this order:
- Are you testing from Japan? It's hidden by default for Japanese IPs. For testing, call
rakufun.enableDebug()to show it temporarily, and remove it after testing - Open the browser console and check whether the SDK loaded and whether there are errors
- Is
rakufun.disableAutoUI()called on the page? After that, the panel is not shown automatically - Is
rakufun.setUIMode('button')orsetUIMode('banner')called? After switching to either of those modes, the bottom panel is not shown
Clicking the purchase button in the panel shows "未设置商品数据" (no product data set)?
rakufun.setUIProductData() hasn't been called yet. Add it as in Step 2 above.
Other Integration Options
- Button Mode - Shows a purchase button where you choose
- Banner Mode - Shows a banner where you choose
- Custom Mode - Use your own button
Questions? Contact us: service@rakufun.com