> For the complete documentation index, see [llms.txt](https://docs.securepay.my/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.securepay.my/api/validate.md).

# Validate

## Endpoint URL&#x20;

| Environment | URL                                                      | Method |
| ----------- | -------------------------------------------------------- | ------ |
| Sandbox     | <https://sandbox.securepay.my/api/v1/merchants/validate> | Post   |
| Production  | <https://securepay.my/api/v1/merchants/validate>         | Post   |

## Credentials

There are 3 types of credential values&#x20;

| Type           | Format                                                           |
| -------------- | ---------------------------------------------------------------- |
| API UID        | 2aaa1633-e63f-4371-9b85-91d936aa56a1                             |
| Auth Token     | ZyUfF8EmyabcMWPcaocX                                             |
| Checksum Token | 159026b3b7348e2390e5a2e7a1c8466073db239c1e6800b8c27e36946b1f8713 |

## API Credentials&#x20;

![API credentials from SecurePay dashboard](/files/-MKSwjrme80ReF3XzCbw)

## Example command

```
curl -d checksum_token={checksum_token} -u {api_uid}:{auth_token} https://sandbox.securepay.my/api/v1/merchants/validate 
```

```
curl -d checksum_token=159026b3b7338e2390e5a2e7a1c8466073db259c1e6800b8c27e36946b1f8713 -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocB https://sandbox.securepay.my/api/v1/merchants/validate 
```

## Result

Invalid token will return 401 Unauthorized

```
{"error":"Unauthorized. Invalid or expired token."}
```

Verified token will return 200&#x20;

```
{"credential":true,"api_name":"Sandbox Test1","merchant_name":"DNSVAULT SDN BHD"}
```
