Page Summary
-
Notify Google of transaction events for a Virtual Card enrollment, such as new transactions, transaction updates, or changes in data sharing status.
-
Include the
enrollmentRequestIdfrom 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.
- HTTP request
- Request body
- Response body
- TransactionEventNotificationResponse
- TransactionEventNotificationResult
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 |
REQUIRED: Common header for all requests. |
enrollmentRequestId |
REQUIRED: A reference to an earlier enrollment request. Specifically, the identifier set in the This is a string that has a maximum length of 100 characters. |
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 |
New transactions or transaction updates are available. |
transactionDataDisabled |
Transaction data sharing has been disabled by the user. |
transactionDataEnabled |
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 |
|
| HTTP 4XX / 5XX Status |
|
| End of mutually exclusive fields. | |
TransactionEventNotificationResponse
Response for the transactionEventNotification method.
| JSON representation |
|---|
{
"responseHeader": {
object (ResponseHeader)
},
"result": {
object ( |
| Fields | |
|---|---|
responseHeader |
REQUIRED: Common header for all responses. |
result |
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 |
Transaction Event notification was successfully processed. |
unknownEnrollment |
Declined because the given |
| End of mutually exclusive fields. | |