> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# Create a PayPal Extended Preauthorization

POST https://api.sandbox.mangopay.com/v2.01/{ClientId}/extended-preauthorizations/payment-methods/paypal
Content-Type: application/json

This endpoint creates an [Extended Preauthorization](/api-reference/extended-preauthorizations/extended-preauthorization-object) with `PaymentType` of `PAYPAL` and returns the PayPal `RedirectURL` on which the user can preauthorize the debited funds.

Once authorized (`Status` becomes `SUCCEEDED`), you can capture the funds using the [POST Create an Extended Preauthorized PayIn](/api-reference/extended-preauthorizations/create-extended-preauthorized-payin) endpoint.

**Best practice - Capture funds within 3 days**

PayPal recommends that you capture preauthorized funds within 3 days (using [POST Create an Extended Preauthorized PayIn](/api-reference/extended-preauthorizations/create-extended-preauthorized-payin)). This is because the success of the capture is subject to risk and the availability of funds on the card (or other funding instrument) that the user has linked to their PayPal account.

Reference: https://docs.mangopay.com/api-reference/extended-preauthorizations/create-paypal-extended-preauthorization

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL.

## Servers

- `https://api.sandbox.mangopay.com` (Sandbox, default)
- `https://api.mangopay.com` (Production)
- `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox)
- `https://api-mtls.mangopay.com` (mTLS Production)

## Request

### Path parameters

- `ClientId` (string, required) — Platform's API account identifier, associated with the API key.

### Body (application/json)

This endpoint expects a CreateAPayPalPreauthorizationRequest.

- `AuthorId` (string, required) — The unique identifier of the user at the source of the transaction.
- `DebitedFunds` (CreateAPayPalPreauthorizationRequestDebitedFunds, required) — Information about the preauthorized funds.
- `ReturnURL` (string, required) — Max. length: 255 characters The URL to which the user is returned after the payment, whether the transaction is successful or not.
- `LineItems` (list of CreateAPayPalPreauthorizationRequestLineItemsItems, required) — Information about the items purchased in the transaction. The total of all line items' `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed).
- `FlowDescriptor` (FlowDescriptorRequest, optional) — Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`.
- `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`.
- `CancelURL` (string, optional) — The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the `RedirectURL`.
- `DataCollectionId` (string, optional) — The unique identifier of the Data Collection object, returned after sending the requested data to the [POST Submit data for a PayPal PayIn](/api-reference/paypal/submit-data-paypal-payin) endpoint.
- `ShippingPreference` (string, optional) — **Allowed values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: - `SET_PROVIDED_ADDRESS` - The `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them. - `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. - `NO_SHIPPING` – No shipping address section is displayed.
- `Shipping` (CreateAPayPalPreauthorizationRequestShipping, optional) — Required if `ShippingPreference` is `SET_PROVIDED_ADDRESS`. Information about the end user's shipping address, managed by `ShippingPreference`.
- `Reference` (string, optional) — Max. length: 127 characters (truncated after) The platform's order reference for the transaction.
- `StatementDescriptor` (string, optional) — Max. length: 10 characters; only alphanumeric and spaces Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details.
- `Culture` (string, optional) — **Allowed values:** One of the supported languages in the [ISO 639-1 format](/api-reference/overview/data-formats): AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed.
- `ProfilingAttemptReference` (string, optional) — The unique reference generated for the profiling session, used by the fraud prevention solution to produce recommendations for the transaction using the profiling data. **Note:** Parameter not returned by the API. Profiling feature available on request – contact Mangopay via the Dashboard for more information.

## Response

### 200

Success

- `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object.
- `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created.
- `ExpirationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the hold period ends and the preauthorized funds are released. At the expiration date, the extended preauthorization's `PaymentStatus` changes to `EXPIRED` if no captures were made.
- `AuthorizationDate` (integer, optional) — Unix timestamp (UTC) of the date and time successful authorization occurred. If authorization failed, the value is `null`.
- `AuthorId` (string, optional) — The unique identifier of the user at the source of the transaction.
- `FlowDescriptor` (FlowDescriptorResponse, optional) — Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`.
- `DebitedFunds` (PayPalExtendedPreauthorizationResponseDebitedFunds, optional) — Information about the preauthorized funds.
- `Status` (string, optional) — **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED` The status of the authorization.
- `PaymentStatus` (string, optional) — **Returned values:** `WAITING`, `CANCELED`, `CANCEL_REQUESTED`, `EXPIRED`, `VALIDATED`, `FAILED` The payment status of the extended preauthorization object: - `WAITING` – The extended preauthorization can be used: the preauthorized funds can be captured (if `Status` is `SUCCEEDED`) or the preauthorization can be canceled manually. - `CANCELED` – Value to pass to manually cancel the extended preauthorization before use; indicates that the extended preauthorization was canceled manually. - `CANCEL_REQUESTED` – The cancellation of the extended preauthorization has been requested but not yet processed. - `EXPIRED` – The hold period on the preauthorized funds has ended without it being used. - `VALIDATED` – Indicates that the preauthorized funds were captured. - `FAILED` – The pay-in against the preauthorization has failed, but a retry may be possible.
- `PayinsLinked` (PayPalExtendedPreauthorizationResponsePayinsLinked, optional) — Information about the extended preauthorized pay-ins made against the extended preauthorization.
- `ResultCode` (string, optional) — The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
- `ResultMessage` (string, optional) — The explanation of the result code.
- `PaymentType` (string, optional) — **Returned values:** `PAYPAL` The payment type of the preauthorization.
- `ExecutionType` (string, optional) — **Returned values:** `WEB` The execution type of the preauthorization.
- `StatementDescriptor` (string, optional) — Max. length: 10 characters; only alphanumeric and spaces Custom description to appear on the user’s bank statement along with the platform name. Different banks may show more or less information. See the Customizing bank statement references article for details.
- `Shipping` (Shipping_DefaultsBillingUser_Response, optional) — **Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address.
- `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`.
- `ShippingPreference` (string, optional) — **Returned values:** `SET_PROVIDED_ADDRESS`, `GET_FROM_FILE`, `NO_SHIPPING` Information about the shipping address behavior on the PayPal payment page: - `SET_PROVIDED_ADDRESS` - The `Shipping` parameter becomes required and its values are displayed to the end user, who is not able to modify them. - `GET_FROM_FILE` – The `Shipping` parameter is ignored and the end user can choose from registered addresses. - `NO_SHIPPING` – No shipping address section is displayed.
- `PaypalBuyerAccountEmail` (string, optional) — The email address registered on the PayPal account used to make the payment.
- `Reference` (string, optional) — Max. length: 127 characters (truncated after) The platform's order reference for the transaction.
- `CancelURL` (string, optional) — The URL to which the user is returned after canceling the payment. If not provided, the Cancel button returns the user to the `RedirectURL`.
- `PaypalOrderID` (string, optional) — PayPal's unique identifier for the order.
- `BuyerCountry` (string, optional) — The country of the buyer.
- `BuyerFirstname` (string, optional) — The first name of the buyer.
- `BuyerPhone` (string, optional) — The mobile phone number of the buyer.
- `BuyerLastname` (string, optional) — The last name of the buyer.
- `PaypalPayerID` (string, optional) — The PayPal identifier of the buyer.
- `Trackings` (list of PayPalExtendedPreauthorizationResponseTrackingsItems, optional) — Shipping information of the `LineItems` added to the pay-in object.
- `LineItems` (list of PayPalExtendedPreauthorizationResponseLineItemsItems, optional) — Information about the items purchased in the transaction. The total of all line items' `UnitAmount` and `TaxAmount` must equal the `DebitedFunds` amount (negative amounts not allowed).
- `Culture` (string, optional) — **Returned values:** One of the supported languages in the [ISO 639-1 format](/api-reference/overview/data-formats): AT, BR, CA, CH, CN, DE, DK, ES, FR, GB, ID, IL, IT, JK, JP, NL, NO, PL, PT, RU, SE, TH, TR, TW, US. The language in which the PayPal payment page is to be displayed.
- `Billing` (any, optional) — Returned `null` because the billing address is not applicable to PayPal preauth.
- `RedirectURL` (string, optional) — The URL to which to redirect the user to complete the payment. **Caution:** This variable URL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it.
- `ReturnURL` (string, optional) — Max. length: 255 characters The URL to which the user is returned after the payment, whether the transaction is successful or not.

## Types

### CreateAPayPalPreauthorizationRequestDebitedFunds

Information about the preauthorized funds.

- `Currency` (string, required) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount.
- `Amount` (integer, required) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`.

### CreateAPayPalPreauthorizationRequestLineItemsItems

- `Name` (string, required) — The name of the item.
- `Quantity` (integer, required) — The quantity of the item.
- `UnitAmount` (integer, required) — The cost of the item, excluding tax.
- `Description` (string, required) — The platform's unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller's business name or first name and last name. **Caution:** Failure to use a unique seller identifier may result in PayPal restricting your service.
- `TaxAmount` (integer, optional) — The tax amount applied to the item.
- `Category` (string, optional) — **Allowed values:** PHYSICAL_GOODS, DIGITAL_GOODS, DONATION The category of the item: - `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. - `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices. - `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction.

### FlowDescriptorRequest

Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`.

- `Beneficiaries` (list of FlowDescriptorRequestBeneficiariesItems, optional, nullable) — Max. length: 5 items The list of up to 5 Natural or Legal Users declared as beneficiaries of the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made. The pay-in also fails if the `Beneficiaries` array contains nulled objects or invalid `UserId` values.

### CreateAPayPalPreauthorizationRequestShipping

Required if `ShippingPreference` is `SET_PROVIDED_ADDRESS`. Information about the end user's shipping address, managed by `ShippingPreference`.

- `Address` (Address_SubPropsRequired, required) — The postal address.
- `FirstName` (string, optional) — The first name of the user.
- `LastName` (string, optional) — The last name of the user.

### FlowDescriptorResponse

Information about the Owner beneficiaries targeted by the pay-in and its subsequent transfers, who must all be KYC/KYB verified when the pay-in request is made ([read more](/guides/payin-beneficiaries)). If the `FlowDescriptor.Beneficiaries` is sent in the API request, then: - The transaction's `CreditedWalletId` holder is disregarded in KYC/KYB checks. - **ALL** `UserId` values in the array must be one of: - `OWNER` whose `KYCLevel` is `REGULAR` - `PLATFORM` The pay-in `Status` becomes `FAILED` with `ResultCode` [002951](/errors/codes/002951) if at least one `FlowDescriptor.Beneficiaries.UserId` is: - `PAYER` - `OWNER` whose `KYCLevel` is `LIGHT` If the `FlowDescriptor.Beneficiaries` is not sent in the API request, then the `CreditedWalletId` holder is subject to KYC/KYB checks. This property is optional for backwards compatibility but is recommended for all pay-in flows, even when the `CreditedWalletId` holder is a `PAYER` or the same value as one of the `FlowDescriptor.Beneficiaries`.

- `FlowId` (string, optional) — Unique identifier of the payment flow, used by Mangopay for internal purposes.
- `Beneficiaries` (list of FlowDescriptorResponseBeneficiariesItems, optional, nullable) — Max. length: 5 items The list of up to 5 Natural or Legal Users declared as beneficiaries of the pay-in, who must all be KYC/KYB verified when the pay-in request is made. The pay-in also fails if the `Beneficiaries` array contains nulled objects or invalid `UserId` values.

### PayPalExtendedPreauthorizationResponseDebitedFunds

Information about the preauthorized funds.

- `Currency` (string, optional) — **Allowed values:** The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings). The currency of the amount.
- `Amount` (integer, optional) — The amount of the currency in its minor unit. For example, EUR 12.60 would be represented as `1260` whereas JPY 12 would be represented as just `12`.

### PayPalExtendedPreauthorizationResponsePayinsLinked

Information about the extended preauthorized pay-ins made against the extended preauthorization.

- `PayinCaptureId` (string, optional) — The unique identifier of the preauthorized pay-in (capture) made against the extended preauthorization to debit the preauthorized funds.
- `PayinComplementId` (string, optional) — This deprecated parameter is always returned `null`.

### Shipping_DefaultsBillingUser_Response

**Default values:** `FirstName`, `LastName`, and `Address` information of the `Billing` object if sent, otherwise of the `AuthorId` (if address values present). Information about the shipping address.

- `FirstName` (string, optional) — The first name of the user.
- `LastName` (string, optional) — The last name of the user.
- `Address` (Address_SubPropsRequired, optional) — The postal address.

### PayPalExtendedPreauthorizationResponseTrackingsItems

- `TrackingNumber` (string, optional) — The shipment's tracking number provided by the carrier.
- `Carrier` (string, optional) — The carrier for the shipment. Use the country-specific version of the carrier if it exists, otherwise use its global version.
- `NotifyBuyer` (boolean, optional) — **Default value:** false If `true`, sends an email notification to the `PaypalBuyerAccountEmail` containing the `TrackingNumber` and `Carrier`, which allows the end user to track their shipment with the carrier.

### PayPalExtendedPreauthorizationResponseLineItemsItems

- `Name` (string, optional) — The name of the item.
- `Quantity` (integer, optional) — The quantity of the item.
- `UnitAmount` (integer, optional) — The cost of the item, excluding tax.
- `TaxAmount` (integer, optional) — The tax amount applied to the item.
- `Description` (string, optional) — The platform's unique reference for the seller. This value must be consistently used for the given seller. You can use, for example, the Mangopay `UserId` or the seller's business name or first name and last name. **Caution:** Failure to use a unique seller identifier may result in PayPal restricting your service.
- `Category` (string, optional) — **Allowed values:** PHYSICAL_GOODS, DIGITAL_GOODS, DONATION The category of the item: - `PHYSICAL_GOODS` – Tangible items that can be physically shipped and received with proof of delivery upon arrival. - `DIGITAL_GOODS` – Products or services that are distributed and consumed via digital platforms or devices. - `DONATION` – Voluntary contribution made without any goods or services received in return. Multiple line items can be categorized as `DONATION` within a single transaction, however it is not possible to combine `DONATION` other line item categories within the same transaction.
- `Sku` (string, optional) — The SKU or reference for the item on your platform.
- `Discount` (integer, optional) — The discount applied to the item, in the smallest currency sub-division.

### FlowDescriptorRequestBeneficiariesItems

- `UserId` (string, optional) — The unique identifier of the Natural User or Legal User declared as a beneficiary of the pay-in.

### Address_SubPropsRequired

The postal address.

- `AddressLine1` (string, required) — The first line of the address.
- `City` (string, required) — The city of the address.
- `PostalCode` (string, required) — The postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
- `Country` (string, required) — Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats)) The country of the address.
- `AddressLine2` (string, optional) — The second line of the address.
- `Region` (string, optional) — Required if `Country` is US, CA, or MX. The region of the address.

### FlowDescriptorResponseBeneficiariesItems

- `UserId` (string, optional) — The unique identifier of the Natural User or Legal User declared as a beneficiary of the pay-in.

## Examples

**Request**

```json
{
  "body": {
    "AuthorId": "user_m_01KHXAHEBRWSZXJY85TPPR56TK",
    "CancelURL": "https://www.example.net",
    "Culture": "EN",
    "DataCollectionId": "77b23645-dba3-4948-a5ba-32a134a3148d",
    "DebitedFunds": {
      "Amount": 1000,
      "Currency": "GBP"
    },
    "FlowDescriptor": {
      "Beneficiaries": [
        {
          "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2"
        }
      ]
    },
    "LineItems": [
      {
        "Category": "PHYSICAL_GOODS",
        "Description": "ID of Seller 1",
        "Name": "Running shoes",
        "Quantity": 1,
        "TaxAmount": 0,
        "UnitAmount": 1000
      }
    ],
    "Reference": "1234",
    "ReturnURL": "https://www.example.com",
    "Shipping": {
      "Address": {
        "AddressLine1": "10 Kingsway",
        "City": "London",
        "Country": "GB",
        "PostalCode": "WC2B 6LH",
        "Region": null
      },
      "FirstName": "Alex",
      "LastName": "Smith"
    },
    "ShippingPreference": "SET_PROVIDED_ADDRESS",
    "StatementDescriptor": "Example123",
    "Tag": "Created using the Mangopay API Postman collection"
  }
}
```

**Response**

```json
{
  "Id": "ext_auth_wt_05e5e212-fa97-4d67-8c5e-1495eb91d8b4",
  "CreationDate": 1774263809,
  "ExpirationDate": 1776855809,
  "AuthorId": "user_m_01KMD5PX2KPDVQ0C37XR375MPP",
  "FlowDescriptor": {
    "FlowId": "flow_wt_97448e0a-5bc6-4b83-ac29-cdfcadf60a08",
    "Beneficiaries": [
      {
        "UserId": "user_m_02APAYTWSDYXHXN1FRTKX9WMA2"
      }
    ]
  },
  "DebitedFunds": {
    "Currency": "GBP",
    "Amount": 1000
  },
  "Status": "CREATED",
  "PaymentStatus": "WAITING",
  "PayinsLinked": {
    "PayinCaptureId": null,
    "PayinComplementId": null
  },
  "ResultCode": null,
  "ResultMessage": null,
  "PaymentType": "PAYPAL",
  "ExecutionType": "WEB",
  "StatementDescriptor": "Example123",
  "Shipping": {
    "FirstName": "Alex",
    "LastName": "Smith",
    "Address": {
      "AddressLine1": "10 Kingsway",
      "City": "London",
      "PostalCode": "WC2B 6LH",
      "Country": "GB",
      "Region": null
    }
  },
  "Tag": "Created using the Mangopay API Postman collection",
  "ShippingPreference": "SET_PROVIDED_ADDRESS",
  "PaypalBuyerAccountEmail": null,
  "Reference": "1234",
  "CancelURL": "http://www.example.net/?extendedPreauthorizationId=ext_auth_wt_05e5e212-fa97-4d67-8c5e-1495eb91d8b4",
  "PaypalOrderID": "6L593294612936822",
  "BuyerCountry": null,
  "BuyerFirstname": null,
  "BuyerPhone": null,
  "BuyerLastname": null,
  "PaypalPayerID": null,
  "Trackings": null,
  "LineItems": [
    {
      "Name": "Running shoes",
      "Quantity": 1,
      "UnitAmount": 1000,
      "TaxAmount": 0,
      "Description": "ID of Seller 1",
      "Category": "PHYSICAL_GOODS"
    }
  ],
  "Culture": "EN",
  "Billing": null,
  "RedirectURL": "https://www.paypal.com/checkoutnow?token=6L593294612936822",
  "ReturnURL": "https://www.example.com/?extendedPreauthorizationId=ext_auth_wt_05e5e212-fa97-4d67-8c5e-1495eb91d8b4"
}
```

**SDK Code**

```python
from pprint import pprint
import mangopay

mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'

from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)

from mangopay.resources import NaturalUser, PayPalExtendedPreauthorization
from mangopay.utils import Money

natural_user = NaturalUser.get('213753890')

paypal_extended_preauthorization = PayPalExtendedPreauthorization(
    author_id = natural_user.id,
    debited_funds = Money(amount=1000, currency='GBP'),
    return_url = 'https://docs.mangopay.com/please-ignore',
    cancel_url = 'https://docs.mangopay.com/please-ignore',
    statement_descriptor = 'MGP',
    culture = 'EN',
    tag = 'Created using the Mangopay Python SDK'
)

create_paypal_extended_preauthorization = paypal_extended_preauthorization.save()

pprint(create_paypal_extended_preauthorization)

```

```javascript
const mangopay = require('mangopay4-nodejs-sdk');

const api = new mangopay({
    clientId: 'your-client-id',
    clientApiKey: 'your-api-key',
    baseUrl: 'https://api.sandbox.mangopay.com'
});

api.ExtendedPreauthorizations.createPayPalPreauthorization({
    AuthorId: 'user_m_01HT2NFK7Z2BRQNGNHMY30VVTT',
    DebitedFunds: { Currency: 'GBP', Amount: 1000 },
    ReturnURL: 'https://docs.mangopay.com/please-ignore/return',
    CancelURL: 'https://docs.mangopay.com/please-ignore/cancel',
    StatementDescriptor: 'MangoPay Shop',
    Culture: 'EN'
}, (data) => {
    console.log(data);
});

```

```java
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.core.enumerations.CultureCode;
import com.mangopay.core.enumerations.CurrencyIso;
import com.mangopay.entities.PayPalExtendedPreauthorization;

public class CreatePayPalExtendedPreauthorization {
    public static void main(String[] args) throws Exception {
        MangoPayApi mangopay = new MangoPayApi();
        mangopay.getConfig().setClientId("your-client-id");
        mangopay.getConfig().setClientPassword("your-api-key");

        var userId = "user_m_01HT2NFK7Z2BRQNGNHMY30VVTT";

        PayPalExtendedPreauthorization extendedPreauthorization = new PayPalExtendedPreauthorization();
        extendedPreauthorization.setAuthorId(userId);
        extendedPreauthorization.setDebitedFunds(new Money(CurrencyIso.GBP, 1000));
        extendedPreauthorization.setReturnUrl("https://docs.mangopay.com/please-ignore");
        extendedPreauthorization.setCancelUrl("https://docs.mangopay.com/please-ignore");
        extendedPreauthorization.setStatementDescriptor("EXTPREAUTH");
        extendedPreauthorization.setCulture(CultureCode.EN);

        PayPalExtendedPreauthorization createExtendedPreauthorization = mangopay.getExtendedPreauthorizationApi().createPayPalPreauthorization(extendedPreauthorization, null);

        Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
        String prettyJson = prettyPrint.toJson(createExtendedPreauthorization);
        System.out.println(prettyJson);
    }
}

```

```csharp
using MangoPay.SDK;
using MangoPay.SDK.Entities.POST;
using Newtonsoft.Json;

class Program
{
    static async Task Main(string[] args)
    {
        MangoPayApi api = new MangoPayApi();
        api.Config.ClientId = "your-client-id";
        api.Config.ClientPassword = "your-api-key";

        var userId = "user_m_01J2TZ261WZNDM0ZDRWGDYA4GN";

        var extendedPreauthorization = new PayPalExtendedPreauthorizationPostDTO
        {
            AuthorId = userId,
            DebitedFunds = new Money { Amount = 1000, Currency = CurrencyIso.GBP },
            ReturnURL = "http://www.mangopay.com/docs/please-ignore",
            CancelURL = "http://www.mangopay.com/docs/please-ignore",
            StatementDescriptor = "MGP",
            Culture = CultureCode.EN
        };

        var createPayPalExtendedPreauthorization = await api.ExtendedPreauthorizations.CreatePayPalExtendedPreauthorizationAsync(extendedPreauthorization);

        string prettyPrint = JsonConvert.SerializeObject(createPayPalExtendedPreauthorization, Formatting.Indented);
        Console.WriteLine(prettyPrint);
    }
}

```

```php
<?php

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {
    $userId = 'user_m_01HQK25M6KVHKDV0S36JY9NRKR';

    $payPalExtendedPreauth = new MangoPay\PayPalExtendedPreauthorization;
    $payPalExtendedPreauth->AuthorId = $userId;
    $payPalExtendedPreauth->DebitedFunds = new Money();
    $payPalExtendedPreauth->DebitedFunds->Amount = 1000;
    $payPalExtendedPreauth->DebitedFunds->Currency = 'GBP';
    $payPalExtendedPreauth->ReturnURL = "https://docs.mangopay.com/please-ignore/return";
    $payPalExtendedPreauth->CancelURL = "https://docs.mangopay.com/please-ignore/cancel";
    $payPalExtendedPreauth->StatementDescriptor = "MANGOPAY";
    $payPalExtendedPreauth->Culture = "FR";

    $createPayPalExtendedPreauth = $api->ExtendedPreauthorizations->CreatePayPalPreauthorization($payPalExtendedPreauth);

    print_r($createPayPalExtendedPreauth);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}

```

```ruby
require 'mangopay'

MangoPay.configure do |c|
  c.client_id     = 'your-client-id'
  c.client_apiKey = 'your-api-key'
end

preauthorization = MangoPay::ExtendedPreauthorization.create_paypal_preauthorization(
  AuthorId: 'user_m_01HT2NFK7Z2BRQNGNHMY30VVTT',
  DebitedFunds: { Currency: 'GBP', Amount: 1000 },
  ReturnURL: 'https://docs.mangopay.com/please-ignore/return',
  CancelURL: 'https://docs.mangopay.com/please-ignore/cancel',
  Shipping: {
    FirstName: 'Alex',
    LastName: 'Smith',
    Address: {
      AddressLine1: '10 Kingsway',
      City: 'London',
      PostalCode: 'WC2B 6LH',
      Country: 'GB'
    }
  },
  ShippingPreference: 'SET_PROVIDED_ADDRESS',
  Reference: '1234',
  LineItems: [
    {
      Name: 'Running shoes',
      Quantity: 1,
      UnitAmount: 1000,
      TaxAmount: 0,
      Description: 'seller1 ID'
    }
  ]
)

pp preauthorization

```