# vaultPayPalBillingAgreement

Mutation · GraphQL API

Vault an existing PayPal Billing Agreement that was not created through Braintree. Only use this mutation if you need to import PayPal Billing Agreements from an existing PayPal integration into your Braintree account.

## Authentication

- SERVER

## Input

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

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

Top-level fields returned when importing and vaulting a PayPal Billing Agreement.

### Returned fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `paymentMethod` (`PaymentMethod`): The vaulted payment method containing the imported PayPal Billing Agreement.

## Examples

### Vault PayPal billing agreement 3D Secure

Vault an existing PayPal Billing Agreement that was not created through Braintree. Only use this mutation if you need to import PayPal Billing Agreements from an existing PayPal integration into your Braintree account.

```graphql
mutation vaultPayPalBillingAgreement3DSecure($input: VaultPayPalBillingAgreementInput!, $authenticationInsightInput: AuthenticationInsightInput!)  {
  vaultPayPalBillingAgreement(input: $input) {
    clientMutationId
    paymentMethod {
      __typename
      id
      legacyId
      usage
      createdAt
      details {
        __typename
        ... on CustomActionsPaymentMethodDetails {
          __typename
          actionName
          fields {
            name
            displayValue
          }
        }
        ... on CreditCardDetails {
          __typename
          brandCode
          last4
          bin
          binData {
            prepaid
            healthcare
            debit
            durbinRegulated
            commercial
            payroll
            issuingBank
            countryOfIssuance
            productId
            prepaidReloadable
            business
            consumer
            corporate
            purchase
          }
          expirationMonth
          expirationYear
          cardholderName
          uniqueNumberIdentifier
          origin {
            type
            details {
              __typename
              ... on ApplePayOriginDetails {
                __typename
                paymentInstrumentName
                bin
                merchantTokenIdentifier
                dpanLastTwo
                isDeviceToken
                last4
                paymentAccountReference
              }
              ... on GooglePayOriginDetails {
                __typename
                googleTransactionId
                bin
                last4
                paymentAccountReference
              }
              ... on MasterpassOriginDetails {
                __typename
                bin
              }
              ... on MetaCheckoutOriginDetails {
                __typename
                containerId
                bin
              }
              ... on NetworkTokenOriginDetails {
                __typename
                bin
              }
              ... on SamsungPayOriginDetails {
                __typename
                bin
              }
              ... on VisaCheckoutOriginDetails {
                __typename
                callId
                bin
              }
              ... on PayPalLocalPaymentOriginDetails {
                __typename
                captureId
                customField
                paymentId
                transactionFee {
                  value
                  currencyCode
                }
                blikAliases {
                  key
                  label
                }
              }
              ... on CardPresentOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                readerId
                storeId
              }
              ... on EmvCardOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                applicationPreferredName
                applicationIdentifier
                terminalVerificationResult
                cardSequenceNumber
                applicationInterchangeProfile
                terminalTransactionDate
                terminalTransactionType
                cashbackAmount
                applicationUsageControl
                terminalCountryCode
                applicationCryptogram
                cryptogramInformationData
                cardholderVerificationMethodResults
                applicationTransactionCounter
                unpredictableNumber
                issuerActionCodeDefault
                issuerActionCodeDenial
                issuerActionCodeOnline
                readerId
                storeId
              }
            }
          }
          billingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          threeDSecure {
            authentication {
              cavv
              directoryServerTransactionId
              eciFlag
              liabilityShifted
              liabilityShiftPossible
              cardEnrolled
              authenticationStatus
              version
              xId
              threeDSecureServerTransactionId
              acsTransactionId
              paresStatus
              transactionStatus
              transactionStatusReason
            }
            authenticationInsight(input: $authenticationInsightInput) {
              merchantAccountId
              customerAuthenticationRegulationEnvironment
              customerAuthenticationIndicator
            }
          }
          cardOnFileNetworkTokenized
          paymentAccountReference
        }
        ... on PayPalAccountDetails {
          __typename
          billingAgreementId
          billingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          shippingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          email
          phone
          payerId
          firstName
          lastName
          cobrandedCardLabel
          origin {
            type
            details {
              __typename
              ... on ApplePayOriginDetails {
                __typename
                paymentInstrumentName
                bin
                merchantTokenIdentifier
                dpanLastTwo
                isDeviceToken
                last4
                paymentAccountReference
              }
              ... on GooglePayOriginDetails {
                __typename
                googleTransactionId
                bin
                last4
                paymentAccountReference
              }
              ... on MasterpassOriginDetails {
                __typename
                bin
              }
              ... on MetaCheckoutOriginDetails {
                __typename
                containerId
                bin
              }
              ... on NetworkTokenOriginDetails {
                __typename
                bin
              }
              ... on SamsungPayOriginDetails {
                __typename
                bin
              }
              ... on VisaCheckoutOriginDetails {
                __typename
                callId
                bin
              }
              ... on PayPalLocalPaymentOriginDetails {
                __typename
                captureId
                customField
                paymentId
                transactionFee {
                  value
                  currencyCode
                }
                blikAliases {
                  key
                  label
                }
              }
              ... on CardPresentOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                readerId
                storeId
              }
              ... on EmvCardOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                applicationPreferredName
                applicationIdentifier
                terminalVerificationResult
                cardSequenceNumber
                applicationInterchangeProfile
                terminalTransactionDate
                terminalTransactionType
                cashbackAmount
                applicationUsageControl
                terminalCountryCode
                applicationCryptogram
                cryptogramInformationData
                cardholderVerificationMethodResults
                applicationTransactionCounter
                unpredictableNumber
                issuerActionCodeDefault
                issuerActionCodeDenial
                issuerActionCodeOnline
                readerId
                storeId
              }
            }
          }
          limitedUseOrderId
          selectedFinancingOption {
            term
            monthlyPayment {
              value
              currencyCode
            }
            discountPercentage
            discountAmount {
              value
              currencyCode
            }
          }
          fundingSourceDescription
          vaultedBillingAgreementId
        }
        ... on SamsungPayCardDetails {
          __typename
          brand
          brandCode
          bin
          binData {
            prepaid
            healthcare
            debit
            durbinRegulated
            commercial
            payroll
            issuingBank
            countryOfIssuance
            productId
            prepaidReloadable
            business
            consumer
            corporate
            purchase
          }
          sourceCardLast4
        }
        ... on VenmoAccountDetails {
          __typename
          username
          venmoUserId
        }
        ... on UsBankAccountDetails {
          __typename
          accountholderName
          accountType
          ownershipType
          bankName
          last4
          routingNumber
          verified
          achMandate {
            acceptedAt
          }
        }
        ... on SEPADirectDebitAccountDetails {
          __typename
          merchantOrPartnerCustomerId
          last4
          bankReferenceToken
          mandateType
        }
      }
      customer {
        __typename
        id
        legacyId
      }
    }
  }
}
```

### Vault PayPal billing agreement

Top-level input fields for importing and vaulting a PayPal Billing Agreement.

```graphql
mutation vaultPayPalBillingAgreement($input: VaultPayPalBillingAgreementInput!) {
  vaultPayPalBillingAgreement(input: $input) {
    clientMutationId
    paymentMethod {
      __typename
      id
      legacyId
      usage
      createdAt
      details {
        __typename
        ... on CustomActionsPaymentMethodDetails {
          __typename
          actionName
          fields {
            name
            displayValue
          }
        }
        ... on CreditCardDetails {
          __typename
          brandCode
          last4
          bin
          binData {
            prepaid
            healthcare
            debit
            durbinRegulated
            commercial
            payroll
            issuingBank
            countryOfIssuance
            productId
            prepaidReloadable
            business
            consumer
            corporate
            purchase
          }
          expirationMonth
          expirationYear
          cardholderName
          uniqueNumberIdentifier
          origin {
            type
            details {
              __typename
              ... on ApplePayOriginDetails {
                __typename
                paymentInstrumentName
                bin
                merchantTokenIdentifier
                dpanLastTwo
                isDeviceToken
                last4
                paymentAccountReference
              }
              ... on GooglePayOriginDetails {
                __typename
                googleTransactionId
                bin
                last4
                paymentAccountReference
              }
              ... on MasterpassOriginDetails {
                __typename
                bin
              }
              ... on MetaCheckoutOriginDetails {
                __typename
                containerId
                bin
              }
              ... on NetworkTokenOriginDetails {
                __typename
                bin
              }
              ... on SamsungPayOriginDetails {
                __typename
                bin
              }
              ... on VisaCheckoutOriginDetails {
                __typename
                callId
                bin
              }
              ... on PayPalLocalPaymentOriginDetails {
                __typename
                captureId
                customField
                paymentId
                transactionFee {
                  value
                  currencyCode
                }
                blikAliases {
                  key
                  label
                }
              }
              ... on CardPresentOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                readerId
                storeId
              }
              ... on EmvCardOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                applicationPreferredName
                applicationIdentifier
                terminalVerificationResult
                cardSequenceNumber
                applicationInterchangeProfile
                terminalTransactionDate
                terminalTransactionType
                cashbackAmount
                applicationUsageControl
                terminalCountryCode
                applicationCryptogram
                cryptogramInformationData
                cardholderVerificationMethodResults
                applicationTransactionCounter
                unpredictableNumber
                issuerActionCodeDefault
                issuerActionCodeDenial
                issuerActionCodeOnline
                readerId
                storeId
              }
            }
          }
          billingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          threeDSecure {
            authentication {
              cavv
              directoryServerTransactionId
              eciFlag
              liabilityShifted
              liabilityShiftPossible
              cardEnrolled
              authenticationStatus
              version
              xId
              threeDSecureServerTransactionId
              acsTransactionId
              paresStatus
              transactionStatus
              transactionStatusReason
            }
          }
          cardOnFileNetworkTokenized
          paymentAccountReference
        }
        ... on PayPalAccountDetails {
          __typename
          billingAgreementId
          billingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          shippingAddress {
            company
            addressLine1
            addressLine2
            fullName
            adminArea2
            adminArea1
            postalCode
            countryCode
            phone {
              countryPhoneCode
              phoneNumber
              extensionNumber
            }
          }
          email
          phone
          payerId
          firstName
          lastName
          cobrandedCardLabel
          origin {
            type
            details {
              __typename
              ... on ApplePayOriginDetails {
                __typename
                paymentInstrumentName
                bin
                merchantTokenIdentifier
                dpanLastTwo
                isDeviceToken
                last4
                paymentAccountReference
              }
              ... on GooglePayOriginDetails {
                __typename
                googleTransactionId
                bin
                last4
                paymentAccountReference
              }
              ... on MasterpassOriginDetails {
                __typename
                bin
              }
              ... on MetaCheckoutOriginDetails {
                __typename
                containerId
                bin
              }
              ... on NetworkTokenOriginDetails {
                __typename
                bin
              }
              ... on SamsungPayOriginDetails {
                __typename
                bin
              }
              ... on VisaCheckoutOriginDetails {
                __typename
                callId
                bin
              }
              ... on PayPalLocalPaymentOriginDetails {
                __typename
                captureId
                customField
                paymentId
                transactionFee {
                  value
                  currencyCode
                }
                blikAliases {
                  key
                  label
                }
              }
              ... on CardPresentOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                readerId
                storeId
              }
              ... on EmvCardOriginDetails {
                __typename
                authorizationMode
                pinVerified
                inputMode
                terminalId
                applicationPreferredName
                applicationIdentifier
                terminalVerificationResult
                cardSequenceNumber
                applicationInterchangeProfile
                terminalTransactionDate
                terminalTransactionType
                cashbackAmount
                applicationUsageControl
                terminalCountryCode
                applicationCryptogram
                cryptogramInformationData
                cardholderVerificationMethodResults
                applicationTransactionCounter
                unpredictableNumber
                issuerActionCodeDefault
                issuerActionCodeDenial
                issuerActionCodeOnline
                readerId
                storeId
              }
            }
          }
          limitedUseOrderId
          selectedFinancingOption {
            term
            monthlyPayment {
              value
              currencyCode
            }
            discountPercentage
            discountAmount {
              value
              currencyCode
            }
          }
          fundingSourceDescription
          vaultedBillingAgreementId
        }
        ... on SamsungPayCardDetails {
          __typename
          brand
          brandCode
          bin
          binData {
            prepaid
            healthcare
            debit
            durbinRegulated
            commercial
            payroll
            issuingBank
            countryOfIssuance
            productId
            prepaidReloadable
            business
            consumer
            corporate
            purchase
          }
          sourceCardLast4
        }
        ... on VenmoAccountDetails {
          __typename
          username
          venmoUserId
        }
        ... on UsBankAccountDetails {
          __typename
          accountholderName
          accountType
          ownershipType
          bankName
          last4
          routingNumber
          verified
          achMandate {
            acceptedAt
          }
        }
        ... on SEPADirectDebitAccountDetails {
          __typename
          merchantOrPartnerCustomerId
          last4
          bankReferenceToken
          mandateType
        }
      }
      customer {
        __typename
        id
        legacyId
      }
    }
  }
}
```

---

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