# Pay with Venmo integration (/limited-release/commerce-platform/accept-payments/pay-with-venmo/integrate)



Add the Venmo button to your Checkout integration.

## Know before you code [#know-before-you-code]

> **Info:** * This integration is available to select partners only.
> * Complete [Onboard merchants](/limited-release/commerce-platform/onboard-merchants/) before you begin this integration.
> * You must have an [access token](/limited-release/commerce-platform/get-started/).
> * To run test transactions, set `client-id` to your sandbox client ID.
> * Complete a [PayPal Checkout integration](/limited-release/commerce-platform/accept-payments/standard/).

## Add Venmo button [#add-venmo-button]

1. Add the JavaScript SDK code to display the Venmo button on your product and checkout pages.
2. Determine where the SDK should render the Venmo button. Use button options to control the layout of the button.

```javascript lineNumbers
<!-- Set up a container element for the button -->
<div id="paypal-button-container"></div>

<!-- Include the PayPal JavaScript SDK. Replace `YOUR_CLIENT_ID` with your client ID.-->
<!-- Note that `enable-funding=venmo` is added as a query parameter -->
<script src="https://www.paypal.com/sdk/js?client-id=YOUR_CLIENT_ID&enable-funding=venmo"></script>

<script>
  // Render the Venmo button into #paypal-button-container
  paypal.Buttons().render('#paypal-button-container')
</script>
```

### Step result [#step-result]

<iframe sandbox="allow-scripts allow-same-origin" src="https://www.paypal.com/webapps/hermes/button?version=5&env=production&style.size=large&funding.allowed=venmo,paylater&sessionID=46171950e0&locale.x=en_US&logLevel=warn&uid=f6713002fd&xcomponent=1&style.shape=rect&style.label=paypal&style.layout=vertical&funding.disallowed=card,credit" width="300" frameBorder="0" scrolling="no" />

## Test and go live [#test-and-go-live]

**Note:** Venmo is available in the US only. To simulate the Venmo button in the PayPal sandbox, add the `buyer-country=US` parameter to your JS SDK code.

Pay with Venmo is a mobile experience, so ensure you have the Venmo iOS or Android app installed. You can test this feature on an iOS Safari or Android Chrome browser.

In the sandbox environment, you can test your integration without moving any money. For more information on testing Venmo, see [Test Venmo in sandbox](/limited-release/commerce-platform/accept-payments/pay-with-venmo/test/).

## Best practices [#best-practices]

### Enable Venmo as a funding source [#enable-venmo-as-a-funding-source]

Venmo isn't displayed as a payment option in Checkout integrations by default. Add `enable-funding=venmo` as a query parameter to your JavaScript SDK `<script>` to display Venmo as a payment option.

### Allow for Venmo placement [#allow-for-venmo-placement]

If you have an existing vertical button stack, an additional Venmo button renders under the stack. Make sure you leave enough room on your page for the Venmo button.

### Display funding source used [#display-funding-source-used]

If you have a confirmation page or a notification to the user that shows the funding source that was used, use an `onClick` handler to display Venmo in the confirmation notification.

```javascript lineNumbers
let fundingSource

paypal.Buttons({
  onClick: (data) => {
    // fundingSource = "venmo"
    fundingSource = data.fundingSource

    // Use this value to determine what funding source was used to pay
    // Update your confirmation pages and notifications from "PayPal" to "Venmo"
  },
})
```
