Method: transactionEventNotification

Notify Google of transaction event that has occurred for a Virtual Card enrollment.

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/:PIAID

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "enrollmentRequestId": string,
  "timestamp": {
    object (Timestamp)
  },

  // Union field event_type can be only one of the following:
  "transactionUpdateAvailable": {
    object (Empty)
  },
  "transactionDataDisabled": {
    object (Empty)
  },
  "transactionDataEnabled": {
    object (Empty)
  }
  // End of list of possible types for union field event_type.
}
Fields
requestHeader

object (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 (Timestamp)

REQUIRED: The timestamp of the event. This is the timestamp of when this event has occurred, not when it was sent.

Union field event_type.

event_type can be only one of the following:

transactionUpdateAvailable

object (Empty)

New transactions or transaction updates are available.

transactionDataDisabled

object (Empty)

Transaction data sharing has been disabled by the user.

transactionDataEnabled

object (Empty)

Transaction data sharing has been enabled by the user.

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 (TransactionEventNotificationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

TransactionEventNotificationResponse

Response for the transactionEventNotification method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (TransactionEventNotificationResult)

REQUIRED: Result of this call.

TransactionEventNotificationResult

Result codes for the transactionEventNotification method.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "unknownEnrollment": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following:
success

object (Empty)

Transaction Event notification was successfully processed.

unknownEnrollment

object (Empty)

Declined because the given enrollmentRequestId is not recognized.