Display a saved payment method

If you pass a customer_id when generating a client token, Drop-in will display that customer's saved payment methods and automatically add any newly-entered payment methods to their Vault record.

note

Apple Pay will not be automatically vaulted on the client.

important

We do not recommend enabling Vault Manager if you are using Braintree's recurring billing; doing so would give your customer's the ability to delete payment methods associated with subscriptions.

Advanced Fraud Tools

To use Advanced Fraud Tools for your Drop-in form, you'll need to complete these 3 steps at the same time:

  1. Enable Advanced Fraud Tools in the Control Panel
  2. Update your client-side integration to collect device data
  3. Update your server-side integration to pass device data on transaction and verification requests

If there is any delay between enabling in the Control Panel and making the code changes, the integration will not work properly. See the Advanced Fraud Tools guide for more details.

Customize your UI

Tint color

We automatically pick up the iOS 7 UIView tintColor and use it as our accent color. You can override it in the same way you'd override the tint color of any UIView.

Objective-C Swift
Copy
Copied
// In your app delegate
self.window.tintColor = [UIColor colorWithRed:255/255.0f green:136/255.0f blue:51/255.0f alpha:1.0f];
// Or, upon initialization
dropInViewController.view.tintColor = [UIColor colorWithRed:255/255.0f green:136/255.0f blue:51/255.0f alpha:1.0f];

Summary title

Primary text to display in the summary view. Intended to name the overall transaction taking place (e.g. "1 Yellow T-Shirt" or "1 Year Subscription").

Objective-C Swift
Copy
Copied
dropInViewController.summaryTitle = @"1 Yellow T-Shirt";

Summary description

Detail text to display in the summary view. Intended to provide a few words of detail (e.g. "Ships in five days" or "We know you'll love it").

Objective-C Swift
Copy
Copied
dropInViewController.summaryTitle = @"Ships in five days";

If summaryTitle or summaryDescription are nil, then the summary view is not shown.

Display amount

A string representation of the grand total amount (e.g. "$10").

Objective-C Swift
Copy
Copied
dropInViewController.displayAmount = @"$10";

Call to action text

The text to display in the primary call-to-action button (e.g. "$19 - Purchase" or "Subscribe Now").

Objective-C Swift
Copy
Copied
dropInViewController.callToActionText = @"Subscribe Now";

Hide call to action button

You can also hide the call-to-action button if you'd like the user to submit Drop-in in some other way (e.g. via a UIBarButtonItem).

Objective-C Swift
Copy
Copied
dropInViewController.shouldHideCallToAction = YES;

Still have questions?

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