설치 후 액션 및 온보딩

설치 후 액션 및 온보딩

설치 후 액션 유형

1. 앱으로 링크 (기본값)

{ "post_install_action": { "type": "default" } }

2. 온보딩으로 링크

{ "post_install_action": { "type": "onboarding" } }

3. 설정으로 링크

{ "post_install_action": { "type": "settings" } }

4. 외부 URL로 링크

{
"post_install_action": {
"type": "external",
"url": "https://app.tajo.io/stripe/setup"
}
}

OnboardingView 컴포넌트

import {
Box, Button, Inline, Banner, TextField, Select, Divider,
} from '@stripe/ui-extension-sdk/ui';
import type { ExtensionContextValue } from '@stripe/ui-extension-sdk/context';
import { useState } from 'react';
const OnboardingView = ({ environment, userContext }: ExtensionContextValue) => {
const [step, setStep] = useState(1);
const [brevoApiKey, setBrevoApiKey] = useState('');
const totalSteps = 3;
return (
<Box css={{ padding: 'large' }}>
<Inline css={{ marginBottom: 'large' }}>
{step}단계 / {totalSteps}
</Inline>
{step === 1 && (
<Box>
<Inline css={{ fontWeight: 'bold', fontSize: 'large' }}>
Brevo 계정 연결
</Inline>
<TextField
label="Brevo API Key"
placeholder="xkeysib-..."
value={brevoApiKey}
onChange={(e) => setBrevoApiKey(e.target.value)}
css={{ marginTop: 'medium' }}
/>
<Button
type="primary"
onPress={() => setStep(2)}
disabled={!brevoApiKey}
css={{ marginTop: 'medium' }}
>
Brevo 연결
</Button>
</Box>
)}
</Box>
);
};
export default OnboardingView;

Tip

외부 API 호출 없이 복귀 사용자를 감지할 수 있도록 온보딩 완료 상태를 Stripe Secret Store에 저장하세요.

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

AI 어시스턴트

안녕하세요! 문서에 대해 무엇이든 물어보세요.

Brevo로 무료로 시작하기