PENG YING: Hi, My name is Peng Ying
and I work on the Google Wallet team.
I'm here to talk about the Instant Buy API.
Instant Buy is a product that enables seamless purchases
of physical goods and services from mobile devices.
For purchases in Android apps, Google
provides two payment APIs.
For digital goods, you can use the In-app Billing API.
For physical goods and services, you
can use the Instant Buy API to enable seamless purchases
for your users.
And seamless purchases of physical goods
are important because we're starting
to see more apps interacting with the world
and creating better experiences.
For example, rideshare companies are
transforming the transportation industry.
Before you would stay on the corner and hope an empty cab
would pass you by, but now you know exactly where that car is
and when it will arrive.
And there's no more dealing with broken credit card readers,
there's no more figuring out tip,
there's no more manual payment whatsoever.
Everything is handled by the device in your pocket.
And when you get to your destination,
you just get out of the car and go.
The way that we order food is changing.
More restaurants like Domino's have mobile ordering apps.
Aggregators like Eat24 are enabling smaller restaurants
to accept mobile orders.
I never know when that next craving is going to strike,
but when it does, I'm fully prepared.
Travel is becoming more efficient.
Companies like HotelTonight, AirBnB, and Expedia
are enabling travelers to book on the go.
And by enabling last minute purchasing and filling
mobile consumer needs, they can help
reduce the vacancy rates of businesses.
Lastly, we're starting to see this internet of things
taking shape.
New experiences powered by the web.
Smart parking meters.
Why do you need to go back to the meter to add time
or to figure out how much time is left?
Well, you don't.
You can do that from your phone.
And these meter apps should do other things too,
like tell you where you parked and how
to walk back to your car.
And when mobile devices integrate with cars,
you should see even more interaction.
Imagine seeing all of the open parking spots on your car's
navigation screen, wouldn't that be awesome?
With Zipcar, City CarShare, or iDrive
you can find and reserve a car rental from your phone.
Whenever you need a car, you can find one around you
and book it.
These services provide an amazing amount of freedom.
Developers like you are thinking up of and building
the apps that change the way that we
interact with the world.
All powered by the smart, contextual devices
in our pockets.
And Instant Buy makes payments for these things seamless.
If you're developing an app that sells physical goods
or services, you need to integrate Instant Buy.
Also, like many things Google, it's
free, so why wouldn't you integrate?
You only need to pay for your payment processor.
So how does it simplify purchasing?
Well, as many users know, check out on the phone is a pain.
And as many developers know, this pain
can cause a huge conversion drop-off.
Here's one example, I have to type in my name, my street
address, my zip, my city, my state, and my phone number just
to start.
Then I get to open my wallet, I have
to get out my credit card, type in the 16 digits,
CVV, expiration, and if I have a separate billing address,
I pretty much just give up and go buy it on Amazon.
Every additional field requested is an opportunity for me
to hit the Home button and do something else like play Candy
Crush.
And for every app that I want to purchase from,
and need to go through this tedious
process over and over and over again.
To improve this user experience and create a seamless purchase
flow, Instant Buy uses Google Wallet.
Wallet stores the user's payment credentials in the Cloud
and makes them accessible to developers.
This means that any one who's purchased an item on a Google
property such as Play, YouTube, Drive, or Music,
or purchasing an app that's integrated within that
billing-- such as Clash of Clans, Candy Crush,
or Pandora-- or purchase an app that's integrated with Instant
Buy-- such as Uber, Eat24, Domino's-- already have
their credentials stored with Google Wallet.
That's a lot of users.
So instead of type, type, type, type, type, type,
type, with Instant Buy users can just
click, click, click, and buy.
Google generates a one-time use credit card
that's backed by the customer's stored payment credentials.
This one-time card and the customer's billing information
is then passed to your app and you can feed the credit card
number into your existing purchase flow
and process the order just like a regular credit card
transaction.
What this means is that consumers experience
a seamless purchase with credentials secured by Google
and merchants can add Instant Buy
without changing any existing payment processing code.
And did I mention it's free?
So I'm assuming that you want to learn more about integration,
so let's walk through some of the high level steps
to integrate Instant Buy on Android.
First you need to get credentials.
For testing purposes, you can use a Google Wallet sandbox
account.
For a production account, you need
to sign up at getinstantbuy.withgoogle.com.
The Instant Buy flow consists of three main steps in addition
to charging your order-- Masked Wallet, Full Wallet, and Notify
Transaction status.
You handle charging the order just as you normally would.
Now, let's see what this looks like in a real purchase flow.
Here is your typical shopping cart page.
Selecting Buy with Google will initiate the Masked Wallet
request.
The Masked Wallet flow allows the user
to choose their payment and shipping information populated
from Google Wallet.
Once a user selects their information,
Instant Buy returns an obfuscated version of it
to your app.
This obfuscated information includes the last four
of the user's credit card and their billing zip.
You should then use this information
to calculate shipping, if necessary,
and display their information on the payment confirmation
page for user verification.
Once a customer's ready, they'll tap to complete the order.
Your confirmed order button calls a Full Wallet request
which will return the credit card details.
You can then charge a card using your normal payment flow
and show the user your receipt page
and send the transaction status notification
that the transaction went through smoothly.
Now let's take a look at the code behind this.
First, we create our Mass Wallet request.
This defines your information that we're
asking from a customer and the estimated order information.
In this specific case, we're asking for the user's phone
number, the shipping address, but you
should minimize the request for your needs.
You don't want to be asking for the shipping address
if you don't need it.
Then we create and instantiate the Wallet fragment style
and options.
Here it's a Buy with Google button
that's pointed towards sandbox and uses the Holo Light theme.
Finally, we initialize a Wallet fragment.
You need to use a fragment manager
to replace a holder layout section with the Wallet
fragment.
This will create an add the Buy with Google button to your app.
You also need to handle the onActivityResult
to get the Mass Wallet response which
contains the obfuscated user information.
Once you have the Mass Wallet response,
you can create a Full Wallet request object
and issue the Full Wallet request
to retrieve customer payment credentials.
You can then charge the credentials,
and after charging, notify Google
of the transaction status.
And that's it.
It's that easy.
So if you're working on an app where
users can purchase physical goods or services,
you need to integrate Instant Buy.
Integration is quick, the user experience is seamless,
and it's free.
While we've only showed Android in this video,
Instant Buy also supports the web, mobile web, and iOS.
For detailed information on integration
and a step-by-step tutorial, take a look
at our developer documentation.
I can't wait to see what you build.
I'm Peng Ying and thanks for watching.