Method: echo
Stay organized with collections
Save and categorize content based on your preferences.
Echos back a string sent from the client.
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
},
"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://vgw.googleapis.com/gsp/virtual-cards-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 echoes back a string sent from the client in the request body.\u003c/p\u003e\n"],["\u003cp\u003eUpon success, it returns an HTTP 200 response with an \u003ccode\u003eEchoResponse\u003c/code\u003e containing the original message and a server message.\u003c/p\u003e\n"],["\u003cp\u003eError scenarios result in HTTP 4xx or 5xx responses, potentially with an \u003ccode\u003eErrorResponse\u003c/code\u003e or a generic error message for security reasons.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a \u003ccode\u003erequestHeader\u003c/code\u003e and a \u003ccode\u003eclientMessage\u003c/code\u003e to be echoed.\u003c/p\u003e\n"],["\u003cp\u003eThe response body, in case of success, includes a \u003ccode\u003eresponseHeader\u003c/code\u003e, the echoed \u003ccode\u003eclientMessage\u003c/code\u003e, and a \u003ccode\u003eserverMessage\u003c/code\u003e.\u003c/p\u003e\n"]]],["The endpoint echoes a client-sent string, returning HTTP 200 upon success with an `EchoResponse`. Requests are sent via POST to `https://vgw.googleapis.com/gsp/virtual-cards-v1/echo/` with a JSON body including a `requestHeader` and a `clientMessage` to echo. Errors result in HTTP 4xx or 5xx, with either an `ErrorResponse` or a generic error message to avoid exposing sensitive information. A successful response contains a `responseHeader`, echoed `clientMessage`, and `serverMessage`.\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\nEchos back a string sent from the client.\n\nIf the echo is successful, the endpoint will return an HTTP 200 and the response will be of type [`EchoResponse`](/pay/virtual-cards-v1/payment-integrator-virtual-cards-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/virtual-cards-v1/payment-integrator-virtual-cards-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/virtual-cards-v1/payment-integrator-virtual-cards-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/virtual-cards-v1/payment-integrator-virtual-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://vgw.googleapis.com/gsp/virtual-cards-v1/echo/`[:PIAID](/pay/virtual-cards-v1/reference/glossary#payment_integrator_account_id)\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader) }, \"clientMessage\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `clientMessage` | `string` **REQUIRED**: Message to echo in the response. |\n\n### Response body\n\nIf successful, the response body contains an instance of [ComplexEchoResponse](/pay/virtual-cards-v1/payment-integrator-virtual-cards-api/echo#body.ComplexEchoResponse)."]]