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

Show Universal Checkout

Venmo via Braintree is automatically presented to the customer when calling Primer.showUniversalCheckout.

Typescript
try {
  await Primer.showUniversalCheckout(clientToken, {
    container: '#checkout-container',
    options,
    onCheckoutComplete({ payment }) {
      console.log('Checkout complete.', payment)
    },
  })
} catch (e) {
  // handle error
}

Customization

Check the customization guide to learn how to customize payment method buttons.

Typescript
const options = {
  /* Other options ... */
  style: {
    paymentMethodButton: {
      background: string,
      borderRadius: number | string,
      boxShadow: string,
      borderColor: string,
      height: number,
      primaryText: TextStyle,
      logoColor: logoColor,
      marginTop: string,
    },
  },
}

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.