See also the PaymentMethod response object.

Look up a payment method by token.

Ruby
Copy
Copied
payment_method = gateway.payment_method.find("token")
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

If the payment method can't 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
Copy
Copied
paypal_account = gateway.paypal_account.find("the_token")
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

If the PayPal account can't be found, it will raise a Braintree::NotFoundError.

Still have questions?

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