수익화 (멤버십 / 슈퍼챗)
멤버십(등급 조회·가입·해지)과 슈퍼챗(조회·전송) 모두 SDK 로 동작합니다. 쓰기 작업은 앱 멤버 JWT 가 필요합니다.
멤버십
typescript
// 등급 조회
const tiers = await cb.video.getMembershipTiers('channel-id')
// 가입 (앱 멤버 JWT 필요)
const membership = await cb.video.joinMembership('channel-id', tiers[0].id)
// 해지
await cb.video.cancelMembership('channel-id', membership.id)슈퍼챗
전송은 결제가 필요한 2단계 흐름입니다 — 응답의 client_secret 으로 결제(Stripe)를 확정해야 노출됩니다.
typescript
// 전송 (앱 멤버 JWT 필요) — 대상은 videoId 또는 liveId
const res = await cb.video.sendSuperChat('channel-id', 5000, {
videoId: 'video-id',
message: '응원합니다!',
})
// res.client_secret 으로 결제 확정
// 조회
const superChats = await cb.video.getSuperChats('video-id')📌 PPV(
hasPurchased/listPurchases)나 수익(getRevenue) 메서드는 SDK 에 없습니다. 결제/수익 데이터는 콘솔의 결제/수익화 메뉴에서 조회하세요.