Software Alternatives & Reviews

Using Stripe to Implement Payment handling on a website

Stripe ngrok
  1. 1
    Online payment processing for internet businesses. Stripe is a suite of payment APIs that powers commerce for online businesses of all sizes. Use Stripe’s payment platform to accept and process payments online for easy-to-use commerce solutions.
    Pricing:
    • Open Source
    First you'll want to go to Stripe's website and setup an account. Then install Stripe with pip install stripe. In this example I'm using Flask for the backend and React for the frontend. The website is an e-commerce page for buying and selling skateboards. Now create some models for the product to sell and the receipts then run flask db init, flask db migrate, and flask db upgrade to create the database. My models look like so:.

    #Online Payments #Recurring Billing #eCommerce Tools 241 social mentions

  2. 2
    ngrok enables secure introspectable tunnels to localhost webhook development tool and debugging tool.
    Pricing:
    • Open Source
    Here we defined a route for the session, and got the product from our database. Now that we have said product we can use the price id stripe provides to determined the amount the user will be charged. We also specified the client_reference_id so when we get the information back we'll know which user made the purchase. You can add a lot here from custom fields to shipping addresses, but for the purposes of this example we won't be needing all the extra fields. Now you'll need to setup a webhook to retrieve the data from stripe after the transaction. I used Ngrok, you can use any service you like. Stripe even offers its own CLI you can use, but I prefer ngrok. If you go with ngrok you'll need to create an account and download ngrok. Once you've done that unzip the file. Sometimes you'll run into issues if it isn't set as a windows environment variable. To set it as such copy the path for the ngrok application. Then in the windows search bar search edit environment variables. You should see something like this:.

    #Testing #Localhost Tools #Webhooks 369 social mentions

Discuss: Using Stripe to Implement Payment handling on a website

Log in or Post with