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

# PayPal via Direct Integration

> Let customers securely make payments using PayPal on your website or mobile application via Primer's direct integration.

Primer's direct integration to PayPal enables you to accept payments across Web, iOS & Android, and vault PayPal billing agreements.

## Get started with PayPal

### Before you begin

If this is your first payment method, make sure to follow the [Get started guide](/get-started/overview) to begin processing payments with Primer.

### Configure in the Dashboard

1. **Add PayPal payment method to your Dashboard**

Go to the [integrations](https://dashboard.primer.io/integrations) section of the Dashboard,click on the 'New Integration' button and search for PayPal.

Follow the instructions to connect your PayPal processor account to your Primer Dashboard.

When configuring your PayPal connection in Primer, you can choose the customer landing page during checkout. This setting determines whether customers are directed to the Billing page, where they can enter card details directly, or the Login page, where they are prompted to log in to their PayPal account. Select the option that best aligns with your desired customer experience.

2. **Activate PayPal on the Checkout**

Go to the [Checkout](https://dashboard.primer.io/checkout) section of the Dashboard and activate the PayPal payment method.

Then go to the settings view of PayPal, and make sure that PayPal is properly set up to use your PayPal processor account.

3. **Configure a Workflow to process payments made with PayPal**

Go to the [Workflow](https://dashboard.primer.io/workflow) make sure your PayPal processor is used to process payments made with PayPal.

### Prepare the client session

PayPal leverages the following parameters to process a payment.

Pass them when creating the client session.

| Parameter Name                                                                                                                                                                                                                  | Required | Description                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| [currencyCode](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-currency-code)                                                                                                                 | ✓        | 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format, e.g. `USD` for US dollars |
| [order](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-order.)<br />[↳ lineItems](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-order-line-items)        | ✓        | Details of the line items of the order                                                                                      |
| [order](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-order.)<br />[↳ countryCode](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-order..countryCode)    | ✓        | The country code of the user is required for PayPal.                                                                        |
| [metadata](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-metadata)<br />[↳ paypal\_custom\_id](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-metadata)  |          | Primer's direct integration to PayPal enables you send a custom ID to PayPal to link your orders to a specific custom ID.   |
| [metadata](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-metadata)<br />[↳ paypal\_invoice\_id](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-metadata) |          | Primer's direct integration to PayPal enables you send a Invoice ID to PayPal to link your orders to a specific invoice ID. |
| [metadata<br />↳ paypal\_client\_metadata\_id](/api-reference/v2.4/api-reference/client-session-api/create-a-client-session#body-metadata)                                                                                      | ✓        | Required field if the Billing Agreement is being created.                                                                   |

## Add PayPal into your website or mobile app

<CardGroup>
  <Card title="Drop-in UI" href="/connections/payment-methods/paypal/dropin">
    Use our customizable drop-in UI to quickly add payment methods to your checkout.
  </Card>

  <Card title="Headless Checkout" href="/connections/payment-methods/paypal/headless">
    Have the freedom to build your own UI using our headless checkout.
  </Card>
</CardGroup>
