See also the Braintree::PaymentMethod response object.

Look up a payment method by token.

Ruby
Click to copy
Copied
payment_method = Braintree::PaymentMethod.find("token")

If the payment method cannot be found, it will raise a Braintree::NotFoundError.

Arguments
token required, String

The alphanumeric value that references a specific payment method stored in your Vault.

Examples

Single PayPal account

If you want to look up a single PayPal account using its token, use the find method.

Ruby
Click to copy
Copied
paypal_account = Braintree::PayPalAccount.find("the_token")

If the PayPal account cannot be found, it will raise a Braintree::NotFoundError.

Still have questions?

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