Method: echo
Stay organized with collections
Save and categorize content based on your preferences.
Echos back the clientMessage
passed in.
The purpose of this method is to test basic connectivity between the payment integrator and Google.
If the echo is successful, the endpoint will return an HTTP 200 and the response will be of type EchoResponse
.
If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type ErrorResponse
or contain a generic error (e.g. a message similar to "There was an error. Please try again later.").
The generic error is used 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 a generic error. If the request signature could be verified, additional information regarding the error will be returned in an 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://vgw.googleapis.com/gsp/refundable-one-time-payment-code-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
If successful, the response body contains an instance of ComplexEchoResponse.
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\u003eThis endpoint (\u003ccode\u003ePOST /echo\u003c/code\u003e) enables basic connectivity testing between the payment integrator and Google.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful echo, it returns an HTTP 200 response with an \u003ccode\u003eEchoResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eErrors result in HTTP 4xx or 5xx responses, with either an \u003ccode\u003eErrorResponse\u003c/code\u003e or a generic error message for security purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe request body includes a \u003ccode\u003eRequestHeader\u003c/code\u003e and \u003ccode\u003eclientMessage\u003c/code\u003e for echoing.\u003c/p\u003e\n"],["\u003cp\u003eThe response body, if successful, contains a \u003ccode\u003eComplexEchoResponse\u003c/code\u003e including the echoed client message and a server message.\u003c/p\u003e\n"]]],["This method tests connectivity between the payment integrator and Google by echoing back a `clientMessage`. A successful request returns an HTTP 200 with an `EchoResponse` containing the echoed message. The request body, sent via a POST HTTP request, must include a `requestHeader` and the `clientMessage`. Errors result in HTTP 4xx or 5xx responses, either with an `ErrorResponse` or a generic error message, when sensitive data might be exposed. A generic message is returned when signing keys or identifiers don't match.\n"],null,["- [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\nEchos back the `clientMessage` passed in.\n\nThe purpose of this method is to test basic connectivity between the payment integrator and Google.\n\nIf the echo is successful, the endpoint will return an HTTP 200 and the response will be of type [`EchoResponse`](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/echo#EchoResponse).\n\nIf the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type [`ErrorResponse`](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/ErrorResponse) or contain a generic error (e.g. a message similar to \"There was an error. Please try again later.\").\n\nThe generic error is used in situations where an [`ErrorResponse`](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/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 a generic error. If the request signature could be verified, additional information regarding the error will be returned in an [`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\nHTTP request\n\n`POST https://vgw.googleapis.com/gsp/refundable-one-time-payment-code-v1/echo/`[:PIAID](/pay/refundable-one-time-payment-code-v1/reference/glossary#payment_integrator_account_id)\n\nRequest 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\nResponse body\n\nIf successful, the response body contains an instance of [ComplexEchoResponse](/pay/refundable-one-time-payment-code-v1/payment-integrator-refundable-one-time-payment-code-api/echo#body.ComplexEchoResponse)."]]