- [HTTP request](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#body.request_body)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#body.response_body)
- [PreNotifyUserResponse](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResponse)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResponse.SCHEMA_REPRESENTATION)
- [PreNotifyUserResult](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResult)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResult.SCHEMA_REPRESENTATION)
- [Success](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#Success)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#Success.SCHEMA_REPRESENTATION)
- [PreNotificationFailed](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotificationFailed)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotificationFailed.SCHEMA_REPRESENTATION)
- [MandateAmountExceeded](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#MandateAmountExceeded)
  - [JSON representation](https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#MandateAmountExceeded.SCHEMA_REPRESENTATION)

Notifies a user of pending transaction for a recurring payment.

This informs the user that a new charge on an existing mandate is pending. This notification must be performed before a new charge and each charge is tied to one notification.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/ErrorResponse`.

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1
        },
        "requestId": "cmVxdWVzdDE",
        "requestTimestamp": {
          "epochMillis": "1481899949606"
        },
        "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
      },
      "notificationNumber": "AdWords1234",
      "notificationDisplayNumber": "Adwords1234",
      "customerReferenceId": "customer57",
      "recurringPaymentReferenceId": "subscription201",
      "mandateId": "MA061B00045154",
      "notificationDate": {
        "year":2021,
        "month":2,
        "day":21
      },
      "dueDate": {
        "year":2021,
        "month":2,
        "day":22
      },
      "debitDate": {
        "year":2021,
        "month":2,
        "day":22
      },
      "amount": {
        "amountMicros": "728000000",
        "currencyCode": "INR"
      },
      "netAmount": {
        "amountMicros": "728000000",
        "currencyCode": "INR"
      },
      "description": "Google TV subscription"
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": {
          "epochMillis": "1481899949611"
        }
      },
      "result": {
        "success": {
          "paymentIntegratorNotificationId": "invoiceid1234"
          }
      }
    }

### HTTP request

`POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-authenticated-card-fop-api/preNotifyUser`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/RequestHeader`) }, "notificationNumber": string, "notificationDisplayNumber": string, "customerReferenceId": string, "recurringPaymentReferenceId": string, "mandateId": string, "notificationDate": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`) }, "dueDate": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`) }, "debitDate": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`) }, "amount": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`) }, "netAmount": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`) }, "description": string } ``` |

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/RequestHeader`)`` **REQUIRED**: Common header for all requests. |
| `notificationNumber` | `string` **REQUIRED**: A number to associate with the notification for this payment. |
| `notificationDisplayNumber` | `string` **REQUIRED**: This number is associated with the notification and can be displayed to the user.\`. |
| `customerReferenceId` | `string` **REQUIRED**: The Google generated customer reference ID that is associated with the mandate for this recurring payment. It is the same ID that is provided when the mandate creation is requested and is unique to that mandate. |
| `recurringPaymentReferenceId` | `string` **REQUIRED**: The Google generated recurring payment ID. It is the same ID that is provided when the mandate creation is requested and is unique to that mandate. |
| `mandateId` | `string` **REQUIRED** : The payment integrator generated ID that represents the mandate for this recurring payment. This is returned in the `capture` call when the recurring payment is first set up. |
| `notificationDate` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`)`` **REQUIRED**: Date of when this notification was generated. |
| `dueDate` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`)`` **REQUIRED**: Date of when the payment is due. |
| `debitDate` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Date`)`` **REQUIRED**: Date of when the payment will be debited. |
| `amount` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`)`` **REQUIRED**: The amount of the pending payment. |
| `netAmount` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`)`` **REQUIRED**: The current net amount of the payment, including any discount or late payment penalties, if applicable. |
| `description` | `string` **REQUIRED**: A brief description of the payment. |

### 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](https://developers.google.com/pay/india-cards-v1/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResponse`)`` |
| HTTP 4XX / 5XX Status | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/ErrorResponse`)`` |
| End of mutually exclusive fields. ||

## PreNotifyUserResponse

Response object for the payment integrator hosted india-cards-v1.preNotifyUser method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/ResponseHeader`) }, "result": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResult`) } } ``` |

| Fields ||
|---|---|
| `responseHeader` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/ResponseHeader`)`` **REQUIRED**: Common header for all responses. |
| `result` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotifyUserResult`)`` **REQUIRED**: Result of this request |

## PreNotifyUserResult

The result of the PreNotifyUserResponse.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "success": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#Success`) }, "preNotificationFailed": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotificationFailed`) }, "mandateNotActive": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`) }, "mandateAmountExceeded": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#MandateAmountExceeded`) }, "mandateInstrumentNotValid": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| **REQUIRED** : Result codes for `preNotifyUser`. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `success` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#Success`)`` The user was or will be notified and the scheduled payment can occur. |
| `preNotificationFailed` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#PreNotificationFailed`)`` The user could not be notified and a payment should not occur. |
| `mandateNotActive` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`)`` The specified mandate is not currently active and can not be used for payments. |
| `mandateAmountExceeded` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/preNotifyUser#MandateAmountExceeded`)`` The mandate's amount limit is lower than the proposed charge. |
| `mandateInstrumentNotValid` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`)`` The instrument associated with the mandate on the integrator side is not valid. For example, when a mandate is created on card which is not migrated to a cloud token and deleted from the integrator's end. |
| End of mutually exclusive fields. ||

## Success

An object to represent a successful `preNotifyUserRequest`.

| JSON representation |
|---|
| ``` { "paymentIntegratorNotificationId": string } ``` |

| Fields ||
|---|---|
| `paymentIntegratorNotificationId` | `string` **REQUIRED**: A payment integretor created ID for this notification. It will be supplied with the related payment when that payment is made. |

## PreNotificationFailed

Object used to convey error responses for when the pre notification failed.

| JSON representation |
|---|
| ``` { "errorCode": string, "errorType": string, "errorDescription": string } ``` |

| Fields ||
|---|---|
| `errorCode` | `string` **REQUIRED**: Error code. |
| `errorType` | `string` **REQUIRED**: Error type. |
| `errorDescription` | `string` **REQUIRED**: Error description. |

## MandateAmountExceeded

Object used to convey information about a mandate's charge amount if the `preNotifyUser` was attempting to charge more than the mandate supports.

| JSON representation |
|---|
| ``` { "mandateMaximumAmount": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`) } } ``` |

| Fields ||
|---|---|
| `mandateMaximumAmount` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Amount`)`` **OPTIONAL**: The maximum amount that can be used to charge this mandate. |