OTC Inquiry
This API retrieves OTC (One Time Code) information (Track2) required for offline face-to-face payments (Kiosk, POS, etc.).
Precautions
- For security reasons, the OTC Inquiry API is only available to authorized partners, and API calls are only processed from pre-registered IP addresses.
- Before integration, please ensure that the Public IP of the partner server is registered through your sales representative.
- The approval request must be sent within 180 seconds after the OTC inquiry. Subsequent approval requests may be declined.
info
- OTC information (Track2) is delivered encrypted using the RSA public key provided in the request (RSA/ECB/PKCS1Padding).
- The partner should decrypt the encrypted OTC information (Track2) using their private key before initiating the approval request to the terminal.
Java Example: RSA Public/Private Key Generation
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(2048);
KeyPair keyPair = keyPairGenerator.genKeyPair();
String privateKey = new String(Base64.encodeBase64(keyPair.getPrivate().getEncoded()));
String publicKey = new String(Base64.encodeBase64(keyPair.getPublic().getEncoded()));
Request
Request URL
POST https://{API Domain}/easycheck/merchant-otcs.do
Content-type: application/json; charset=euc-kr
Parameters
| Field | Type | Length | Required | Description |
|---|---|---|---|---|
| authorizationId | String | 60 Byte | ✅ | Transaction Authorization ID |
| publicKey | String | 512 Byte | ✅ | Partner's RSA Public Key (Base64 encoded) |
Request Example
{
"authorizationId": "{Authorization ID}",
"publicKey": "{Partner RSA Public Key}"
}
Response
Parameters
| Field | Type | Length | Description |
|---|---|---|---|
| resCd | String | 4 Byte | Result Code (Success: "0000") |
| resMsg | String | 1000 Byte | Result Message |
| shopTransactionId | String | 60 Byte | Use the same value sent during transaction authentication registration |
| shopOrderNo | String | 40 Byte | Use the same value sent during transaction authentication registration |
| authorizationId | String | 60 Byte | Use the same value sent in the request |
| encOtc | String | 400 Byte | Encrypted OTC Information (RSA/ECB/PKCS1Padding) |
| shopParameter | String | 4000 Byte | Partner Reserved Field |
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"shopTransactionId": "{API Idempotency Key}",
"shopOrderNo": "{Partner Order No}",
"authorizationId": "{Authorization ID}",
"encOtc": "{Encrypted OTC Information}",
"shopParameter": "{Partner Reserved Field}"
}