- [HTTP request](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#body.request_body)
  - [JSON representation](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#body.response_body)
- [SimulateSmsResponse](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResponse)
  - [JSON representation](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResponse.SCHEMA_REPRESENTATION)
- [SimulateSmsResult](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResult)
  - [JSON representation](https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResult.SCHEMA_REPRESENTATION)

Simulates the sending of an SMS message to the payment integrator. The association Payment Integrator Account ID (PIAID) will be used for this method call.

The `requestId` within the header is the idempotency key and uniquely identifies this SMS Diagnostic attempt.

If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type `https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/ErrorResponse`.

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1
        },
        "requestId": "cmVxdWVzdDE",
        "requestTimestamp": {
          "epochMillis": "1481899949606"
        },
        "paymentIntegratorAccountId": "InvisiCashUSA_USD"
      },
      "issuerId": {
        "value": "InvisiCashUSA"
      },
      "senderPhoneNumber": {
        "value": "+15555555555"
      },
      "smsBody": "DCB:bnAxdWTydDX=="
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": {
          "epochMillis": "1481900013178"
        }
      },
      "result": {
        "acknowledged": {}
      }
    }

### HTTP request

`POST https://www.integratorhost.example.com/integrator-base-path/carriers-v1/simulateSms`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/RequestHeader`) }, "issuerId": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/IssuerId`) }, "smsBody": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "senderPhoneNumber": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/PhoneNumber`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/RequestHeader`)`` **REQUIRED**: Common header for all requests. |
| `issuerId` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/IssuerId`)`` **REQUIRED**: The identifier of the issuer who is the receiver of this simulated SMS message. |
| `smsBody` | `string` **REQUIRED**: The body of this simulated SMS message. This will contain the SMS body prefix as defined by the issuer and the identifier of this authentication session, separated by a colon. |
| **REQUIRED**: One subscriber identifier field will be set. This will match the subscriber identifier that is set on the input to the SMS-MO diagnostic test. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `senderPhoneNumber` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/PhoneNumber`)`` The subscriber phone number of the sender of this simulated SMS message. |
| End of mutually exclusive fields. ||

### 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](https://developers.google.com/pay/carriers-v1/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResponse`)`` |
| HTTP 4XX / 5XX Status | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/ErrorResponse`)`` |
| End of mutually exclusive fields. ||

## SimulateSmsResponse

Response object for the simulate SMS method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/ResponseHeader`) }, "result": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResult`) } } ``` |

| Fields ||
|---|---|
| `responseHeader` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/ResponseHeader`)`` **REQUIRED**: Common header for all responses. |
| `result` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/simulateSms#SimulateSmsResult`)`` **REQUIRED**: The result of the SMS diagnostic call. |

## SimulateSmsResult

Result codes for `smsDiagnostic`.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "acknowledged": { object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/Empty`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| **REQUIRED**: The result of the SMS diagnostic call. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `acknowledged` | ``object (`https://developers.google.com/pay/carriers-v1/payment-integrator-carriers-api/Empty`)`` The simulated SMS message has been received. The integrator will do additional steps to parse the authentication token out of the SMS payload, determine if the authentication attempt is successful or declined, and call the `authenticationResultNotification` API. The authentication token should be tied to a user account as this token will be sent in the `authenticationRequestId` field of a future `associateAccount` call. |
| End of mutually exclusive fields. ||