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

# PayPal Pay Later

> Configure PayPal Pay Later as a payment method in Gr4vy.

PayPal Pay Later provides installment and deferred payment options for eligible buyers. This buy now, pay later (BNPL) solution allows customers to split purchases into interest-free payments or defer payment, subject to credit approval and eligibility criteria determined by PayPal.

<Info>Pay Later availability automatically depends on buyer eligibility, which is determined by PayPal based on factors like purchase amount, buyer history, and location.</Info>

## Setup

Follow the [PayPal setup instructions](./paypal) before configuring PayPal Pay Later.

After setting up your PayPal account, Pay Later options are automatically presented to eligible buyers during checkout. No additional configuration is required beyond enabling the payment method in your Gr4vy connection.

## Features

PayPal Pay Later supports the following features:

* **Delayed capture** - Authorize a payment and capture it at a later time
* **Partial capture** - Capture a portion of the authorized amount
* **Refunds** - Refund transactions in full or in part
* **Partial refunds** - Issue multiple partial refunds up to the captured amount
* **Void** - Cancel an authorized transaction before capture
* **Transaction sync** - Automatic synchronization of transaction status updates
* **Settlement reporting** - Detailed settlement reports via SFTP
* **Webhook integration** - Real-time notifications for payment events

## Limitations

The following features are not supported by this connector:

* **Payment method tokenization** - Storing Pay Later accounts for recurring transactions is not supported
* **Over capture** - Capture over the authorized amount is not available
* **Zero auth** - Zero-dollar verification transactions are not supported
* **Partial authorization** - Partial authorization for insufficient funds is not available
* **Network tokens** - Network tokenization is not supported
* **Deep linking** - Direct mobile app integration is not available for Pay Later

## Integration

For PayPal Pay Later, the default integration is through a redirect to PayPal's hosted checkout page where eligible buyers are presented with Pay Later options.

Start by creating a new transaction with the following required fields.

<CodeGroup>
  ```csharp C# theme={"system"}
  var transaction = await client.Transactions.CreateAsync(
    transactionCreate: new TransactionCreate()
    {
      Amount = 1299,
      Currency = "USD",
      Country = "US",
      PaymentMethod =
        TransactionCreatePaymentMethod.CreateCheckoutSessionWithUrlPaymentMethodCreate(
          new RedirectPaymentMethodCreate()
          {
            Method = "paypalpaylater",
            RedirectUrl = "https://example.com/callback",
          }
        ),
    }
  );
  ```

  ```go Go theme={"system"}
  amount := int64(1299)
  currency := "USD"
  country := "US"
  method := "paypalpaylater"
  redirectUrl := "https://example.com/callback"

  redirectPaymentMethodCreate := components.RedirectPaymentMethodCreate{
    Method: method,
    RedirectUrl: redirectUrl,
  }
  paymentMethod := components.CreateTransactionCreatePaymentMethodRedirectPaymentMethodCreate(redirectPaymentMethodCreate)

  transactionCreate := components.TransactionCreate{
    Amount:        amount,
    Currency:      currency,
    Country:       &country,
    PaymentMethod: &paymentMethod,
  }

  transaction, err := client.Transactions.Create(ctx, transactionCreate, nil, nil)
  ```

  ```java Java theme={"system"}
  CreateTransactionResponse transactionResponse = gr4vyClient.transactions().create()
    .transactionCreate(TransactionCreate.builder()
      .amount(1299L)
      .currency("USD")
      .country("US")
      .paymentMethod(TransactionCreatePaymentMethod.of(RedirectPaymentMethodCreate.builder()
        .method("paypalpaylater")
        .redirectUrl("https://example.com/callback")
        .build()))
      .build())
    .call();

  Transaction transaction = transactionResponse.transaction().orElse(null);
  ```

  ```php PHP theme={"system"}
  $transactionCreate = new TransactionCreate(
    amount: 1299,
    currency: 'USD',
    country: 'US',
    paymentMethod: new RedirectPaymentMethodCreate(
      method: 'paypalpaylater',
      redirectUrl: 'https://example.com/callback'
    )
  );
  $response = self::$sdk->transactions->create($transactionCreate);
  $transaction = $response->transaction;
  ```

  ```python Python theme={"system"}
  transaction: models.Transaction = client.transactions.create(
    amount=1299,
    currency="USD",
    country="US",
    payment_method={
      "method": "paypalpaylater",
      "redirect_url": "https://example.com/callback",
    }
  )
  ```

  ```ts TypeScript theme={"system"}
  const transaction = await gr4vy.transactions.create({
    amount: 1299,
    currency: "USD",
    country: "US",
    paymentMethod: {
      method: "paypalpaylater",
      redirectUrl: "https://example.com/callback"
    }
  })
  ```
</CodeGroup>

After the transaction is created, the API response includes `payment_method.approval_url` and the `buyer_approval_pending` status.

```json theme={"system"}
{
  "type": "transaction",
  "id": "ea1efdd0-20f9-44d9-9b0b-0a3d71e9b625",
  "payment_method": {
    "type": "payment-method",
    "approval_url": "https://www.paypal.com/checkoutnow?token=..."
  },
  "method": "paypalpaylater"
}
```

Redirect the buyer to the `approval_url` where PayPal determines eligibility and presents available Pay Later options. After the buyer reviews terms and approves the payment, they are redirected to the `redirect_url` you provided when creating the transaction. Do not rely solely on the redirect - either poll the transaction or (recommended) rely on webhooks to detect the final status (for example `capture_succeeded` or failure states).

## Supported countries

PayPal supports transactions from buyers in the following countries:

| Country code | Country code | Country code | Country code | Country code | Country code | Country code | Country code |
| ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------ |
| `AD`         | `AE`         | `AG`         | `AI`         | `AL`         | `AM`         | `AO`         | `AR`         |
| `AT`         | `AU`         | `AW`         | `AZ`         | `BA`         | `BB`         | `BE`         | `BF`         |
| `BG`         | `BH`         | `BI`         | `BJ`         | `BM`         | `BN`         | `BO`         | `BR`         |
| `BS`         | `BT`         | `BW`         | `BY`         | `BZ`         | `CA`         | `CD`         | `CG`         |
| `CH`         | `CI`         | `CK`         | `CL`         | `CM`         | `CO`         | `CR`         | `CV`         |
| `CY`         | `CZ`         | `DE`         | `DJ`         | `DK`         | `DM`         | `DO`         | `DZ`         |
| `EC`         | `EE`         | `EG`         | `ER`         | `ES`         | `ET`         | `FI`         | `FJ`         |
| `FK`         | `FM`         | `FO`         | `FR`         | `GA`         | `GB`         | `GD`         | `GE`         |
| `GF`         | `GI`         | `GL`         | `GM`         | `GN`         | `GP`         | `GR`         | `GT`         |
| `GW`         | `GY`         | `HK`         | `HN`         | `HR`         | `HU`         | `ID`         | `IE`         |
| `IL`         | `IN`         | `IS`         | `IT`         | `JM`         | `JO`         | `JP`         | `KE`         |
| `KG`         | `KH`         | `KI`         | `KM`         | `KN`         | `KR`         | `KW`         | `KY`         |
| `KZ`         | `LA`         | `LC`         | `LI`         | `LK`         | `LS`         | `LT`         | `LU`         |
| `LV`         | `MA`         | `MC`         | `MD`         | `ME`         | `MG`         | `MH`         | `MK`         |
| `ML`         | `MN`         | `MQ`         | `MR`         | `MS`         | `MT`         | `MU`         | `MV`         |
| `MW`         | `MX`         | `MY`         | `MZ`         | `NA`         | `NC`         | `NE`         | `NF`         |
| `NG`         | `NI`         | `NL`         | `NO`         | `NP`         | `NR`         | `NU`         | `NZ`         |
| `OM`         | `PA`         | `PE`         | `PF`         | `PG`         | `PH`         | `PL`         | `PM`         |
| `PN`         | `PT`         | `PW`         | `PY`         | `QA`         | `RE`         | `RO`         | `RS`         |
| `RU`         | `RW`         | `SA`         | `SB`         | `SC`         | `SE`         | `SG`         | `SH`         |
| `SI`         | `SJ`         | `SK`         | `SL`         | `SM`         | `SN`         | `SO`         | `SR`         |
| `ST`         | `SV`         | `SZ`         | `TC`         | `TD`         | `TG`         | `TH`         | `TJ`         |
| `TM`         | `TN`         | `TO`         | `TT`         | `TV`         | `TW`         | `TZ`         | `UA`         |
| `UG`         | `US`         | `UY`         | `VA`         | `VC`         | `VE`         | `VG`         | `VN`         |
| `VU`         | `WF`         | `WS`         | `YE`         | `YT`         | `ZA`         | `ZM`         | `ZW`         |

## Testing

PayPal provides a sandbox environment for testing Pay Later transactions. After setting up your sandbox PayPal developer account, you can create test buyer accounts in the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard/accounts).

Pay Later options in the sandbox simulate the eligibility and approval flow. Note that specific Pay Later products (like Pay in 4 or Pay in 30 days) may vary by test account configuration.

For detailed testing instructions and Pay Later-specific sandbox guidelines, see the [PayPal Pay Later documentation](https://developer.paypal.com/docs/checkout/pay-later/integrate/).

## Additional configuration

### Ingest billing and shipping details

By default, billing, and shipping details received from PayPal are not imported. To enable this feature, head over to **Connections** → **Configured** and select your PayPal connector. Next, go to **Credentials** and toggle **Import billing details** and/or **Import shipping details**.

When **Import billing details** is enabled, any of the user's name, email address, and billing address are automatically imported into your transaction, merging it with any data already present on the transaction. Linked buyers are not updated, but only the snapshot of the buyer on the transaction.

When **Import shipping details** is enabled, the user's shipping address is automatically **requested** and imported into your transaction, merging it with any data already present on the transaction. Linked buyers are not updated, but only the snapshot of the buyer on the transaction.

<Note>The ingestion of billing and shipping details is not available for tokenized payments.</Note>

### Payment receiving preferences

By default, PayPal only settles payments automatically if the payment is in the primary currency of the PayPal merchant account. If you need to accept payments in additional currencies, you need to open a PayPal account balance in each of the currencies you intend to accept. Alternatively, you can configure your PayPal merchant account to automatically convert payments into the primary currency.

If you receive a payment in a currency that your PayPal merchant account is not configured to accept, the payment enters a pending state and you need to log in to the PayPal merchant dashboard to trigger settlement, either by opening the required currency balance, or converting the payment into the primary currency of your PayPal account.

<Warning>Payments left in a pending state are eventually reversed by PayPal.</Warning>

### FraudNet

FraudNet is a PayPal-developed JavaScript library that collects browser-based data to help reduce fraud. Upon checkout, the FraudNet library sends data elements to PayPal Risk Services for fraud and risk assessment.

When creating transactions, the PayPal FraudNet library must be included on the checkout page for all transactions. When using Embed, the PayPal FraudNet library is included automatically. If you are using the API directly, you need to use the [device fingerprinting library](../../guides/features/anti-fraud/fingerprint) which includes the PayPal FraudNet library.

## Supported currencies

PayPal supports processing payments in the following currencies:

| Currency code | Currency code | Currency code | Currency code | Currency code | Currency code | Currency code | Currency code |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| `AUD`         | `BRL`         | `CAD`         | `CHF`         | `CNY`         | `CZK`         | `DKK`         | `EUR`         |
| `GBP`         | `HKD`         | `HUF`         | `ILS`         | `INR`         | `JPY`         | `MXN`         | `MYR`         |
| `NOK`         | `NZD`         | `PHP`         | `PLN`         | `RUB`         | `SEK`         | `SGD`         | `THB`         |
| `TWD`         | `USD`         |               |               |               |               |               |               |
