Skip to main content
You can accept Venmo for secure payments from US customers with the JavaScript SDK v6. This guide shows you how to set up your environment, review eligibility requirements, add Venmo payments, and work with advanced features.

Prerequisites

Before beginning your integration, meet these requirements:
  • Create a PayPal developer account.
  • Use a PayPal business account to accept Venmo payments
  • Set up your sandbox credentials.
Note: You’ll use your sandbox credentials to create a .env file during the Development setup.

Eligibility

  • US-based merchants and US-based consumers only.
  • Payment must be in USD.

Development setup

Before continuing, complete the steps in the JavaScript SDK v6 sample integration README. Once setup is complete, verify the JavaScript SDK v6 examples are running at http://localhost:8080. To view the Venmo one-time payment example, navigate to: http://localhost:8080/client/components/venmoPayments/oneTimePayment/html/src/index.html.

Implementation steps

Step 1: HTML structure setup

Create your HTML page and include the PayPal SDK script.

Step 2: Initialize PayPal SDK

Set up the PayPal SDK with the Venmo component after it loads.

Step 3: Configure Venmo button

Create the Venmo payment session and set up the button.

Step 4. Configure payment session callbacks

Define callback handlers for payment approval, cancellation, and error scenarios.

Step 5. Choose presentation mode

The presentation mode determines how the payment UI appears for the customer.
Note: For Venmo, "auto" is the only supported presentation mode.

API endpoints

The integration requires these server-side endpoints.

Create order endpoint

Capture order endpoint

Key components

Integrate Venmo effectively by understanding the essential parts of the JavaScript SDK v6 workflow.
Key componentPurposeDetails
PayPal SDK instanceMain entry point for PayPal functionality
  • Includes venmo-payments component
  • Authenticate with your client ID
Eligibility checkDetermines if Venmo is available
  • Based on user location, device type, currency, and account status
  • Always check before showing Venmo button
Payment sessionManages Venmo payment flow and callbacks
  • Handles approve, cancel, and error scenarios
  • Created once and reused for multiple payment attempts
Presentation modesDefines how Venmo is displayed
  • Auto — Only available presentation mode for Venmo

Security considerations

  • Never expose client secrets in frontend code.
  • Process all payments through PayPal’s servers.
  • Use HTTPS in production.

Testing

  • Run transactions across desktop and mobile devices.
  • Verify eligibility logic and Venmo button rendering.
  • Test payment approval, cancellation, and error handling.

Resources