Gpay

Google has announced major enhancements to the Google Pay API, specifically targeting Merchant Initiated Transactions (MIT). These updates provide developers with more granular control over complex billing scenarios like subscriptions, hotel reservations, and automatic account reloads, moving beyond the API's original focus on immediate customer-initiated payments.

Three New MIT Categories

The update introduces dedicated objects within the PaymentDataRequest to handle three distinct transaction types:

  1. Recurring Transactions (recurringTransactionInfo): Designed for subscriptions and regular billing. Developers can now specify introductory periods, billing frequency (daily to yearly), and whether amounts are fixed or variable.

  2. Deferred Transactions (deferredTransactionInfo): Ideal for pre-orders or hospitality bookings. This allows a merchant to authorize a payment upfront but schedule the actual charge for a specific future date and time.

  3. Automatic Reload Transactions (automaticReloadTransactionInfo): Aimed at services with balance-based top-ups. Merchants can define a minimum balance threshold that triggers an automatic reload of a specific amount.

Improving the User and Developer Experience

The enhancements bring several technical and operational benefits:

What This Means for Developers

Especially those building e-commerce platforms or SaaS solutions—this update simplifies the implementation of complex billing logic. By providing the intended future transaction terms directly to Google Pay, the API facilitates the use of the correct token type for optimal performance.

Developers can find the updated API reference documentation on the Google Developers site to start implementing these features.