Method: gsp.chargeback-alert-v1.echo

Echos back the clientMessage passed in.

The purpose of this method is to test basic connectivity between the payment integrator and Google.

If the endpoint encounters an error while processing the request, the response from this endpoint will be of type ErrorResponse.

Responses to this query may be empty if this method does not return an HTTP 200. The response body is empty in situations where an ErrorResponse with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return an HTTP 404 with an empty body. If the request signature could be verified, additional information regarding the error will be returned in the response body.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "ZWNobyB0cmFuc2FjdGlvbg",
    "requestTimestamp": "1481899949606"
  },
  "clientMessage": "client message"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1481900013178"
  },
  "clientMessage": "client message",
  "serverMessage": "server message"
}

HTTP request

POST https://vgw.googleapis.com/gsp/chargeback-alert-v1/echo/:PIAID

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "clientMessage": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

clientMessage

string

REQUIRED: Message to echo in the response.

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

HTTP 4XX / 5XX Status

object (ErrorResponse)

EchoResponse

Response object for the echo method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "clientMessage": string,
  "serverMessage": string
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

clientMessage

string

REQUIRED: Message received in the request.

serverMessage

string

OPTIONAL: Server message, independent of the clientMessage being echoed.

ErrorResponse

Error Response object for all methods.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "errorResponseCode": enum (ErrorResponseCode),
  "errorDescription": string,
  "paymentIntegratorErrorIdentifier": string
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

errorResponseCode

enum (ErrorResponseCode)

OPTIONAL: A code that captures the type of error that occurred.

errorDescription

string

OPTIONAL: Provide a description of this status for support reps to debug errors. Note that this is never shown to users. It can contain descriptive, non-sensitive text used for debugging. Note that some values for errorResponseCode should be accompanied by additional detail in this field. For example, INVALID_IDENTIFIER should be accompanied by information in this field as to which type of identifier was invalid. Warning: Do not include any tokens in this message unless they are defined as public.

paymentIntegratorErrorIdentifier

string

OPTIONAL: This identifier is specific to the integrator and is generated by the integrator. It is used for debugging purposes only in order to identify this call. This is the identifier that the integrator knows this call by.

ErrorResponseCode

Error Codes

Enums
UNKNOWN_ERROR_RESPONSE_CODE Do not ever set this default value!
INVALID_API_VERSION Used if the request's API version is unsupported. Advised HTTP Code: 400
INVALID_PAYLOAD_SIGNATURE Used if the signature of the payload is to an unknown or inactive key. Advised HTTP Code: 401
INVALID_PAYLOAD_ENCRYPTION Used if the encryption of the payload is to an unknown or inactive key. Advised HTTP Code: 400
REQUEST_TIMESTAMP_OUT_OF_RANGE Used if the requestTimestamp is not ± 60s of now. Advised HTTP Code: 400
INVALID_IDENTIFIER Used if an identifier sent in the request was invalid or unknown. This may include PIAID, captureRequestId, Google Payment Token, etc. The type of the invalid identifier should be specified in the errorDescription. Advised HTTP Code: 404
IDEMPOTENCY_VIOLATION Used if the request violates the idempotency requirements for the request. Advised HTTP Code: 412
INVALID_FIELD_VALUE Used if the request contains a value for a field that isn't in the set of supported values. Advised HTTP Code: 400
MISSING_REQUIRED_FIELD Used if a field that is required is unset in the request. Advised HTTP Code: 400
PRECONDITION_VIOLATION Used if a constraint on the operation is violated (e.g. when a request for a refund amount exceeds the amount remaining on the transaction). Advised HTTP Code: 400
USER_ACTION_IN_PROGRESS Used if the request cannot be processed at this time because it would interrupt an in-process user action which effectively acts as a system lock. This code must not be used to indicate failures due to implementation-specific internal concurrency errors. Advised HTTP Code: 423
INVALID_DECRYPTED_REQUEST Used if the request payload could be decrypted, but the resulting message could not be parsed. Advised HTTP Code: 400