I want to update existing paypalAccount
of a Vault user every time she makes a purchase using paypal checkout.
According to the documentation, I can only update creditCards
using paymentMethodNonce
.
Another piece of documentation shows how to update Paypal account using token
. My understanding is that token
is only available only after paymentMethod
is added to Vault.
But all I know at this point (before I update the Vault) is paymentMethodNonce
from the client-side. And I don't want to create a new paymentMethod
/paypalAccount
but to update the existing one.
Is there any way that I can update existing paypalAccount
using paymentMethodNonce
?
Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
Currently there is not a way to update a paypalAccount using a paymentMethodNonce.
You can update a paypalAccount by updating the paymentMethod tied to the paypalAccount. First, save a mapping from user to a payment_method_token on your server. The payment_method_token will be returned from
paymentMethod.create
. Then, anytime you want to update a user's details, you can retrieve the paymentMethod using the token, and callpaymentMethod.update
.For more information on updating paypalAccounts, please check out this documentation.