# createPayPalBillingAgreement

Mutation · GraphQL API

Set up a PayPal Billing Agreement Token for approval by a PayPal user.

## Authentication

- CLIENT
- SERVER

## Input

- `input` (`CreatePayPalBillingAgreementInput!`) — required

## Returns [CreatePayPalBillingAgreementPayload](/braintree/graphql/reference/types/create-pay-pal-billing-agreement-payload)

Top-level fields returned from setting up a PayPal Billing Agreement Token.

### Returned fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `billingAgreementToken` (`ID`): The Billing Agreement token.
- `approvalUrl` (`URL`): The URL for getting user approval of the PayPal Billing Agreement.
- `launchPayPalApp` (`Boolean`): Indicates app switch eligibility.

## Examples

### Create PayPal billing agreement

Top-level input field for creating a PayPal Billing Agreement Token.

```graphql
mutation createPayPalBillingAgreement($input: CreatePayPalBillingAgreementInput!) {
  createPayPalBillingAgreement(input: $input) {
    clientMutationId
    billingAgreementToken
    approvalUrl
    launchPayPalApp
  }
}
```

---

[View the complete GraphQL schema on GitHub](https://raw.githubusercontent.com/braintree/graphql-api/refs/heads/master/schema.graphql)