Gömülü Stripe Apps
Gömülü Stripe Apps
Gömülü Stripe Apps, Connect gömülü bileşenlerini kullanarak Stripe Apps işlevselliğini doğrudan kendi web arayüzünüze entegre etmenizi sağlar.
Kurulum
npm install @stripe/connect-jsTemel Kurulum
import { loadConnectAndInitialize } from "@stripe/connect-js";
const stripeConnect = await loadConnectAndInitialize({ publishableKey: "pk_live_...", fetchClientSecret: async () => { const response = await fetch("/api/stripe/session"); const { clientSecret } = await response.json(); return clientSecret; },});Stripe App Görünümünü Gömme
import { ConnectComponentsProvider, ConnectAppViewport } from "@stripe/react-connect-js";
function CustomerDashboard({ customerId }) { return ( <ConnectComponentsProvider connectInstance={stripeConnect}> <ConnectAppViewport app="com.tajo.brevo-integration" viewport="stripe.dashboard.customer.detail" objectContext={{ id: customerId, object: "customer" }} /> </ConnectComponentsProvider> );}Sonraki Adımlar
- Kurulum ve Derin Bağlantılar, Dağıtım için URL’ler oluşturun