Method: integrator-base-path.refundable-one-time-payment-code-v1.echo

Echos back the clientMessage that is passed in.

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

This method may be called by Google multiple times per minute with valid or invalid parameters in order to test that security constraints are being held properly. Google also calls this method ad-hoc at the integrator's direction as well as at Google's direction. Google will never call this faster than once every 10s, and never more than 30 times in a 15 minute window.

Examples of security constraint tests are (but not limited to):

  • Test to ensure payment integrator's endpoint doesn't negotiate to weak cipher suites.
  • Test to ensure payment integrator's endpoint doesn't negotiate to anything but TLS 1.2
  • Test to ensure payment integrator's endpoint doesn't support HTTP.
  • Test to ensure payment integrator's endpoint mandates at least one known PGP signing key.
  • Test to ensure payment integrator's endpoint supports multiple PGP key signatures, both known and unknown, both expired and active.
  • Test to ensure payment integrator only support strict JSON parsing.

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

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://www.integratorhost.example.com/integrator-base-path/refundable-one-time-payment-code-v1/echo

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