> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/online-payments/advanced-payment-methods-apms/paypal/your-first-transaction-with-paypal/paypal-create-billing-agreement.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
