---
title: "PayPal · Nuxt Scripts"
description: "Use PayPal in your Nuxt app."
canonical_url: "https://scripts.nuxt.com/scripts/v0/payments/paypal"
meta:
  "og:description": "Use PayPal in your Nuxt app."
  "og:image": "https://scripts.nuxt.com/_og/d/c_Docs%2Ctitle_PayPal%2Cdescription_Use%2BPayPal%2Bin%2Byour%2BNuxt%2Bapp.%2Cheadline_Payments%2Cp_Ii9zY3JpcHRzL3YwL3BheW1lbnRzL3BheXBhbCI%2Cs_Vj7vc2Yzkw0P2U1U.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "PayPal · Nuxt Scripts"
  "twitter:image": "https://scripts.nuxt.com/_og/d/c_Docs%2Ctitle_PayPal%2Cdescription_Use%2BPayPal%2Bin%2Byour%2BNuxt%2Bapp.%2Cheadline_Payments%2Cp_Ii9zY3JpcHRzL3YwL3BheW1lbnRzL3BheXBhbCI%2Cs_Vj7vc2Yzkw0P2U1U.png"
---

> Index of every page on this site: [llms.txt](https://scripts.nuxt.com/llms.txt)

**Payments**

# **PayPal**

[Copy for LLMs](https://scripts.nuxt.com/scripts/v0/payments/paypal.md)

[**PayPal**](https://www.paypal.com) is a popular payment gateway that allows you to accept payments online.

Nuxt Scripts provides multiple PayPal features:

- `**useScriptPayPal**` composable which loads the script `**https://www.paypal.com/sdk/js**`.
- `**ScriptPayPalButtons**` component that allows you to embed [**PayPal Buttons**](https://developer.paypal.com/sdk/js/reference/#buttons) on your site.
- `**ScriptPayPalMarks**` component that allows you to embed [**PayPal Marks**](https://developer.paypal.com/sdk/js/reference/#marks) on your site.
- `**ScriptPayPalMessages**` component that allows you to embed [**PayPal Messages**](https://developer.paypal.com/studio/checkout/pay-later/us/customize/reference) on your site.

## Types

To use the PayPal with full TypeScript support, you will need to install the `**@paypal/paypal-js**` dependency.

```bash
pnpm add -D @paypal/paypal-js
```

### Demo

placeholder

placeholder

#### **With Environment Variables**

If you prefer to configure your client ID using environment variables.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      paypal: true,
    }
  },
  // you need to provide a runtime config to access the environment variables
  runtimeConfig: {
    public: {
      scripts: {
        paypal: {
          clientId: '', // NUXT_PUBLIC_SCRIPTS_PAYPAL_CLIENT_ID
        },
      },
    },
  },
})
```

.env

```text
NUXT_PUBLIC_SCRIPTS_PAYPAL_CLIENT_ID=<YOUR_CLIENT_ID>
```

[Edit this page](https://github.com/nuxt/scripts/edit/0.x/docs/content/payments/paypal.md)

[Markdown For LLMs](https://scripts.nuxt.com/scripts/v0/payments/paypal.md)

[**Lemon Squeezy** Use Lemon Squeezy in your Nuxt app.](https://scripts.nuxt.com/scripts/v0/payments/lemon-squeezy) [**Stripe** Use Stripe in your Nuxt app.](https://scripts.nuxt.com/scripts/v0/payments/stripe)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scripts.nuxt.com/#website","@type":"WebSite","description":"Nuxt Scripts lets you load third-party scripts with better performance, privacy, security and DX. It includes many popular third-parties out of the box.","name":"Nuxt Scripts","url":"https://scripts.nuxt.com/","publisher":{"@id":"https://scripts.nuxt.com/#identity"}},{"@id":"https://scripts.nuxt.com/scripts/v0/payments/paypal#webpage","@type":"WebPage","description":"Use PayPal in your Nuxt app.","name":"PayPal","url":"https://scripts.nuxt.com/scripts/v0/payments/paypal","breadcrumb":{"@id":"https://scripts.nuxt.com/scripts/v0/payments/paypal#breadcrumb"},"isPartOf":{"@id":"https://scripts.nuxt.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://scripts.nuxt.com/scripts/v0/payments/paypal"]}],"primaryImageOfPage":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/#identity","@type":"Organization","name":"Nuxt Scripts","url":"https://scripts.nuxt.com","logo":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/scripts/v0/payments/paypal#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Nuxt Scripts","item":"https://scripts.nuxt.com/","position":1},{"@type":"ListItem","name":"Scripts","item":"https://scripts.nuxt.com/scripts","position":2},{"@type":"ListItem","name":"V0","item":"https://scripts.nuxt.com/scripts/v0","position":3},{"@type":"ListItem","name":"Payments","item":"https://scripts.nuxt.com/scripts/v0/payments","position":4},{"@type":"ListItem","name":"PayPal","item":"https://scripts.nuxt.com/scripts/v0/payments/paypal","position":5}]},{"@id":"https://scripts.nuxt.com/#logo","@type":"ImageObject","caption":"Nuxt Scripts","contentUrl":"https://scripts.nuxt.com/logo.svg","inLanguage":"en","url":"https://scripts.nuxt.com/logo.svg"}]}
```

## Sitemap

See the full [sitemap](https://scripts.nuxt.com/sitemap.md) for all pages.
