Skip to main content

Before you begin

This guide assumes that you know how to:

Accept payments with Venmo via Braintree

Prepare the client session

Venmo via Braintree requires the following data to process a payment successfully. Pass the following data in the client session, or in the payment request (for manual payment creation).
Parameter NameRequiredDescription
currencyCode3-letter currency code in ISO 4217 format, e.g. USD for US dollars
order
↳ lineItems
Details of the line items of the order

Prepare the SDK for payments

  • Web
  • iOS
  • Android
  • React Native

Handle payment method

Venmo via Braintree requires instance of Redirect Manager in order to be presented to the user:
Typescript
const manager = await headless.createPaymentMethodManager('BRAINTREE_VENMO')
BRAINTREE_VENMO must be returned as PaymentMethod.type in the onAvailablePaymentMethodsLoad callback.When the user has selected the payment method, call the start function. This function automatically:
  • opens a popup to present a loading indicator, then the payment method web page
  • shows an overlay on top of your page that prompts the user to focus on the popup
Typescript
myButton.addEventListener('click', () => {
    manager.start()
})
This code is intended solely for illustrative purposes. As many redirect payment methods share a common approach, it is recommended to centralize the implementation of these methods within your codebase. For a practical demonstration of how to achieve this, please refer to the guide on how to handle Native UI payment methods.

Test

You can test one-off payments in the US only, with USD as currency. Recurring payments can only be tested in production.

Go live

You don’t need to do anything particular to go live — just make sure to use production credentials.