# Create Token

| Endpoint URL | Route                           |
| ------------ | ------------------------------- |
| Base URL     | api/v1/tokenization/createToken |

Example:&#x20;

[https://uat-secure.galaxypay.vn/api/v1/tokenization/createToken](https://uat-secure.galaxypay.vn/api/v1/token/remove)

### Request Message

#### Header

<table><thead><tr><th width="92">Level</th><th width="217">Field Name</th><th width="191">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>apiKey</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request authenticate</td></tr><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Request signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="87">Level</th><th width="194">Field Name</th><th width="168">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID<br></td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><p>Unique ID for each transaction request</p><p></p><p><strong>Recommend</strong>: <strong>GUID</strong></p></td></tr><tr><td>1</td><td>requestDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>requestData</td><td>JSON Object</td><td></td></tr><tr><td>2</td><td>paymentMethod</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>DOMESTIC</strong> or <strong>INTERNATIONAL</strong></td></tr><tr><td>2</td><td>cardNumber</td><td>Numeric(19)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Number</td></tr><tr><td>2</td><td>cardHolderName</td><td>Alphanumeric(19)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Holder Name</td></tr><tr><td>2</td><td>cardExpireDate</td><td>Alphanumeric(5)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Expired Date</td></tr><tr><td>2</td><td>cardVerificationValue</td><td>Numeric(3)<br><em><mark style="color:blue;">condition</mark></em></td><td><p>Card CVV</p><p></p><p>Only required when paymentMethod=<strong>INTERNATIONAL</strong></p></td></tr></tbody></table>

```
{
  "requestID": "50a7f74d17424e43acf29cd002dfc6ee",
  "requestDateTime": "20230727104246",
  "requestData": {
    "paymentMethod": "INTERNATIONAL",
    "cardNumber": "5506922400634930",
    "cardHolderName": "HUYNH HUU LOC",
    "cardExpireDate": "01/39",
    "cardVerificationValue": "100"
  }
}
```

### Response Message

#### Header

<table><thead><tr><th width="91">Level</th><th>Field name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>signature</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response signature</td></tr></tbody></table>

#### Body

<table><thead><tr><th width="92">Level</th><th width="206">Field name</th><th width="185">Data type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>requestID</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Original Request ID</td></tr><tr><td>1</td><td>responseDateTime</td><td>Numeric(14)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><strong>yyyyMMddHHmmss</strong></td></tr><tr><td>1</td><td>responseCode</td><td>Numeric(3)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>See <a href="/pages/sBk2eUqKYscTG2fiXwOK">Response Codes</a> for more detail</td></tr><tr><td>1</td><td>responseMessage</td><td>Alphanumeric(250)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response message</td></tr><tr><td>1</td><td>responseData</td><td>JSON Object<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Response data</td></tr><tr><td>2</td><td>accountBrand</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Brand info</td></tr><tr><td>2</td><td>accountSource</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Issuer info</td></tr><tr><td>2</td><td>accountNumber</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Masked Number</td></tr><tr><td>2</td><td>accountName</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Cardholder name</td></tr><tr><td>2</td><td>token</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Card Token</td></tr></tbody></table>

```
{
    "requestID": "50a7f74d17424e43acf29cd002dfc6ee",
    "responseDateTime": "20230727104248",
    "responseCode": "200",
    "responseMessage": "Success",
    "responseData": {
        "token": "000138A96154A74E4FDF865116FF70184AA1",
        "accountBrand": "MASTER",
        "accountSource": "",
        "accountNumber": "550692xxxxxx4930",
        "accountName": "HUYNH HUU LOC"
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.galaxypay.vn/upc/payment-gateway/api-specification/tokenization/merchants/create-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
