TimesofMoney integration

TimesofMoney is a payment processor in India. This section explains how to use TimesofMoney in your integration with Google Order with Google.

PaymentDataRequest for TimesofMoney

If you use TimesofMoney as your payment processor, send back the following PaymentDataRequest as a string in the facilitationSpecification field of GoogleProvidedPaymentOptions in the CheckoutResponseMessage.

Example

The following example shows the parameters for TimesofMoney in a PaymentDataRequest:

{
  "apiVersion": 2,
  "apiVersionMinor": 0,
  "allowedPaymentMethods": [
    {
      "type": "CARD",
      "parameters": {
        "allowedAuthMethods": [
          "PAN_ONLY"
        ],
        "allowedCardNetworks": [
          "VISA",
          "AMEX",
          "MASTERCARD"
        ],
        "billingAddressRequired": true,
        "cvcRequired": true
      },
      "tokenizationSpecification": {
        "type": "PAYMENT_GATEWAY",
        "parameters": {
          "gateway": "timesofmoney",
          "gatewayMerchantId":"<TimesofMoney will provide you this value>"
        }
      }
    }
  ],
  "transactionInfo": {
    "currencyCode": "INR",
    "totalPriceStatus": "ESTIMATED",
    "totalPrice": "185.00"
  }
}

Online payment and order submission

TimesofMoney charges the user's credit card the total order amount before Google sends the SubmitOrderRequestMessage to your fulfillment webhook.

If your Submit Order Action rejects the order by returning REJECTED as the order status in the SubmitOrderResponseMessage, Google triggers a full refund of the total order amount to the credit card. No further action is required from your end after rejecting the order.

Refunds during order cancellation or rejection

If a user calls the restaurant to cancel the order or the restaurant is not able to fulfill the order, update the order status using an order update. When the order status is updated to CANCELLED or REJECTED, Google facilitates a full refund of the total order amount through TimesofMoney.

When using TimesofMoney, you must update the order status in order for refund processing to happen.

Partial refunds during price changes

If the total order price changes during fulfillment and there is a need for a refund, you need to update the price back to Google using an order update, and the price difference will be refunded to the customer.

For example, a user orders pizza for Rs. 250 and paneer for Rs. 35. The total order amount is Rs. 285. During fulfillment, the restaurant ran out of paneer. The price of paneer needs to be removed from the total price. The total price updates to Rs. 250 (Rs. 285 - Rs. 35). Google triggers a partial refund of Rs. 35 with TimesofMoney.

Partial refunds are only applicable when the new total price is less than the original price. If the new price is greater than the original price, Google will reject the order update. Google cannot charge the user retroactively.

Important points:

  1. You as a partner must handle price increases during fulfillment directly with the customer.
  2. If an order update contains both order status update (to CANCELLED or REJECTED) and a total price change, the full refund takes precedence over a partial refund.
  3. You as a partner need to ensure that the order update is successful in order for refunds to happen. If an order update fails due to network timeout or similar errors, retry the call until the update succeeds. You don't need to worry about duplicate updates because Google handles idempotency on its side.

Other payment processors

If you aren't using TimesofMoney, you need to facilitate refunds directly with your payment processors.