Vaulting the Venmo account

Your customer's Venmo account can be saved to your Vault and reused for future transactions, just like a credit card:

Ruby
Copy
Copied
result = Braintree::PaymentMethod.create(
  :customer_id => "131866",
  :payment_method_nonce => nonce_from_the_client
)

You can also save the customer's Venmo account to your Vault at the same time as your transaction by using Braintree::Transaction.sale() with options.store_in_vault or options.store_in_vault_on_success.

Creating transactions

Creating a Venmo transaction is the same as creating any other transaction with a nonce. Be sure to pass the device data you collected on the client side when you create the transaction:

Ruby
Copy
Copied
result = Braintree::Transaction.sale(
  :amount => "1000.00",
  :payment_method_nonce => nonce_from_the_client,
  :options => {
    :submit_for_settlement => true
  },
  :device_data => params[:device_data]
)
note

Device data is only required when creating transactions. It is not necessary on other calls, such as customer or payment method creation.

Removing connections

Keep in mind that a Venmo customer can delete merchant connections from within their Venmo app at any time. While this does not delete the customer's information from your Vault or impact any pending authorizations, future attempts to process transactions with that customer will fail.

Gateway rejections

In order to process a Venmo transaction in production, the Braintree gateway makes a request to a PayPal service for a transactable token that represents the Venmo account. If we are unable to get that token, the gateway will reject the transaction with a reason of "token_issuance". If you receive this rejection, try the transaction request again.

For more info on gateway rejections in general, see the Gateway Rejections support article.

Next: Testing and Go Live →

Still have questions?

If you can’t find an answer, contact our Support team.