Skip to main content
Version: CP v. 2

KYC API

All endpoints are on https://auth.corepass.net and require your API key:

Authorization: <YOUR_API_KEY>

Successful responses use a standard envelope:

{ "data": { }, "message": "…", "success": true }

Errors use the same HTTP status code in the body:

{ "success": false, "error": { "code": 422, "message": "there is already an ongoing request" } }

Check which fields are verified​

GET /api/v1/blockchain/verified

Pass the user's CoreID and the fields as query parameters. Repeat items once per field.

Request
curl -G "https://auth.corepass.net/api/v1/blockchain/verified" \
-H "Authorization: <YOUR_API_KEY>" \
--data-urlencode "user=ab22b1671b4f7ccc0b16a87514adde84513b6348232e" \
--data-urlencode "items=IDCARD_DOB" \
--data-urlencode "items=DRIVER_LICENSE_DOCUMENT_NUMBER" \
--data-urlencode "items=EMAIL"
Response
{
"data": {
"verifiedItems": ["EMAIL"],
"unVerifiedItems": ["IDCARD_DOB", "DRIVER_LICENSE_DOCUMENT_NUMBER"]
},
"message": "Items were successfully checked.",
"success": true
}

Either list is omitted when it is empty. If a field you need is in unVerifiedItems, ask the user to complete that verification in the CorePass app first. Otherwise the next call fails with 422 unverified fields.

Generate a KYC QR code​

POST /api/v2/kyc/qrcode

Creates the data-transfer order and returns a QR code and a deep link for the user.

Request
curl -X POST https://auth.corepass.net/api/v2/kyc/qrcode \
-H "Authorization: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"user": "ab72a31c718d343b45e558099ec503087f734433785d",
"sourceKey": "<YOUR_SOURCE_KEY>",
"callback": "https://api.example.com/corepass/callback",
"expiration": 1748000000
}'
FieldRequiredDescription
useryesThe user's CoreID (hex, from the JWT sub claim without the coreid: prefix).
sourceKeyyesThe Source Key of one of your packages, from the dashboard's Packages page. It identifies your client, the package to bill, and the webhook signing key.
callbackyesHTTPS URL that receives all webhooks for this order: status updates and the delivered data. See Webhooks.
expirationyesUnix time in seconds, 5–15 minutes in the future. This is how long the user has to accept. Any other value returns 400.
fieldsnoThe fields to request. Only for packages without a fixed field set; see Choosing fields.
optionalFieldsnoFields the user may choose to share or not. Same rule as fields.
statusCallbacknoAccepted for compatibility. Status updates are delivered to callback.
withoutQRCodenoAccepted for compatibility.
Response
{
"data": {
"qrcode": "<BASE64 PNG>",
"link": "<deep link for a mobile button>",
"expiration": 1748000000,
"referenceKey": "<REFERENCE_KEY>"
},
"message": "QRCode has been successfully generated",
"success": true
}

Show qrcode to desktop users and link to mobile users:

Rendering the request
<!-- Desktop: scan with the CorePass app -->
<img alt="Scan with CorePass" src="data:image/png;base64,{{qrcode}}" />

<!-- Mobile: open the CorePass app directly -->
<a class="button" href="{{link}}">Share with CorePass</a>
Save the referenceKey

You need it to query the order's status. It is derived from the Source Key, the user and the requested fields, so the same request always gets the same referenceKey.

Repeated calls. If you call again with the same user, Source Key and fields while the order is still PENDING, you get a fresh QR code for the same order with "alreadySent": true. While the order is being processed (INITIATING, INITIATED or CONFIRMING), the call fails with 422.

Errors

Statuserror.messageCause
400Invalid Request: …A required field is missing or malformed.
400expiration time is not in valid rangeexpiration is not Unix seconds 5–15 minutes in the future.
400no fields providedNeither the package nor the request names any fields.
400user fields (…) are invalid fieldsA name in fields / optionalFields isn't a KYC field.
400sourcekey does not support dynamic fieldsYou sent fields / optionalFields for a package that has a fixed field set.
404source key not foundUnknown sourceKey.
422unverified fieldsAt least one requested field isn't verified in the user's CorePass app.
422there is already an ongoing requestAn order for the same user, package and fields is being processed.

Poll the latest status​

GET /api/v2/kyc/status?referenceKey=…

Request
curl "https://auth.corepass.net/api/v2/kyc/status?referenceKey=<REFERENCE_KEY>" \
-H "Authorization: <YOUR_API_KEY>"
Response
{
"data": {
"status": "CONFIRMING",
"createdAt": 1677255348,
"initiatedTxHash": "0xd90eb185877e47238380f613e3ac77f4cdb6a293ae21019fea7ac1b9ce12a94e"
},
"message": "status has been sent successfully",
"success": true
}
FieldMeaning
statusOne of the status values.
createdAtWhen the order reached this status (Unix seconds).
initiatedTxHashHash of the on-chain initiate transaction, once it exists.
confirmTxHashHash of the on-chain confirm transaction, once it exists.
failureReasonPresent when status is FAILED. See Failure reasons.

Empty fields are omitted. An unknown referenceKey returns 404 order not found.

Fetch the full status history​

GET /api/v2/kyc/all-statuses?referenceKey=…

Request
curl "https://auth.corepass.net/api/v2/kyc/all-statuses?referenceKey=<REFERENCE_KEY>" \
-H "Authorization: <YOUR_API_KEY>"
Response
{
"data": {
"allStatuses": [
{ "status": "PENDING", "createdAt": 1677255257 },
{ "status": "INITIATING", "createdAt": 1677255317 },
{ "status": "INITIATED", "createdAt": 1677255329, "initiatedTxHash": "0xd90e…" }
]
},
"message": "all statuses has sent successfully",
"success": true
}

Each entry has the same fields as the latest-status response.

Check that stored data is still valid​

POST /api/v1/blockchain/valid

KYC data can expire or be revoked, for example after fraud or when the user updates their documents. Check a stored value before you rely on it.

Request
curl -X POST https://auth.corepass.net/api/v1/blockchain/valid \
-H "Authorization: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"user": "ab701b918efb6289a5077f6510740b4bca7f707dbad7",
"infos": [
{ "field": "ADDRESS_CITY", "data": "Zurich", "pepper": "72b69fbed02d5acbe4aa58d38be4e32283952edc56e9338c4db57bc0ea9b8d4a" },
{ "field": "ADDRESS_COUNTRY", "data": "CHE", "pepper": "47aa3e25b647f47488d429d4cf3cd21d927f89d7e9f25c060c7d915d3c901123" }
]
}'
FieldValue
fieldThe field name.
dataThe field value as text, i.e. the Base64-decoded data from the webhook.
pepperThe pepper as a hex string: Base64-decode pepper from the webhook, then hex-encode the bytes.
Response
{
"data": { "valids": ["ADDRESS_COUNTRY"], "unValids": ["ADDRESS_CITY"] },
"message": "user was successfully checked.",
"success": true
}