Method: echo
Stay organized with collections
Save and categorize content based on your preferences.
Echos back a string sent from the client.
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
},
"requestId": "G1MQ0YERJ0Q7LPM",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "InvisiCashUSA_USD"
},
"clientMessage": "Client echo message"
}
An example success response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis":"1481899950236"
}
},
"clientMessage": "Client echo message",
"serverMessage": "Debug ID 12345"
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v2/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\u003eThis endpoint echoes back a string sent from the client in the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a \u003ccode\u003erequestHeader\u003c/code\u003e and \u003ccode\u003eclientMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response body will contain 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\u003eIn case of errors, the response will be of type \u003ccode\u003eErrorResponse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe endpoint can be accessed via a POST request to \u003ccode\u003ehttps://www.integratorhost.example.com/integrator-base-path/v2/echo\u003c/code\u003e.\u003c/p\u003e\n"]]],["The API endpoint `POST /v2/echo` receives a request with a `requestHeader` and a `clientMessage`. The `clientMessage` is a required string to be echoed back. A successful response (HTTP 200) includes a `responseHeader`, the echoed `clientMessage`, and an optional `serverMessage`. If errors occur, the response body will be an `ErrorResponse`. The request and response bodies have defined JSON structures.\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 a string sent from the client.\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/india-cards-v1/payment-integrator-india-cards-api/ErrorResponse).\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1\n },\n \"requestId\": \"G1MQ0YERJ0Q7LPM\",\n \"requestTimestamp\": {\n \"epochMillis\": \"1481899949606\"\n },\n \"paymentIntegratorAccountId\": \"InvisiCashUSA_USD\"\n },\n \"clientMessage\": \"Client echo message\"\n }\n\nAn example success response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": {\n \"epochMillis\":\"1481899950236\"\n }\n },\n \"clientMessage\": \"Client echo message\",\n \"serverMessage\": \"Debug ID 12345\"\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/v2/echo`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/india-cards-v1/payment-integrator-india-cards-api/RequestHeader) }, \"clientMessage\": string } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/india-cards-v1/payment-integrator-india-cards-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/india-cards-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|-------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[EchoResponse](/pay/india-cards-v1/payment-integrator-india-cards-api/echo#EchoResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/india-cards-v1/payment-integrator-india-cards-api/ErrorResponse)`)` |\n\nEchoResponse\n------------\n\nResponse object for the echo method.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/india-cards-v1/payment-integrator-india-cards-api/ResponseHeader) }, \"clientMessage\": string, \"serverMessage\": string } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/india-cards-v1/payment-integrator-india-cards-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. |"]]