# CreatePayPalBillingAgreementInput

Input · GraphQL API

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

## Fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `merchantAccountId` (`ID`): Braintree merchant account ID associated with the PayPal account to be used for the Billing Agreement creation.
- `returnUrl` (`URL!`) — required: URL for redirect back to merchant app on the client indicating successful approval.
- `cancelUrl` (`URL!`) — required: URL for redirect back to merchant app on the client indicating unsuccessful approval.
- `description` (`String`): Description of the PayPal Billing Agreement, displayed to the PayPal user on paypal.com and other PayPal user experiences.
- `email` (`EmailAddress`): Email of the payer (if known). This will prepopulate the input field in the PayPal approval page.
- `offerPayPalCredit` (`Boolean`): Indicates whether PayPal Credit should be offered in the PayPal approval flow.
- `recurringBillingPlan` (`PayPalRecurringBillingPlanInput`): Billing plan for recurring payments.
- `paypalRiskCorrelationId` (`ID`): PayPal Risk correlation ID (also known as the Client Metadata ID).
- `paypalExperienceProfile` (`PayPalBillingAgreementExperienceProfileInput`): Defines the experience profile used to render the billing agreement approval flow.
- `shippingAddress` (`AddressInput`): Merchant-provided shipping address. Fields addressLine1, adminArea2, and countryCode are required for Billing Agreements.
- `paypalProductAttributes` (`PayPalProductAttributesInput`): Product attributes input for PayPal billing agreement.
- `customerSessionId` (`String`): A unique identifier which can be used to manage shopper context across merchant's shopping pages.
- `appSwitchContext` (`PayPalAppSwitchContextInput`): Context information for enabling App Switch to the PayPal app during checkout.

## Used by

- [createPayPalBillingAgreement](/braintree/graphql/reference/mutations/create-pay-pal-billing-agreement) — Mutation; input

## GraphQL definition

```graphql
input CreatePayPalBillingAgreementInput {
  clientMutationId: String
  merchantAccountId: ID
  returnUrl: URL!
  cancelUrl: URL!
  description: String
  email: EmailAddress
  offerPayPalCredit: Boolean
  recurringBillingPlan: PayPalRecurringBillingPlanInput
  paypalRiskCorrelationId: ID
  paypalExperienceProfile: PayPalBillingAgreementExperienceProfileInput
  shippingAddress: AddressInput
  paypalProductAttributes: PayPalProductAttributesInput
  customerSessionId: String
  appSwitchContext: PayPalAppSwitchContextInput
}
```

---

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