Skip to content

stgctkm/subscription-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subscription-stripe

subscription sample

事前準備

サービス、料金の登録

dashboard、もしくはcliで登録

https://stripe.com/docs/billing/subscriptions/fixed-price#create-business-model

cli/stripe products create \
  --name="稽古" \
  --description="稽古のサービス"

{
  "id": "prod_H94k5odtwJXMtQ",
  • priceの登録
    • application.properties に設定して、subscribe 時に使用する
stripe prices create \
  -d product=prod_H94k5odtwJXMtQ \
  -d unit_amount=1500 \
  -d currency=jpy \
  -d "recurring[interval]"=month

実行環境の設定

環境変数

dashboard から取得する

key value
STRIPE_API_SECRET_KEY xxx
STRIPE_WEBHOOK_SECRET xxx

screen shot

  • start index

  • Customer 登録 customer

  • クレジットカード登録 Save a card

  • クレジットカード登録結果 complete

  • Subscribe Subscibe

  • 結果 Result

About

subscription sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published