Stripe + Next.js 無頭商務:2026 整合指南
你的第一個 Stripe webhook 在費用成功後 847 毫秒內到達。你的資料庫仍顯示「待處理」。客戶重新整理,再次點擊「支付」,現在他們被重複收費了。我曾在三家線上商店淩晨 2 點除錯過這個競態條件。Stripe 的 API 已演進 — Checkout Sessions 現在支援一鍵 Link,Payment Intents 本地處理 Apple Pay 和 Google Pay,而如果你的無伺服器函式重寫原始正文,webhook 簽名驗證會無聲地失敗。本指南涵蓋八種在生產環境中可靠的整合模式:Checkout Sessions、Payment Intents、webhook 冪等性、訂閱生命週期 hook、錢包支付設定,以及三個能防止 847 毫秒噩夢的架構決策。我們從 webhook 處理器開始,因為這是大多數整合首先失敗的地方。
截至 2026 年年中,Stripe 的 API 版本為 2025-12-18.acacia,Next.js 15.x 已穩定,App Router 為預設,@stripe/stripe-js 和 @stripe/react-stripe-js 套件已相當成熟。如果你使用較舊版本進行構建,大部分內容仍然適用,但某些伺服器動作模式會有所不同。
目錄
- 為什麼選擇 Stripe + Next.js 進行無頭商務
- 架構概覽
- 在 Next.js 15 專案中設定 Stripe
- Checkout Sessions:快速路徑
- Payment Intents:完全控制模式
- 實際有效的 Webhook 處理
- 訂閱和循環計費
- Apple Pay、Google Pay 和 Link
- 使用 Link 一鍵結帳
- 安全性、測試和上線
- 效能考量
- 常見問題

為什麼選擇 Stripe + Next.js 進行無頭商務
Stripe 每年處理超過 1 兆美元的支付額。Next.js 驅動越來越多的電子商務店面 — Vercel 報告稱 2026 年超過 40% 的新 Next.js 專案都具有某種形式的商務功能。這種組合有幾個具體的原因:
- 伺服器元件和伺服器動作讓你可以在伺服器端呼叫 Stripe SDK,無需建立單獨的 API 層。
- 邊緣和無伺服器部署到 Vercel、Netlify 或 AWS 意味著你的支付端點會自動擴展。
- React 伺服器元件將你的 Stripe 祕密金鑰保存在伺服器端,不需要額外的技巧。
- App Router 為你提供了針對結帳流程很好地對應的佈局、載入狀態和錯誤邊界。
如果你正在評估無頭商務架構,我們在 Social Animal 已構建過數十個這樣的系統 — 查看我們的 Next.js 開發功能和 無頭 CMS 開發,了解這些部分如何組合在一起的更多背景。
架構概覽
在編寫任何程式碼之前,讓我們先確保架構正確。以下是這些部分在典型無頭商務設定中的連接方式:
┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Next.js App │────▶│ Stripe API │────▶│ Webhooks │
│ (App Router) │◀────│ (Server-side) │ │ Endpoint │
└─────────────────┘ └──────────────────┘ └──────┬──────┘
│ │
│ ▼
▼ ┌─────────────┐
┌─────────────────┐ │ Database / │
│ Headless CMS │ │ Order Mgmt │
│ (Products) │ └─────────────┘
└─────────────────┘
關鍵決策是使用 Checkout Sessions(Stripe 託管或嵌入)還是 Payment Intents(完全自訂 UI)。以下是何時使用每一種:
| 功能 | Checkout Sessions | Payment Intents |
|---|---|---|
| 開發速度 | 快 — 數天 | 慢 — 數週 |
| UI 自訂 | 有限(Stripe 主題) | 完全控制 |
| PCI 合規範圍 | SAQ A(最簡單) | SAQ A-EP |
| 支付方式支援 | 自動(40+ 種方式) | 每種方式手動 |
| 訂閱支援 | 內建 | 需要額外程式碼 |
| Apple Pay / Google Pay | 自動 | 透過 Payment Request API 手動 |
| 轉換最佳化 | Stripe 最佳化 | 你需要自己做 |
| 定價影響 | 相同 Stripe 費用 | 相同 Stripe 費用 |
我的誠實建議:除非有特定原因,否則從 Checkout Sessions 開始。 你稍後隨時可以遷移到 Payment Intents,Stripe 的嵌入式結帳在 2026 年已經相當不錯了。
在 Next.js 15 專案中設定 Stripe
讓我們設定基礎。我假設你有一個帶 App Router 的 Next.js 15 專案。
npm install stripe @stripe/stripe-js @stripe/react-stripe-js
建立你的環境變數:
# .env.local
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
設定一個伺服器端 Stripe 實例。我總是將這個放在 lib/stripe.ts 檔案中:
// lib/stripe.ts
import Stripe from 'stripe';
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: '2025-12-18.acacia',
typescript: true,
});
還有一個客戶端載入器:
// lib/stripe-client.ts
import { loadStripe } from '@stripe/stripe-js';
export const stripePromise = loadStripe(
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!
);
困擾許多人的一件事:永遠不要在客戶端元件中匯入 lib/stripe.ts。 stripe npm 套件包含你的祕密金鑰,只應在伺服器端執行。如果你不小心在 'use client' 檔案中匯入它,Next.js 15 會拋出構建錯誤,這實際上是一個很好的防護措施。

Checkout Sessions:快速路徑
Checkout Sessions 是接受付款的最快方式。Stripe 託管支付表單(或你可以嵌入它),處理 PCI 合規,並自動支援數十種支付方式,包括 Apple Pay、Google Pay 和 Link。
使用伺服器動作建立 Checkout Session
// app/actions/checkout.ts
'use server';
import { stripe } from '@/lib/stripe';
import { redirect } from 'next/navigation';
export async function createCheckoutSession(formData: FormData) {
const priceId = formData.get('priceId') as string;
const quantity = Number(formData.get('quantity')) || 1;
const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items: [
{
price: priceId,
quantity,
},
],
success_url: `${process.env.NEXT_PUBLIC_URL}/checkout/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${process.env.NEXT_PUBLIC_URL}/checkout/canceled`,
automatic_tax: { enabled: true },
// 啟用所有相關的支付方式
payment_method_types: undefined, // 讓 Stripe 自動偵測
});
redirect(session.url!);
}
嵌入式結帳(2026 年推薦方法)
Stripe 的嵌入式結帳讓使用者留在你的網域。這具有更好的轉換率 — Stripe 自己的資料顯示對於回訪客戶,與基於重新導向的結帳相比有 10-15% 的改善。
// app/checkout/embedded/page.tsx
'use client';
import { useCallback } from 'react';
import { loadStripe } from '@stripe/stripe-js';
import {
EmbeddedCheckoutProvider,
EmbeddedCheckout,
} from '@stripe/react-stripe-js';
const stripePromise = loadStripe(
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!
);
export default function CheckoutPage() {
const fetchClientSecret = useCallback(async () => {
const res = await fetch('/api/checkout/embedded', {
method: 'POST',
body: JSON.stringify({ priceId: 'price_xxx', quantity: 1 }),
});
const { clientSecret } = await res.json();
return clientSecret;
}, []);
return (
<div className="max-w-lg mx-auto py-12">
<EmbeddedCheckoutProvider
stripe={stripePromise}
options={{ fetchClientSecret }}
>
<EmbeddedCheckout />
</EmbeddedCheckoutProvider>
</div>
);
}
以及 API 路由:
// app/api/checkout/embedded/route.ts
import { stripe } from '@/lib/stripe';
import { NextResponse } from 'next/server';
export async function POST(req: Request) {
const { priceId, quantity } = await req.json();
const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items: [{ price: priceId, quantity }],
ui_mode: 'embedded',
return_url: `${process.env.NEXT_PUBLIC_URL}/checkout/success?session_id={CHECKOUT_SESSION_ID}`,
});
return NextResponse.json({ clientSecret: session.client_secret });
}
Payment Intents:完全控制模式
當你需要完全自訂結帳 UI 時 — 也許你正在構建單頁結帳,或你的設計團隊有特定要求 — Payment Intents 給你完全控制。
折衷是真實的:你將編寫更多程式碼,處理更多邊界情況,並承擔略高的 PCI 合規負擔。但對於某些產品,這是值得的。
伺服器端:建立 Payment Intents
// app/api/payment-intent/route.ts
import { stripe } from '@/lib/stripe';
import { NextResponse } from 'next/server';
export async function POST(req: Request) {
const { amount, currency = 'usd', metadata } = await req.json();
const paymentIntent = await stripe.paymentIntents.create({
amount, // 以美分計
currency,
metadata,
automatic_payment_methods: {
enabled: true, // 這啟用了 Apple Pay、Google Pay、Link 等
},
});
return NextResponse.json({
clientSecret: paymentIntent.client_secret,
});
}
客戶端:支付表單
// components/PaymentForm.tsx
'use client';
import { useState } from 'react';
import {
PaymentElement,
useStripe,
useElements,
} from '@stripe/react-stripe-js';
export function PaymentForm() {
const stripe = useStripe();
const elements = useElements();
const [error, setError] = useState<string | null>(null);
const [processing, setProcessing] = useState(false);
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
if (!stripe || !elements) return;
setProcessing(true);
setError(null);
const { error: submitError } = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: `${window.location.origin}/checkout/success`,
},
});
if (submitError) {
setError(submitError.message ?? 'Payment failed');
setProcessing(false);
}
// 如果沒有錯誤,Stripe 會自動重新導向
};
return (
<form onSubmit={handleSubmit}>
<PaymentElement
options={{
layout: 'accordion',
wallets: {
applePay: 'auto',
googlePay: 'auto',
},
}}
/>
{error && <p className="text-red-500 mt-2">{error}</p>}
<button
type="submit"
disabled={!stripe || processing}
className="mt-4 w-full bg-black text-white py-3 rounded-lg disabled:opacity-50"
>
{processing ? 'Processing...' : 'Pay now'}
</button>
</form>
);
}
注意伺服器端的 automatic_payment_methods: { enabled: true }。這是 2026 年處理支付方式支援的方式。Stripe 會根據客戶的設備、位置和幣種自動顯示正確的支付方式。不再需要手動列出 payment_method_types。
實際有效的 Webhook 處理
Webhook 是大多數 Stripe 整合失敗的地方。我見過生產系統遺失訂單,因為有人忘記驗證 webhook 簽名,或因為處理器在發送 200 之前拋出了錯誤。
以下是我在戰鬥中測試過的 webhook 處理器:
// app/api/webhooks/stripe/route.ts
import { stripe } from '@/lib/stripe';
import { headers } from 'next/headers';
import { NextResponse } from 'next/server';
import type Stripe from 'stripe';
export async function POST(req: Request) {
const body = await req.text();
const headersList = await headers();
const signature = headersList.get('stripe-signature');
if (!signature) {
return NextResponse.json({ error: 'Missing signature' }, { status: 400 });
}
let event: Stripe.Event;
try {
event = stripe.webhooks.constructEvent(
body,
signature,
process.env.STRIPE_WEBHOOK_SECRET!
);
} catch (err) {
console.error('Webhook signature verification failed:', err);
return NextResponse.json({ error: 'Invalid signature' }, { status: 400 });
}
try {
switch (event.type) {
case 'checkout.session.completed': {
const session = event.data.object as Stripe.Checkout.Session;
await handleCheckoutComplete(session);
break;
}
case 'payment_intent.succeeded': {
const paymentIntent = event.data.object as Stripe.PaymentIntent;
await handlePaymentSuccess(paymentIntent);
break;
}
case 'payment_intent.payment_failed': {
const paymentIntent = event.data.object as Stripe.PaymentIntent;
await handlePaymentFailure(paymentIntent);
break;
}
case 'customer.subscription.created':
case 'customer.subscription.updated':
case 'customer.subscription.deleted': {
const subscription = event.data.object as Stripe.Subscription;
await handleSubscriptionChange(subscription);
break;
}
case 'invoice.payment_failed': {
const invoice = event.data.object as Stripe.Invoice;
await handleInvoiceFailure(invoice);
break;
}
default:
console.log(`Unhandled event type: ${event.type}`);
}
} catch (err) {
console.error(`Error processing ${event.type}:`, err);
// 仍然返回 200 以防止 Stripe 重試
// 記錄錯誤以便手動調查
}
return NextResponse.json({ received: true });
}
Webhook 陷阱我已經用血的教訓學到了
始終返回 200,即使你的處理失敗。否則 Stripe 會重試,你可能會多次處理同一事件。記錄錯誤並非同步處理。
讓處理器具有冪等性。 Stripe 可以並且會多次發送相同事件。使用事件 ID 或物件的元資料來檢查你是否已處理過它。
使用
req.text()而不是req.json()進行簽名驗證。簽名是在原始正文字串上計算的。如果你先解析它,驗證將始終失敗。為本地測試設定 Stripe CLI。 這是必須的。
stripe listen --forward-to localhost:3000/api/webhooks/stripe
- 在 Vercel 上,webhook 路由需要特定配置。 確保你的路由不在任何修改請求正文的中介軟體後面。在 Next.js 15 中,App Router 中的 API 路由預設正確處理這個,但如果你有自訂中介軟體,請仔細檢查。
訂閱和循環計費
訂閱增加了複雜性層。你不只是處理一次性支付 — 你在管理生命週期:試驗、升級、降級、取消、失敗的支付、催收。
透過結帳建立訂閱
最簡單的方法:
// app/actions/subscribe.ts
'use server';
import { stripe } from '@/lib/stripe';
import { redirect } from 'next/navigation';
export async function createSubscriptionCheckout(
customerId: string,
priceId: string
) {
const session = await stripe.checkout.sessions.create({
mode: 'subscription',
customer: customerId,
line_items: [{ price: priceId, quantity: 1 }],
success_url: `${process.env.NEXT_PUBLIC_URL}/account/billing?success=true`,
cancel_url: `${process.env.NEXT_PUBLIC_URL}/pricing`,
subscription_data: {
trial_period_days: 14,
metadata: {
plan: 'pro', // 你自己的元資料
},
},
allow_promotion_codes: true,
tax_id_collection: { enabled: true },
});
redirect(session.url!);
}
管理訂閱
對於客戶入口(升級、降級、取消、更新支付方式),Stripe 的客戶門戶在 2026 年真的很棒:
// app/actions/billing.ts
'use server';
import { stripe } from '@/lib/stripe';
import { redirect } from 'next/navigation';
export async function createBillingPortalSession(customerId: string) {
const session = await stripe.billingPortal.sessions.create({
customer: customerId,
return_url: `${process.env.NEXT_PUBLIC_URL}/account/billing`,
});
redirect(session.url);
}
關鍵訂閱 Webhook 事件
| 事件 | 何時觸發 | 執行的操作 |
|---|---|---|
customer.subscription.created |
新訂閱 | 提供存取權限 |
customer.subscription.updated |
計畫變更、續訂 | 更新存取級別 |
customer.subscription.deleted |
取消(期限結束) | 撤銷存取權限 |
invoice.payment_succeeded |
成功續訂 | 更新計費記錄 |
invoice.payment_failed |
續訂失敗 | 發送催收電郵、標記帳戶 |
customer.subscription.trial_will_end |
試驗結束前 3 天 | 發送提醒電郵 |
不要僅依賴 API 呼叫中的訂閱狀態。Webhook 是訂閱狀態變更的真相來源。我見過一些團隊輪詢 Stripe API 而不是使用 webhook,這既更慢又更不可靠。
Apple Pay、Google Pay 和 Link
Stripe 2026 年 Payment Element 的優點是錢包支付大多只是可行的。但有一些人們遺漏的設定要求。
Apple Pay 設定
需要網域驗證。 你需要在你的網域根目錄託管
.well-known/apple-developer-merchantid-domain-association檔案。Stripe 在你的儀表板中的「設定」→「支付方式」→「Apple Pay」下提供此檔案。在 Next.js 中,將檔案放在
public/.well-known/apple-developer-merchantid-domain-association。在 Stripe 儀表板中註冊你的網域。
Apple Pay 只在 Safari/iOS 上顯示。在 Chrome 測試期間不顯示時不用擔心。
Google Pay 設定
Google Pay 需要較少的設定 — 只要你的 Stripe 帳戶正確配置,它就能自動與 Payment Element 一起使用。它在 Chrome 和 Android 設備上顯示。
Link(Stripe 的一鍵結帳)
Link 是 Stripe 對 Shop Pay 的回應。客戶一次保存他們的支付資訊,並可以在任何使用 Link 的 Stripe 商家處一鍵結帳。
截至 2026 年,Link 在新 Stripe 帳戶上預設啟用。轉換提升是真實的 — Stripe 報告在 Link 可用時結帳完成有顯著改善。對於回訪的 Link 用戶,這要高得多。
使用 Payment Element,Link 會自動顯示。使用 Checkout Sessions,它也是自動的。你不需要做任何特殊的事。
// Link 與 Payment Element 自動,但你可以自訂:
<PaymentElement
options={{
wallets: {
applePay: 'auto',
googlePay: 'auto',
},
// Link 自動出現在電郵欄位中
}}
/>
使用 Link 一鍵結帳
Link 應該有自己的部分,因為它已成為一個嚴肅的轉換驅動器。以下是它的工作原理:
- 客戶在你的結帳表單中輸入他們的電郵。
- 如果他們有 Link 帳戶,他們會透過 SMS 收到驗證碼。
- 驗證後,他們保存的地址和支付方式會自動填充。
- 他們點擊「支付」— 完成。
關鍵見解:Link 可以跨商家使用。 如果你的客戶在完全不同的網站上使用了 Link,他們會在你的網站上獲得一鍵體驗。Stripe 的網路效應是真實的 — 他們報告截至 2026 年初有超過 1 億 Link 用戶。
為了最大化 Link 採用,確保電郵欄位是客戶在結帳流程中與之互動的第一件事。Payment Element 使用 accordion 佈局可以很好地處理這個。
如果你想進一步,你可以使用 Express Checkout Element 在你的表單上方顯示 Apple Pay、Google Pay 和 Link 作為突出的按鈕:
// components/ExpressCheckout.tsx
'use client';
import { ExpressCheckoutElement } from '@stripe/react-stripe-js';
export function ExpressCheckout() {
return (
<ExpressCheckoutElement
onConfirm={async (event) => {
// 處理 express 支付確認
console.log('Express checkout confirmed:', event);
}}
options={{
buttonType: {
applePay: 'buy',
googlePay: 'buy',
},
}}
/>
);
}
安全性、測試和上線
安全檢查清單
- Stripe 祕密金鑰僅在伺服器端使用
- 每個請求都驗證 Webhook 簽名
- 生產環境中強制 HTTPS
- 金額計算發生在伺服器端(永遠不要信任客戶端發送的金額)
- API 路由有速率限制
- 根據你的隱私政策處理客戶資料
- CSP 頭部允許 Stripe 的網域(
js.stripe.com、api.stripe.com)
測試
Stripe 的測試模式非常棒。使用這些測試卡號:
| 卡號 | 場景 |
|---|---|
4242 4242 4242 4242 |
成功支付 |
4000 0000 0000 3220 |
需要 3D Secure |
4000 0000 0000 9995 |
被拒絕 |
4000 0025 0000 3155 |
需要認證 |
4000 0000 0000 0341 |
附加失敗(對於已保存卡) |
對於訂閱測試,使用 Stripe 的測試時鐘來模擬時間流逝,而無需實際等待。
上線
- 將你的金鑰從
sk_test_切換到sk_live_,將pk_test_切換到pk_live_。 - 在 Stripe 儀表板中設定你的實時 webhook 端點。
- 為生產驗證你的 Apple Pay 網域。
- 在 Stripe 儀表板中啟用你想要的支付方式。
- 確保你的 Stripe 帳戶完全啟用(身份驗證、銀行帳戶等)。
效能考量
Stripe.js 約 40KB gzipped。這不是無所謂的。以下是一些提示:
延遲載入 Stripe.js。 不要在每個頁面上載入它 — 只在結帳相關頁面上。
loadStripe函式很好地處理這個;它在你呼叫它之前不會獲取指令碼。使用
@stripe/stripe-js/pure如果你想精確控制何時載入指令碼:
import { loadStripe } from '@stripe/stripe-js/pure';
// 在呼叫 loadStripe() 之前指令碼不會載入
為產品頁面使用伺服器元件。 將 Stripe 客戶端程式碼保持在你的產品清單和詳細頁面之外。只有在使用者實際啟動結帳時才引入客戶端元件。
邊緣執行時用於 API 路由。 Stripe 的 Node.js SDK 可以在邊緣執行時運行。你可以將
export const runtime = 'edge'新增到你的 Stripe API 路由,以降低延遲。
對於構建高效能無頭店面的團隊,像 Astro 這樣的框架也可以成為內容繁重頁面的好選擇,而 Next.js 處理動態結帳流程。我們已經為幾個客戶做過這種混合方法 — 我們的 Astro 開發和 Next.js 開發團隊定期在這些架構上進行協作。
常見問題
Stripe 在 2026 年的交易費用是多少? Stripe 的標準定價是每次成功信用卡費用 2.9% + $0.30(在美國)。對於歐洲卡,為 1.5% + €0.25。處理超過 100 萬美元的企業可獲得批量折扣。沒有設定費用、月費或標準計畫上的隱藏費用。Stripe 對手動輸入的卡額外收取 0.5%,對國際卡收取 1%。
我應該使用 Checkout Sessions 還是 Payment Intents? 在大多數情況下使用 Checkout Sessions。它們更快實現,自動支援 40+ 種支付方式,處理 PCI 合規,Stripe 不斷最佳化轉換率。當你需要無法用嵌入式結帳實現的完全自訂結帳 UI,或當你需要對支付流程進行細粒度控制時(如分割付款或手動擷取),使用 Payment Intents。
我如何在生產環境中處理 webhook 失敗? 始終從 webhook 處理器返回 200 狀態碼,即使你的業務邏輯失敗。記錄錯誤並非同步處理。透過檢查事件 ID 是否與你的資料庫相符來使你的處理器具有冪等性,然後再進行處理。Stripe 會以指數退避方式在最長 3 天內重試 webhook。在 Stripe 儀表板中設定 webhook 失敗警示,並考慮使用佇列(如 AWS SQS 或 Inngest)來非同步處理 webhook 有效負載。
我可以將 Stripe 與像 Sanity 或 Contentful 這樣的無頭 CMS 一起使用嗎? 絕對可以。典型的模式是:在你的無頭 CMS 中存儲產品資訊和內容,在 Stripe 中存儲價格和支付資料,透過共用的產品 ID 或 SKU 連接它們。你的 Next.js 前端從 CMS 獲取內容,當客戶準備購買時建立 Stripe Checkout Sessions 或 Payment Intents。我們在 無頭 CMS 開發工作中廣泛涵蓋這個模式。
我如何在本地測試 Apple Pay?
你無法輕鬆在 localhost 上測試 Apple Pay,因為它需要 HTTPS 和網域驗證。最好的方法是在測試模式中使用 Payment Element 和 4242 測試卡 — 它會模擬支付流程。對於實際的 Apple Pay 測試,部署到具有 HTTPS 的預備環境。Stripe CLI 也支援轉發 Apple Pay 交易的 webhook 事件。
Stripe Link 是否值得啟用? 是的。商家使用 Link 是免費的 — Stripe 不會為它額外收費。它在 Payment Element 和 Checkout Sessions 中自動顯示。Stripe 報告 Link 平均顯著增加結帳完成,對回訪的 Link 用戶的數字更高。啟用它沒有缺點,隨著 2026 年 1 億多 Link 用戶,網路效應很重要。
我如何在 Next.js 中處理計量計費的訂閱?
在 Stripe 中使用計量價格建立訂閱。然後,使用使用記錄 API 從你的後端報告使用。在每個計費期結束時,Stripe 會自動計算總額並向客戶收費。你的 webhook 處理器應該聆聽 invoice.payment_succeeded 和 invoice.payment_failed 事件以保持系統同步。使用 cron 作業或事件驅動架構從伺服器端報告使用。
對於國際客戶,處理貨幣和定價的最佳方式是什麼? Stripe 自適應定價(2025 年推出)在結帳時自動將價格轉換為客戶的本地貨幣。你以基本貨幣設定價格,Stripe 處理轉換、顯示和結算。或者,你可以在 Stripe 中為不同貨幣中的每個產品建立多個價格以獲得更多控制。使用客戶的 IP 或瀏覽器區域設定來確定在你的產品頁面上顯示哪種貨幣。
使用 Stripe 構建無頭商務整合需要花費多少錢? 這取決於範圍。基本的 Checkout Sessions 整合可以在幾天內完成。具有訂閱、客戶門戶、webhook 和自訂 UI 的完整功能設定通常需要 2-6 週的開發時間。如果你想討論你的具體需求,請查看我們的 定價頁面或 聯繫我們 — 我們已在各種行業構建了這些整合,可以為你提供現實的估計。