# createVenmoPaymentContext

Mutation · GraphQL API

Create a Venmo payment context.

## Authentication

- CLIENT
- SERVER

## Input

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

## Returns [VenmoPaymentContextPayload](/braintree/graphql/reference/types/venmo-payment-context-payload)

Top-level fields returned when creating a Venmo payment context.

### Returned fields

- `clientMutationId` (`String`): An identifier used to reconcile requests and responses. 255 characters maximum.
- `venmoPaymentContext` (`VenmoPaymentContext`): The payment context object.

## Examples

### Create venmo payment context

Fields that are provided when creating a Venmo context.

```graphql
mutation createVenmoPaymentContext($input: CreateVenmoPaymentContextInput!) {
  createVenmoPaymentContext(input: $input) {
    clientMutationId
    venmoPaymentContext {
      __typename
      id
      merchantId
      intent
      createdAt
      updatedAt
      status
      environment
      isFinalAmount
      expiresAt
      paymentMethodId
      clientSDKMetadata {
        platform
        sessionId
        version
        integration
      }
      paymentMethodUsage
      customerClient
      merchantProfileId
      parentPaymentContextId
      displayName
      payerInfo {
        firstName
        lastName
        phoneNumber
        email
        externalId
        userName
        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
          }
        }
      }
      paysheetDetails {
        collectCustomerBillingAddress
        collectCustomerShippingAddress
        transactionDetails {
          subTotalAmount
          taxAmount
          discountAmount
          shippingAmount
          totalAmount
          venmoPaysheetLineItems {
            name
            quantity
            unitAmount
            type
            description
            productCode
            unitTaxAmount
            url
          }
        }
      }
      returnUrl
      venmoRiskCorrelationId
      appSwitchContext {
        mobileWeb {
          buyerUserAgent
          isIncognito
        }
      }
    }
  }
}
```

---

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