# PayPal Create billing agreement

Creating a billing agreement using a token, that was created in [Initiate Billing Agreement](/online-payments/advanced-payment-methods-apms/paypal/your-first-transaction-with-paypal/paypal-initiate-billing-agreement.md) API.

## Required fields

* billingToken - PayPal agreement token that was created in Initiate billing agreement
* ppcUid - PayPal Payment Provider Contract UUID

Here is an example of request that can be used for creating a billing agreement.

```bash
curl -v -X POST '<SERVER URL>/billingAgreement/create' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{
    "billingToken":"BA-7P980893LY950894R",
    "paymentProviderContract":"<PPC ID>"
}'
```

**Response code example**

```json
{
    "agreementId": "B-1WW844616B620123"
}
```

## Response Fields

* agreementId - The billing agreement ID that should be sent for authorizing and capturing the funds.

{% hint style="info" %}
This agreement ID should be saved by the merchant on their server, so that they can send it for authorizing and capturing the transactions.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verifone.com/online-payments/advanced-payment-methods-apms/paypal/your-first-transaction-with-paypal/paypal-create-billing-agreement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
