Method: transactionEventNotification

  • Notify Google of transaction events for a Virtual Card enrollment, such as new transactions, transaction updates, or changes in data sharing status.

  • Include the enrollmentRequestId from the initial enrollment request and a timestamp of the event in the request body.

  • The response will indicate success or an unrecognized enrollment request.

  • Google can be notified when transaction data has been enabled or disabled by the cardholder.

  • This API uses HTTP POST requests to https://vgw.googleapis.com/gsp/virtual-cards-v1/transactionEventNotification/ followed by the Payment Integrator Account ID.

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

Request body

The request body contains data with the following structure:

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

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "transactionUpdateAvailable": {
    object (Empty)
  },
  "transactionDataDisabled": {
    object (Empty)
  },
  "transactionDataEnabled": {
    object (Empty)
  }
  // End of mutually exclusive fields.
}
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.

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 (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.

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.

Possible response messages
HTTP 200 Status

object (TransactionEventNotificationResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

End of mutually exclusive fields.

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
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "success": {
    object (Empty)
  },
  "unknownEnrollment": {
    object (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 (Empty)

Transaction Event notification was successfully processed.

unknownEnrollment

object (Empty)

Declined because the given enrollmentRequestId is not recognized.

End of mutually exclusive fields.