Venmo

Server-Side Implementationanchor

GraphQL
Click here to view the server-side implementation using GraphQL.

Vaulting the Venmo accountanchor

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

  1. Ruby
result = gateway.payment_method.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 Transaction: Sale with options-store_in_vault or options-store_in_vault_on_success.

Deleting a Vaulted Payment Methodanchor

If a customer deletes a vaulted Venmo payment method on a merchant website or app, it will also delete the Venmo customer's merchant connection within their Venmo app on the Connected Businesses page. However, if your Venmo vault has duplicate payment methods for the same Venmo account, the merchant connection will not be deleted until the last payment method is deleted.

Keep in mind that a Venmo customer can also delete a merchant connection from within their Venmo app at any time. This will automatically remove the Venmo payment method from the merchant's vault. You can be notified when this happens via the PaymentMethodRevokedByCustomer webhook.

Creating transactionsanchor

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:

  1. Ruby
result = gateway.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.

Specifying the business profileanchor

You will need to pass the profile_id associated with the Venmo business profile that you want to create the transaction for. This should be the same profile_id used when tokenizing the Venmo account on the client side.

  1. Ruby
result = gateway.transaction.sale(
  :amount => "1000.00",
  :payment_method_nonce => nonce_from_the_client,
  :options => {
    :submit_for_settlement => true,
    :venmo => {
      :profile_id => YOUR_VENMO_PROFILE_ID
    }
  }
)
note

If you do not specify the profile_id, the transaction will be associated with the default business profile.

Removing connectionsanchor

Deleting a vaulted Venmo payment method will also delete the Venmo customer's merchant connection within their Venmo app. However, if your vault has duplicate payment methods for the same Venmo account, the merchant connection will not be deleted until the last payment method is deleted.

Keep in mind that a Venmo customer can also delete your merchant connection from within their Venmo app at any time. This will automatically remove the Venmo payment_method from your Vault. You can be notified when this happens via the PaymentMethodRevokedByCustomer webhook.

Settlementanchor

Capturing multiple partial amounts against the same authorizationanchor

If you send physical goods to customers in multiple shipments, you can capture the total authorized amount across multiple partial settlements using Transaction: Submit For Partial Settlement.

Gateway rejectionsanchor

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 Page: Testing and Go Live