Method: upcomingTransactionNotification

Requests the integrator notify the user of an upcoming transaction for a recurring mandate.

If the integrator returns success, then Google expects the user to be notified that an upcoming mandate transaction is impending. The notification may be delivered with some delay from the payment integrator, but this means that Google has notified the payment integrator. This notification must not have any monetary impact on the customer's account.

There is no guarantee that a charge will be executed after a prenotification and one mandate may have multiple notifications.

The requestId within the header is the idempotency key, which uniquely identifies this prenotification request.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 2
    },
    "requestId": "G112YZH4XPDV88J",
    "requestTimestamp": {
      "epochMillis": "1502220196077"
    },
    "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
  },
  "mandateId": "MA061B00045154",
  "upcomingTransactionNotBeforeTimestamp": {
    "epochMillis": "1521855969203"
  },
  "transactionAmount": {
    "amountMicros": "728000000",
    "currencyCode": "INR"
  },
  "transactionDescription": "Google TV subscription"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1481900013178"
    }
  },
  "result": {
    "success": {
    }
  }
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/e-wallets-v2/upcomingTransactionNotification

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "mandateId": string,
  "upcomingTransactionNotBeforeTimestamp": {
    object (Timestamp)
  },
  "transactionAmount": {
    object (Amount)
  },
  "transactionDescription": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

mandateId

string

REQUIRED: The Google generated ID that uniquely identifies the mandate for this recurring payment. This is the requestId generated by Google during the createMandate method.

upcomingTransactionNotBeforeTimestamp

object (Timestamp)

REQUIRED: Timestamp of when the upcoming transaction will be excecuted. The timestamp represents the exact time before which a transaction should not occur, but delay in the transaction beyond the timestamp should be expected.

transactionAmount

object (Amount)

REQUIRED: The amount of the upcoming transaction.

transactionDescription

string

REQUIRED: A brief description of the upcoming transaction. This format can be changed without notice and must never be parsed.

Response body

This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.

Possible response messages
HTTP 200 Status

object (UpcomingTransactionNotificationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

UpcomingTransactionNotificationResponse

Response object for the upcomingTransactionNotification method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (UpcomingTransactionNotificationResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (UpcomingTransactionNotificationResult)

REQUIRED: Result of this e-wallets-v2.upcomingTransactionNotification call.

UpcomingTransactionNotificationResult

The result of the UpcomingTransactionNotificationResponse.

JSON representation
{

  // Union field upcoming_transaction_notification_result_code can be only one of
  // the following:
  "success": {
    object (Empty)
  },
  "mandateNotActive": {
    object (MandateNotActive)
  },
  "mandatePaused": {
    object (MandatePaused)
  },
  "chargeExceedsTransactionLimit": {
    object (ChargeExceedsTransactionLimit)
  },
  "accountOnHold": {
    object (AccountOnHold)
  }
  // End of list of possible types for union field
  // upcoming_transaction_notification_result_code.
}
Fields
Union field upcoming_transaction_notification_result_code. REQUIRED: Result codes for upcomingTransactionNotification. Exactly one of these messages must be set. upcoming_transaction_notification_result_code can be only one of the following:
success

object (Empty)

The user was or will be notified and the scheduled transaction can occur.

mandateNotActive

object (MandateNotActive)

The specified mandate is not currently active and cannot be used for payments.

mandatePaused

object (MandatePaused)

The specified mandate is currently paused and cannot be used for payments.

chargeExceedsTransactionLimit

object (ChargeExceedsTransactionLimit)

Amount for the upcoming transaction exceeds the integrator's maximum per-transaction limit. If this code is used, populate the transactionMaxLimit field with the transaction limit for user messaging purposes.

accountOnHold

object (AccountOnHold)

User's account is on hold.

MandateNotActive

This mandate is not currently active and cannot be used for payments.

JSON representation
{
  "rawResult": {
    object (RawResult)
  }
}
Fields
rawResult

object (RawResult)

OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the scope would be "visa" and the rawCode would be whatever the VISA network returned.

RawResult

Raw result object.

JSON representation
{
  "scope": string,
  "rawCode": string
}
Fields
scope

string

OPTIONAL: Scope of the rawCode, can be empty.

rawCode

string

REQUIRED: Raw code from the integrator or subsystems within it.

MandatePaused

This mandate is paused in the network.

JSON representation
{
  "rawResult": {
    object (RawResult)
  }
}
Fields
rawResult

object (RawResult)

OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the scope would be "visa" and the rawCode would be whatever the VISA network returned.

ChargeExceedsTransactionLimit

This payment request's amount exceeds per-transaction limit. If this code is used populate the transactionLimit field for user messaging purposes.

JSON representation
{
  "rawResult": {
    object (RawResult)
  },

  // Union field limit can be only one of the following:
  "transactionLimit": {
    object (Amount)
  }
  // End of list of possible types for union field limit.
}
Fields
rawResult

object (RawResult)

OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the scope would be "visa" and the rawCode would be whatever the VISA network returned.

Union field limit. REQUIRED: The per-transaction limit which was exceeded by this transaction. limit can be only one of the following:
transactionLimit

object (Amount)

REQUIRED: This is the maximum amount the user could spend on a transaction.

The currencyCode of transactionLimit must match the currencyCode of the request.

AccountOnHold

The account is on hold.

JSON representation
{
  "rawResult": {
    object (RawResult)
  }
}
Fields
rawResult

object (RawResult)

OPTIONAL: Raw result of this event. Used to help inform Google's risk engine and analytics. In decline code–mapping situations, data is sometimes lost. The integrator can choose to give Google a raw code. For example, a credit card gateway (the integrator) may use this field to communicate to Google the exact decline code that was received from the VISA network. In that case, the scope would be "visa" and the rawCode would be whatever the VISA network returned.