# Embed Paypal raw html code into dash app

**URL:** https://community.plotly.com/t/embed-paypal-raw-html-code-into-dash-app/50935
**Category:** Dash Python
**Created:** [March 12, 2021, 8:30am UTC](https://community.plotly.com/t/embed-paypal-raw-html-code-into-dash-app/50935 "2021-03-12T08:30:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![monitorcasalab](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/monitorcasalab/32/8866_2.png) [@monitorcasalab](https://community.plotly.com/u/monitorcasalab)
#### Post date: [March 12, 2021, 8:30am UTC](https://community.plotly.com/t/embed-paypal-raw-html-code-into-dash-app/50935/1 "2021-03-12T08:30:04Z")

</div>

Hi All

Anybody had inserted an html generated code in the python dash layout?  
Paypal appears to generate the html with some js with it and i struggle to find a way of succesfully embed into a section of a dah app

any clues?

---

<div class="post-metadata">

### Author: ![bendgame](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bendgame](https://community.plotly.com/u/bendgame)
#### Post date: [June 10, 2021, 4:12am UTC](https://community.plotly.com/t/embed-paypal-raw-html-code-into-dash-app/50935/2 "2021-06-10T04:12:53Z")

</div>

I couldnt find an easy way to implement the JS PayPal quick button so I just used the API and created my own buttons. Maybe this tutorial will help?

Here is a simple implementation of the [PayPal subscription](https://developer.paypal.com/docs/api/subscriptions/v1/) functionality in a Dash App. Maybe it can be of some use? I use the Python [paypal checkout SDK](https://github.com/paypal/Checkout-Python-SDK), but write two classes to use the subscription api. Then I implement a subscribe button that redirects the user through paypal to complete the transaction. Once logged back in, the user sees the subscriber view.

> **[How to Build a Subscription Business in an Afternoon using PayPal and Dash](https://erickleppen.medium.com/how-to-build-a-subscription-business-in-an-afternoon-using-paypal-and-dash-116829131764?sk=51d066e3ee5a8f1f8f85119e08660353)**
>
> Steps to Create a Website and Paywall using Pure Python

---

<div class="post-metadata">

### Author: ![monitorcasalab](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/monitorcasalab/32/8866_2.png) [@monitorcasalab](https://community.plotly.com/u/monitorcasalab)
#### Post date: [June 11, 2021, 10:47am UTC](https://community.plotly.com/t/embed-paypal-raw-html-code-into-dash-app/50935/3 "2021-06-11T10:47:01Z")

</div>

Thanks @bendgame

Very comprehensive this tutorial, I wish I could have found something similar back in march

But I went back to the origins of my learnings in python and found that the guy who i was following in my early python lessons had a tutorial of paypal subscription built on flask, still works!!!

[https://pythonprogramming.net/paypal-flask-tutorial/](https://pythonprogramming.net/paypal-flask-tutorial/). It is a well explained tutorial of the basics built upon flask. But in order to merge his tutorial with dash environment I had to tweak the declaration of app = dash.Dash(server = server) being “server = Flask( **name** )” earlier above

It works as expected, no clashes so far
