Attestation & Monitoring Service
Getting Started
Quickstart Guide

AMS Quickstart

Get SDK info

This API is used to retrieve the SDK information, including the RSA public of the request SDK instance.

This public key is for your host to wrap keys before passing to the SDK for key loading.

To retrieve the information from the AMS:

Request

Get SDK Info
GET https://sp.mspayhub.com/cpoc/sp/{environment}/info/{customerId}/{sdkId}
X-Api-Key: {your-api-key}

Response

SDK Info Response
{
  "msg": "success",
  "code": 0,
  "body": {
    "publickey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----",
    "devicestatus": "HEALTH",
    "id": "sdkId",
    "state": "VALID",
    "version": "1.10.105.12.20",
    "terminal_id": "",
    "timestamp": "1721213512423"
  }
}

Get SDK Attestation Status

This API is used to retrieve the status information of a SDK instance including the latest attestation result and timestamp.

The intended usage for this API is when payment host needs to check the security status of SDK before performing sensitive services (e.g. authorize a transaction request).

Request

Get Attestation Status
GET https://sp.mspayhub.com/cpoc/sp/{environment}/security/{customerId}/{sdkId}
X-Api-Key: {your-api-key}

Response

SDK Info Response
{
  "msg": "success",
  "code": 0,
  "body": {
    "lastAttestationTs": "1721212883000",
    "lastAttestationResult": "HEALTH",
    "attestationinfo": "success",
    "block": 0,
    "id": "sdkId",
    "ts": "1721212943920"
  }
}