Link to Youtube Video (visible only when JS is disabled)
We are excited to announce new enhancements to the Google Pay API that provide more flexibility and control over merchant initiated transactions (MIT). These updates enable developers to create seamless and secure payment experiences for a wider range of use cases, including subscriptions, deferred payments, and automatic reloads.
While the Google Pay API has always supported merchant initiated transactions, the existing specification was primarily designed for immediate customer initiated transactions (CIT). This meant that the merchant's intent for future charges couldn't be fully captured within the API request.
With the new enhancements, you can now clearly define the terms of future payments, providing transparency for users and ensuring smoother processing. The updates focus on three key MIT categories:
tokenUpdateUrl allows you to receive notifications about the underlying payment credential, such as card expiry updates, helping to ensure uninterrupted service for recurring payments.To support these new use cases, we've introduced new objects within the PaymentDataRequest:
recurringTransactionInfo: To describe recurring payment schedules.deferredTransactionInfo: To detail future one-time payments.automaticReloadTransactionInfo: To configure balance-based reloads.These new objects allow you to provide granular details about the intended future transactions. For example, within recurringTransactionInfo, you can specify:
introductoryPeriodInfo: Details about any trial or special introductory pricing.recurrenceItems: An array describing one or more recurring periods, each with its own price, status, and duration.price: The total amount for the entire recurrence, if fixed.managementUrl: A link for the user to manage their recurring payment.tokenUpdateUrl: A webhook URL for Google to send token lifecycle event notifications.{
"apiVersion": 2,
"apiVersionMinor": 0,
"allowedPaymentMethods": [
{
"type": "CARD",
// ... other card parameters
}
],
"recurringTransactionInfo": {
"label": "Monthly Subscription",
"transactionId": "SUB12345",
"recurrenceItems": [
{
"label": "Regular Charge",
"price": "9.99",
"priceStatus": "FINAL",
"recurrencePeriod": {
"unit": "MONTH",
"count": 1
}
}
],
"managementUrl": "https://example.com/subscriptions",
"tokenUpdateUrl": "https://example.com/api/token-updates"
}
}
These new Merchant Initiated Transaction features are now available. We encourage you to review the updated API reference documentation for complete details on the new objects and properties.
We believe these enhancements will empower developers to build even more robust and user-friendly payment solutions with the Google Pay API.