- [HTTP request](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#body.request_body)
  - [JSON representation](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#body.response_body)
- [TransactionEventNotificationResponse](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#TransactionEventNotificationResponse)
  - [JSON representation](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#TransactionEventNotificationResponse.SCHEMA_REPRESENTATION)
- [TransactionEventNotificationResult](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#TransactionEventNotificationResult)
  - [JSON representation](https://developers.google.com/pay/virtual-cards-v1/google-virtual-cards-api/transactionEventNotification#TransactionEventNotificationResult.SCHEMA_REPRESENTATION)

Notify Google of transaction event that has occurred for an enrollment in Virtual Cards.

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1
        },
        "requestId": "BKD0GF23KSD8S23",
        "requestTimestamp": {
          "epochMillis": "1481899949606"
        },
        "paymentIntegratorAccountId": "abcdef123456"
      },
      "enrollmentRequestId": "G1MQ0YERJ0Q7LPM",
      "transactionUpdateAvailable": {},
      "timestamp": {
          "epochMillis": "1481899900000"
      }
    }

An example response looks like:


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

### HTTP request

`POST https://vgw.googleapis.com/gsp/virtual-cards-v1/transactionEventNotification/https://developers.google.com/pay/virtual-cards-v1/reference/glossary#payment_integrator_account_id`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader) }, "enrollmentRequestId": string, "timestamp": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Timestamp) }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "transactionUpdateAvailable": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty) }, "transactionDataDisabled": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty) }, "transactionDataEnabled": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `requestHeader` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader)` **REQUIRED**: Common header for all requests. |
| `enrollmentRequestId` | `string` **REQUIRED** : A reference to an earlier enrollment request. Specifically, the identifier set in the `requestId` of the `requestHeader` sent in the `enrollRequest` that registered a card for Virtual Cards. This is a string that has a maximum length of 100 characters. |
| `timestamp` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Timestamp)` **REQUIRED**: The timestamp of the event. This is the timestamp of when this event has occurred, not when it was sent. |
| **REQUIRED**: The transaction event type. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `transactionUpdateAvailable` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty)` New transactions or transaction updates are available. |
| `transactionDataDisabled` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty)` Transaction data sharing has been disabled by the user. |
| `transactionDataEnabled` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty)` Transaction data sharing has been enabled by the user. |
| End of mutually exclusive fields. ||

### 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/virtual-cards-v1/guides/connectivity/protocol-standards#http_status_codes).

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

## TransactionEventNotificationResponse

Response for the `transactionEventNotification` method.

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

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

## TransactionEventNotificationResult

Result codes for the `transactionEventNotification` method.

| 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/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty) }, "unknownEnrollment": { object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| **REQUIRED**: Contains the possible result types. Exactly one must be set. 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/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty)` Transaction Event notification was successfully processed. |
| `unknownEnrollment` | `object (https://developers.google.com/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/Empty)` Declined because the given `enrollmentRequestId` is not recognized. |
| End of mutually exclusive fields. ||