Android Payment Systems
As someone who dips in and out of various different ecosystems it sometimes feels overwhelming to find a new way of doing things. Android is no slouch in improving and re-inventing the wheel when it comes to it's own framework and how to implement everyday requirements for modern mobile apps changes frequently. It's hard to keep up unless you are a daily Android Dev.
I'd thought as I recently had to work through implementing in-app purchases, that I'd break down a quick overview of what is currently available and what the appropriate API would be.
Google Pay API
The Google Pay API allows merchants to integrate secure payment methods into their websites, mobile apps, and other digital platforms.
The major difference is that Google Pay integrates with Payments Service Providers (PSPs) or payment gateways for those old enough, e.g. Stripe, PayU and WorldPay. It allows users to use cards saved in their Google Account to connect with PSPs and seamlessly handle the transaction.
The devil is in the details however. From the TOS: "With respect to the sale of digital products and services, these terms apply for any transactions completed exclusively through a web browser. If You want to sell digital products or services through mobile applications, You may not use the API (please see In-App Billing)."
If you're wondering why Spotify is allowed - they struck a deal with Google to navigate to a webpage to accept payments.
So it's simple. For peasants. It's web use only.
Google Billing API
"Google Play's billing system is a service that enables you to sell digital products and content in your Android app" - Billing API
This new API includes the "Pay with Google" button which a lot of devs are after as it simplifies the payment checkout process.
Consumables vs Non-Consumables
The Billing API breaks it down into Consumables vs Non-Consumables. The former being an item which can be consumed more than once, i.e. a digital product like a download and non-consumables are those products which typically can only be purchased once. Upon successful purchase the developer must acknowledge the purchase as well as mark the item as consumed if the product is a consumable item.
Subscriptions
I did not need to integrate subscriptions but we all know what they are. The internal flow for subscriptions are outlines in the integration guide listed below this article under Resources.
Google Wallet API
"The Google Wallet API allows developers to create digital passes in the Google Wallet. The Google Wallet API currently supports boarding passes, event tickets, loyalty cards, offers, and transit passes. More recently, a generic pass type was added to support additional use cases."
This API doesn't include any payment methods and should only be considered when you need to store some kind of event pass/stub/ticket on the user's Google Profile.