Transactions

Transactions let your app handle purchases (for example, pick-up, delivery, or tickets) or reservations and appointments (for example, restaurants, haircuts, fitness classes).

Integrating transactions into your app lets you create ordering experiences that are more seamless than websites and mobile apps through a natural, conversational ordering experience.

Here's an example with a shoe store app:

While the user is building their "cart", you may need to collect their delivery or shipping information to determine things like price and service availability. Your app can request the user's permission for Google to share their delivery address with your app.

Once they are ready to checkout, your app can trigger an order confirmation experience by providing the structured order data to the Transactions API. The user can then authorize the purchase and accept or reject the order. We provide a built-in experience enabling users to change their payment settings, delivery address, etc.

If the user authorizes the purchase, your app should immediately respond by confirming that the order is active. You do this by providing the Transactions API with a structured receipt. This is presented to the user as a rich receipt "card" as part of their interaction with your app.

You can then continue the dialog with the user. You might take this opportunity to let them create an account on your app so that they can earn rewards or re-order their favorite items.

A detailed version of the receipt will appear in the user's Assistant order history. Later, you can use the order ID associated with this receipt to send structured order updates. Important updates will be sent to the user as push notifications.

Integrating with the Transactions API

Integrating with the Transactions API involves the following steps:

  1. Create a project in the Actions Console and opt-in to Transactions
  2. Use Dialogflow or other tools to build your app:

    1. Create a "cart assembly" experience to guide the user to build an order
    2. Prepare a payment method -- you can:

      • Link the user's Google account with your web service to access a payment method that the user has on file with you

      • Use Stripe, Braintree, or Vantiv to charge a credit card the user has stored with Google

      • Take payment "on fulfillment" (e.g. cash on delivery) or not take payment at all (e.g. for some reservations)

    3. Propose the order to the user with the actions.intent.TRANSACTION_DECISION intent

    4. Once the user accepts, send a structured receipt
  3. Support and test both Sandbox and Production modes. Test the Transactions API only on Android M+N devices -- not the Actions Web Simulator.

  4. Use the Conversation Send API to provide structured order update notifications throughout the life of the order
  5. Submit your app via the Actions Console

start building now

Prerequisites

See the policies and guidelines document for information on how to distribute your apps to users.