Skip to content

liveview-native/stripe_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FruitStand

Sample integration of Stripe Checkout with LiveView Native.

Setup

  1. Create a Stripe account and put the secret in the STRIPE_SECRET environment variable:
STRIPE_SECRET=sk_test_***
  1. Create a product for 100 coins and put the price ID in the 100_COINS_PRICE_ID environment variable:
100_COINS_PRICE_ID=price_***
  1. Create a webhook for checkout.session.completed and put the webhook secret in the STRIPE_WEBHOOK_SECRET environment variable:
STRIPE_WEBHOOK_SECRET=whsec_***
  1. Update priv/static/.well-known/apple-app-site-association with your developer team ID and app bundle ID.
{
  "applinks": {
    "details": [{
      "appIDs": ["[TEAM_ID].[BUNDLE_ID]"],
      ...
    }],
    ...
  }
}
  1. Set the BASE_URL environment variable to use for redirects in the Stripe checkout session. You can use a service like ngrok to test universal links locally.
BASE_URL=https://example.com

Running

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published