Braintree/src/main/java/com/braintreepayments/api/PaymentMethod.java
public static void getPaymentMethodNonces(final BraintreeFragment fragment, boolean defaultFirst) {
        final Uri uri = Uri.parse(TokenizationClient.versionedPath(TokenizationClient.PAYMENT_METHOD_ENDPOINT))
                .buildUpon()
                .appendQueryParameter("default_first", String.valueOf(defaultFirst))
                .appendQueryParameter("session_id", fragment.getSessionId())
                .build();

        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                fragment.getHttpClient().get(uri.toString(), new HttpResponseCallback() {
                    @Override
                    public void success(String responseBody) {
                        try {
                            fragment.postCallback(PaymentMethodNonce.parsePaymentMethodNonces(responseBody));
                            fragment.sendAnalyticsEvent("get-payment-methods.succeeded");
                        } catch (JSONException e) {
                            fragment.postCallback(e);
                            fragment.sendAnalyticsEvent("get-payment-methods.failed");
                        }
                    }

                    @Override
                    public void failure(Exception exception) {
                        fragment.postCallback(exception);
                        fragment.sendAnalyticsEvent("get-payment-methods.failed");
                    }
                });
            }
        });
    }
public static void getPaymentMethodNonces(final BraintreeFragment fragment, boolean defaultFirst) {
        final Uri uri = Uri.parse(TokenizationClient.versionedPath(TokenizationClient.PAYMENT_METHOD_ENDPOINT))
                .buildUpon()
                .appendQueryParameter("default_first", String.valueOf(defaultFirst))
                .appendQueryParameter("session_id", fragment.getSessionId())
                .build();

        fragment.waitForConfiguration(new ConfigurationListener() {
            @Override
            public void onConfigurationFetched(Configuration configuration) {
                fragment.getHttpClient().get(uri.toString(), new HttpResponseCallback() {
                    @Override
                    public void success(String responseBody) {
                        try {
                            fragment.postCallback(PaymentMethodNonce.parsePaymentMethodNonces(responseBody));
                            fragment.sendAnalyticsEvent("get-payment-methods.succeeded");
                        } catch (JSONException e) {
                            fragment.postCallback(e);
                            fragment.sendAnalyticsEvent("get-payment-methods.failed");
                        }
                    }

                    @Override
                    public void failure(Exception exception) {
                        fragment.postCallback(exception);
                        fragment.sendAnalyticsEvent("get-payment-methods.failed");
                    }
                });
            }
        });
    }
Retrieves the current list of {@link PaymentMethodNonce}s for the current customer.
<p/>
When finished, the {@link java.util.List} of {@link PaymentMethodNonce}s will be sent to {@link
PaymentMethodNoncesUpdatedListener#onPaymentMethodNoncesUpdated(List)}.

@param fragment {@link BraintreeFragment}
@param defaultFirst when {@code true} the customer's default payment method will be first in the list, otherwise
payment methods will be ordered my most recently used.