메인 콘텐츠로 건너뛰기
POST
/
subscriptions
/
portal
curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/portal \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "returnUrl": "https://yourapp.com/settings/billing"
  }'
{
  "url": "https://billing.stripe.com/p/session/test_a1b2c3d4..."
}

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

개요

사용자가 다음을 할 수 있는 Stripe Customer Portal 세션을 만듭니다:
  • 결제 수단 갱신
  • 청구 내역 조회
  • 구독 플랜 변경
  • 인보이스 다운로드
  • 구독 취소
세션 기반 인증(JWT 액세스 토큰)이 필요합니다.
서드파티 연동: API 키 인증을 사용할 때는 대신 POST /subscriptions/portal/api를 사용하세요.

인증

Authorization
string
필수
JWT 액세스 토큰입니다. 형식: Bearer YOUR_ACCESS_TOKEN

요청 본문

returnUrl
string
사용자가 포털을 나왔을 때 돌아갈 URL입니다. 기본값은 앱 대시보드입니다.
curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/portal \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "returnUrl": "https://yourapp.com/settings/billing"
  }'
{
  "url": "https://billing.stripe.com/p/session/test_a1b2c3d4..."
}

응답 필드

url
string
사용자를 보낼 URL입니다. Stripe에서 호스트하는 청구 포털입니다.

포털 기능

Stripe Customer Portal에서 사용자가 할 수 있는 작업은 다음과 같습니다:
기능설명
결제 수단카드 추가·수정·삭제
인보이스과거 인보이스 조회 및 다운로드
플랜 변경구독 업그레이드 또는 다운그레이드
구독 취소구독 해지
청구 기록과거 거래 조회

오류 응답

400
잘못된 요청 — 청구 계정이 없습니다. 먼저 결제가 있어야 합니다.
401
인증 실패 — 토큰이 없거나 유효하지 않습니다.
청구 포털은 이전에 구매했거나 활성 구독이 있는 사용자에게만 제공됩니다. 신규 사용자는 Checkout 엔드포인트를 사용하세요.

POST /subscriptions/portal/api

API 키 인증으로 Stripe Customer Portal 세션을 생성합니다. 서드파티 연동에 적합합니다.

인증

API 키 인증이 필요합니다. Authorization 헤더에 API 키를 넣습니다:
Authorization: Bearer llmgen_your_api_key_here

요청 본문

/subscriptions/portal와 동일합니다.

응답

/subscriptions/portal와 동일합니다.
curl -X POST https://api.llmgenerator.com/api/v1/subscriptions/portal/api \
  -H "Authorization: Bearer llmgen_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "returnUrl": "https://yourapp.com/settings/billing"
  }'

권장 사항

  • 설정에 링크: 앱 설정에「청구 관리」버튼을 둡니다
  • 결제 직후: 구독 구매 후 포털로 안내합니다
  • 지원: 청구 관련 문의는 셀프서비스로 포털을 제공합니다