Skip to content
Starter project for the Payfriend application tutorial
JavaScript CSS Python HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Payment Authorization with Authy

Sample application that shows how to use Authy push authorization to validate actions like payment transactions.

Demo video showing how the application works

Create an Authy Application

Sign up for a free Twilio account and create an Authy application in the console:

Copy .env.example to .env and add your AUTHY_API_KEY.

screen shot 2018-12-07 at 3 37 50 pm


On Mac/Linux:

python3 -m venv venv
. venv/bin/activate

Or on Windows cmd:

py -3 -m venv venv

Install Requirements:

pip install -r requirements.txt


export FLASK_APP=payfriend
export FLASK_ENV=development
flask init-db
flask run

Or on Windows cmd:

set FLASK_APP=payfriend
set FLASK_ENV=development
flask init-db
flask run

You'll need a publicly accessible route that Authy can access. Download ngrok and run:

ngrok http 5000

Copy the Forwarding url: screen shot 2018-12-07 at 3 41 47 pm

Head back to the Authy Console and update your Application's Push Authentication callback URL with /payments/callback appended.

screen shot 2018-12-07 at 3 44 42 pm

Open in a browser.

You can’t perform that action at this time.