# SMS 2 WAY Interactive

### Sequence Diagram

![Sequence Diagram SMS 2 WAY](https://1969967505-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Zi-GfP5csjMyyZS2D%2F-M2CC9W3mIm3frrviuYv%2F-M2D3pIGVSLBB008YeJ_%2Fcall.png?alt=media\&token=95604121-672a-4109-a0b9-bfc2948b22ef)

{% tabs %}
{% tab title="Request" %}

#### Request body requires parameters as these following

| **Parameters** | type   | description                                   |
| -------------- | ------ | --------------------------------------------- |
| TRAN\_ID       | String | The ID which uniquely identifies the request  |
| MOBILE\_NO     | String | The destination phone number for your message |
| KEYWORD        | String | Keyword of this campaign                      |
| MESSAGE        | String | Message text                                  |

**The request will look like:**

```
{
"TRAN_ID":"db41f538-66bc-4d13-8d99-a6c2b5414ff8",
"MOBILE_NO":"66987654321",
"MESSAGE":"4567930000000048",
"KEYWORD":"ANTS"
}
```

{% endtab %}

{% tab title="Response" %}
**SMS 2 Way Response**

| Parameters   | type   | description                                       |
| ------------ | ------ | ------------------------------------------------- |
| TRAIN\_ID    | String | The ID that uniquely identifies the sent message. |
| RESULT\_CODE | String | Code ID of return result                          |
| RESULT\_NAME | String | Name of return result                             |
| MESSAGE      | String | Text of the message return                        |

**The response will look like:**

```
{
    "TRAIN_ID": "db41f538-66bc-4d13-8d99-a6c2b5414ff8",
    "RESULT_CODE": "301",
    "RESULT_NAME": " INVALID_MEMBER ",
    "MESSAGE": "Sorry, Membership  is not eligible for this event."
}
```

{% endtab %}
{% endtabs %}

### Callback

{% tabs %}
{% tab title="Request" %}

#### Request body requires parameters as these following

| **Parameters**  | types  | description                                  |
| --------------- | ------ | -------------------------------------------- |
| ERROR\_MESSAGE  | String | Reason of each transaction ID                |
| TRANSACTION\_ID | String | The ID which uniquely identifies the request |

**The  JSON callback will look like:**

```
"ERROR_MESSAGE":"CHARGING_FAILED",
"TRANSACTION_ID":" db41f538-66bc-4d18-8d99-a6c2b5484ff8"
```

{% endtab %}
{% endtabs %}

### RESULT THIRD PARTY

| **Code**   | **Name of the code** | Description                                      |
| ---------- | -------------------- | ------------------------------------------------ |
| 00         | Success              | Success                                          |
| 301 to 399 | Configurable         | Response based on configuration that you defined |

#### The sample of naming different codes will look like:

| Code | Name of the code | Description                                                                        |
| ---- | ---------------- | ---------------------------------------------------------------------------------- |
| 00   | Success          | Your registration is successful; please show this message at the counter.          |
| 301  | INVALID\_MEMBER  | Sorry, this membership account is not eligible for this event.                     |
| 302  | INVALID\_PRICE   | Sorry, you have entered the wrong amount, please kindly check and re-submit again. |

<br>
