> ## Documentation Index
> Fetch the complete documentation index at: https://docs.softr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# PayPal

> Integrating PayPal with Softr to receive payments.

You can easily integrate PayPal on your Softr app to start receiving payments. You can either add a single button or, if you're importing a list of products from a [data source](/4230abecf813402aa2926466c313290a), you can add a PayPal link for each product in your database, so that customers can visit your store and make purchases. Let's discuss each case separately.

## Adding a Single Button

Your starting point is [https://www.paypal.com/buttons/](https://www.paypal.com/buttons/) where you can choose the type of button you want to have on your site. After generating the button, the code can be added inside a [Custom Code](/custom-code/3idxDhKqz1qPdqBuWbs61G/custom-code-block-overview/6XNrxFopUEiwbWipq81Eq1) block in your Softr app.

As an example, let’s use the **Buy Now** button:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image1.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=1a7e3eee45e79ba1eb8222a89864ce30" alt="Notion image" width="2510" height="1356" data-path="integrations/images/paypal/image1.png" />
</Frame>

<Info>Make sure you are signed in to PayPal to see the Buy Now option.</Info>

Follow PayPal’s configuration steps like providing a Product name and Price:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image2.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=c22c30508d5946a108ebde1b7b230130" alt="Notion image" width="2262" height="1234" data-path="integrations/images/paypal/image2.png" />
</Frame>

Once done, click “Save and Create Button”:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image3.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=d0dead699e728d9365b952fd200b47f6" alt="Notion image" width="1016" height="760" data-path="integrations/images/paypal/image3.png" />
</Frame>

You will land on a page with your button code. Copy the code:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image4.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=c7341425b9feb8f31e3540de50aa488f" alt="Notion image" width="2362" height="1438" data-path="integrations/images/paypal/image4.png" />
</Frame>

Finally, add the link to a [Custom Code](/custom-code/3idxDhKqz1qPdqBuWbs61G/custom-code-block-overview/6XNrxFopUEiwbWipq81Eq1) block:

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image5.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=2377dc5c2b365370a593964829830c92" alt="Notion image" width="3024" height="906" data-path="integrations/images/paypal/image5.png" />
</Frame>

## Adding links in a data source

Let's assume you've created an e-commerce app. Thus, you have your [product listing](/building-blocks/vikC2AWEpQGkZd4jGyoVxo/list-block/pQhPYuA28VXr5tLLFBcbCU), and each product has a **View Details** button, which should be linked to the item [details page](/building-blocks/vikC2AWEpQGkZd4jGyoVxo/item-details-block-/4bE8XaFbJp45wkAwuWiz8f). On the details page, there's in turn a **Buy Now** button. So, let's customize the **Buy Now** to link it to the item's PayPal **Buy Now** button.

This time, when you create a button, switch to the **Email Link** tab, and copy the code.

<Frame>
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image6.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=57b5b449fcecc465f2377302f5a9426b" alt="Notion image" width="1218" height="328" data-path="integrations/images/paypal/image6.png" />
</Frame>

### **Adding the Button Link to the Product**

Now, you have the button link and need to add it to your data source to the corresponding product. We are going to use [Airtable](/data-sources/1YYStCJukT15Lh2j93qo9A/airtable/jHX7kfH7QvkVcELQvS3VoX) as our data source and create a **PayPal Link** field to add the button link there.

<Frame caption="The “PayPal Link” field on Airtable">
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image7.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=2fce38a009219e4bdaa333ff6b4447de" alt="The “PayPal Link” field on Airtable" width="1211" height="591" data-path="integrations/images/paypal/image7.png" />
</Frame>

Next, on our product details page, we are going to set the **Buy Now** button action to **External url** and select the **PayPal Link** field.

<Frame caption="Setting the external URL to the PayPal link field">
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image8.png?fit=max&auto=format&n=UK9rAhLsda5WuJiB&q=85&s=42236c0be1ee269242cbdc9b9e3b391c" alt="Setting the external URL to the PayPal link field" width="2554" height="718" data-path="integrations/images/paypal/image8.png" />
</Frame>

So, that's the process for one particular product, and you need to repeat it for all the products, creating a unique PayPal button for each one. When you're done, the Buy Now button on the product page will redirect to the PayPal payment page, as shown below.

<Frame caption="Testing the button">
  <img src="https://mintcdn.com/softr-2b8a27e1/UK9rAhLsda5WuJiB/integrations/images/paypal/image9.gif?s=fc8bd0a8fef083cce9e3cd802c4f8264" alt="Testing the button" width="1363" height="667" data-path="integrations/images/paypal/image9.gif" />
</Frame>
