Method: echo
Stay organized with collections
Save and categorize content based on your preferences.
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 |
clientMessage |
string
REQUIRED: Message received in the request.
|
serverMessage |
string
OPTIONAL: Server message, independent of the clientMessage being echoed.
|
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eecho\u003c/code\u003e method enables testing connectivity between the payment integrator and Google by echoing back a \u003ccode\u003eclientMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGoogle calls this method for security constraint tests, including cipher suite negotiation and JSON parsing.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003erequestHeader\u003c/code\u003e and a \u003ccode\u003eclientMessage\u003c/code\u003e for echoing.\u003c/p\u003e\n"],["\u003cp\u003eThe response body includes a \u003ccode\u003eresponseHeader\u003c/code\u003e, the echoed \u003ccode\u003eclientMessage\u003c/code\u003e, and an optional \u003ccode\u003eserverMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eError responses utilize the \u003ccode\u003eErrorResponse\u003c/code\u003e object with corresponding HTTP status codes.\u003c/p\u003e\n"]]],["This method tests connectivity between a payment integrator and Google by echoing a `clientMessage`. Google sends requests via `POST` to a specified URL, with a JSON request body containing `requestHeader` and `clientMessage`. The response is an `EchoResponse` object, including `responseHeader`, echoed `clientMessage`, and an optional `serverMessage`. Error responses follow the `ErrorResponse` format. Google may call this method frequently to test security constraints like TLS version and JSON parsing. The request is done via HTTP POST.\n"],null,["# Method: echo\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [EchoResponse](#EchoResponse)\n - [JSON representation](#EchoResponse.SCHEMA_REPRESENTATION)\n\nEchos back the `clientMessage` that is passed in.\n\nThe purpose of this method is to test basic connectivity between the payment integrator and Google.\n\nThis 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.\n\nExamples of security constraint tests are (but not limited to):\n\n- Test to ensure payment integrator's endpoint doesn't negotiate to weak cipher suites.\n- Test to ensure payment integrator's endpoint doesn't negotiate to anything but TLS 1.2\n- Test to ensure payment integrator's endpoint doesn't support HTTP.\n- Test to ensure payment integrator's endpoint mandates at least one known PGP signing key.\n- Test to ensure payment integrator's endpoint supports multiple PGP key signatures, both known and unknown, both expired and active.\n- Test to ensure payment integrator only support strict JSON parsing.\n\n\u003cbr /\u003e\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse).\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1,\n \"minor\": 0,\n \"revision\": 0\n },\n \"requestId\": \"ZWNobyB0cmFuc2FjdGlvbg\",\n \"requestTimestamp\": \"1481899949606\"\n },\n \"clientMessage\": \"client message\"\n }\n\nAn example response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": \"1481900013178\"\n },\n \"clientMessage\": \"client message\",\n \"serverMessage\": \"server message\"\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/refundable-one-time-payment-code-v1/echo`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/RequestHeader) }, \"clientMessage\": string } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `clientMessage` | `string` **REQUIRED**: Message to echo in the response. |\n\n### Response body\n\nThis 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](/pay/refundable-one-time-payment-code-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[EchoResponse](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/echo#EchoResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse)`)` |\n\nEchoResponse\n------------\n\nResponse object for the echo method.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader) }, \"clientMessage\": string, \"serverMessage\": string } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `clientMessage` | `string` **REQUIRED**: Message received in the request. |\n| `serverMessage` | `string` **OPTIONAL** : Server message, independent of the `clientMessage` being echoed. |"]]