Your customer's Venmo account can be saved to your Vault and reused for future transactions, just like a credit card:
$result = $gateway->paymentMethod()->create([ 'customerId' => '12345', 'paymentMethodNonce' => nonceFromTheClient ]);
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:
$result = $gateway->transaction()->sale([ 'amount' => "1000.00", 'paymentMethodNonce' => nonceFromTheClient, 'options' => [ 'submitForSettlement' => true ], 'deviceData' => $_POST['device_data'] ]);
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.
$result = $gateway->transaction()->sale([ 'amount' => "1000.00", 'paymentMethodNonce' => nonceFromTheClient, 'options' => [ 'submitForSettlement' => true, 'venmo' => [ 'profileId' => YOUR_VENMO_PROFILE_ID ] ], 'deviceData' => $_POST['device_data'] ]);
Keep in mind that a Venmo customer can delete merchant
connections from within their Venmo app at any time. This will remove the Venmo
payment_method from your Vault.
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.
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.