Wallet sign-up and verification
On this page
This guide follows a new wallet user from the first launch to an identified account. The calls are in the order the installation's iOS app makes them, and every request and answer is shown as the Wallet API sends it.
The base URL is the installation's wallet address followed by /w1. Only the wallet apps call this API. Merchant integrations use the Argus PF API instead.
The flow at a glance
- Launch.
GET /metasays whether this app release may run and whether sign-ups are open. - Documents.
GET /documentsgives the framework agreement and the privacy notice for the user to read. - Enrol.
POST /signupsends an SMS code.POST /otp/verifychecks it and names the next step. - Proofs. Build the DPoP proof and the PIN proof once. Every later call uses them.
- Bind the device.
GET /pin_keys, thenPOST /devices/bindsets the PIN, binds the device and opens the first session. - Stay signed in. Refresh the tokens, sign in again with
POST /sessions, and readGET /devices/currentat launch. - Identify.
POST /kyc/sessionsand its steps read the ID card chip and check the user's face. This can wait until the user wants to send money. - Move money. Read
GET /limits, then load, pay and send, as the Wallet top-ups, payments and transfers guide shows. - Handle errors. The last section lists the codes any call can return. Each step lists its own.
The user can use the wallet after step 5. Until step 7, they have only a small allowance.
Before the first call
Every request except GET /meta carries two headers that name the app:
| Header | Value |
|---|---|
Argus-App-Platform |
ios or android |
Argus-App-Version |
The app's release, such as 2.4.0 |
A missing header is 400 app_platform_invalid or app_version_invalid. A release older than the installation's minimum is 426 app_update_required, and the app shows its update screen.
The app also creates its device key before it signs the user up. It is a P-256 key that cannot leave the device: the Secure Enclave on iOS, the hardware keystore on Android. The device key signs a DPoP proof for every call that opens or uses a session, and it signs the transactions the user confirms.
Every answer carries a DPoP-Nonce header. Keep the latest one: the next DPoP proof and the next PIN proof both name it. The two proofs shows how to build them.
Every answer also carries an X-Request-Id header (req_…), and an error repeats it as request_id. Log it: support finds a request by it.
Check the release and the switches
curl https://wallet.pf.organizer.tr/w1/meta
GET /meta needs no session and no app headers. Call it at every launch. Read three things from it:
min_app_version.iosandmin_app_version.android: the oldest release the installation supports. An older app shows its update screen before anything else.channels.wallet_signups:closedmeans the installation takes no new users now.POST /signupwould answer 503channel_closed.test_identities: true only on a sandbox, where the app may offer test identities instead of reading a real ID card. It is never true on a live installation.
Show the documents
The user reads two texts before the SMS code is sent: the framework agreement and the privacy notice.
curl https://wallet.pf.organizer.tr/w1/documents \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0"
{
"publication": 3,
"effective_at": 1791849600,
"framework": {
"id": "wdoc_01M4ZCMBM0Q8T2V6X9Z3B5D7F1",
"kind": "framework",
"title": "Çerçeve Sözleşme",
"version": "2026-10-01",
"content": "Bu sözleşme, elektronik para hesabınızın kullanım koşullarını düzenler.",
"sha256": "82d87d7bbca79cb29497dcd2eeadb3b8d43fc49cebb6f6e08d2857346e854140",
"mandatory": true,
"test_only": false
},
"privacy_notice": {
"id": "wdoc_01M4ZCMBM0R9V3W7Y1A4C6E8G2",
"kind": "privacy_notice",
"title": "Kişisel Verilerin Korunması Aydınlatma Metni",
"version": "2026-10-01",
"content": "Kişisel verileriniz, 6698 sayılı Kanun kapsamında bu metinde açıklanan amaçlarla işlenir.",
"sha256": "7e6213261254f7c2665408efa9faa92ecf2ab729aa4e8999a86bca0e20a84eb4",
"mandatory": true,
"test_only": false
},
"test_only": false
}
Show content as it comes. Keep each version and sha256: the sign-up sends them back, so the record names the exact text the user saw. sha256 is the SHA-256 of content.
- 503
documents_unavailable: the installation has published no documents yet, so sign-up cannot start. test_only: truemarks sandbox drafts. A sandbox installation that has published nothing shows its configured drafts withpublication0 and noid,kindormandatory.
Send the SMS code
curl -X POST https://wallet.pf.organizer.tr/w1/signup \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Idempotency-Key: 6f1c2a90-3b7e-4d15-a8c4-92e0b1f7d356" \
-H "Content-Type: application/json" \
-d '{"phone": "+905550801001", "locale": "tr", "consents": {"terms_version": "2026-10-01", "terms_sha256": "82d87d7bbca79cb29497dcd2eeadb3b8d43fc49cebb6f6e08d2857346e854140", "privacy_notice_version": "2026-10-01", "privacy_notice_sha256": "7e6213261254f7c2665408efa9faa92ecf2ab729aa4e8999a86bca0e20a84eb4", "marketing": false}}'
{
"enrolment": "p3GuQwVIwZ2exwjtgD-ZpWP2jKcaytgacHAsifeWSII",
"otp_expires_at": 1792054920
}
phoneis a Turkish mobile number in E.164 form:+90and 10 digits.localeistroren. It sets the language of the SMS and of everything sent to the user later.enrolmentis the handle of this sign-up. The next steps send it back, and it works for 30 minutes. Keep it in memory only.- The code has 6 digits, works for 120 seconds and allows 5 attempts.
The answer is the same whether or not the number already has a user. For a known number, the sign-up becomes a device change of that user. The app learns which case it is only after the code is verified.
To send a new code, call POST /signup again with a new Idempotency-Key and use the new enrolment.
| Code | Status | What the app does |
|---|---|---|
documents_changed |
400 | The documents changed after the app read them. Read GET /documents again and show the new texts. |
rate_limited |
429 | Too many codes for this number: 3 in 15 minutes, 10 in 24 hours. Retry-After gives the seconds to wait. |
sms_unavailable |
503 | The SMS provider did not take the code. Nothing was kept, so send the same request with the same key after Retry-After seconds. |
Check the code
curl -X POST https://wallet.pf.organizer.tr/w1/otp/verify \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Idempotency-Key: 0b8e4f27-91c3-4a6d-b2e5-7d40c9a1f863" \
-H "Content-Type: application/json" \
-d '{"enrolment": "p3GuQwVIwZ2exwjtgD-ZpWP2jKcaytgacHAsifeWSII", "code": "482913"}'
{
"enrolment": "p3GuQwVIwZ2exwjtgD-ZpWP2jKcaytgacHAsifeWSII",
"next_step": "bind_device",
"pin_step": "create"
}
Two fields decide the next screen:
| Field | Value | Next screen |
|---|---|---|
next_step |
bind_device |
The PIN screen, then POST /devices/bind. |
next_step |
identify |
The number's SIM card changed in the last 90 days, or the operator could not say. An SMS cannot prove ownership of the number then, so the user identifies with the ID card first, using the enrolment handle. See Identify during sign-up. |
pin_step |
create |
The number has no user. The user chooses a new PIN. |
pin_step |
enter |
The number has a user, so this is a new phone of that user. The user enters the PIN they already have. Offer "forgot PIN", which leads to identification, never to a new PIN by SMS alone. |
A wrong code looks like this:
{
"error": {
"type": "invalid_request_error",
"code": "otp_invalid",
"param": "code",
"message": "The code is not correct.",
"request_id": "req_01M4ZCMBM0D2118Y6X8N4NEW70"
}
}
| Code | Status | What the app does |
|---|---|---|
otp_invalid |
400 | Let the user type the code again. The server does not say how many tries are left: a code allows 5. |
otp_expired |
400 | The code expired or was used. Ask for a new one with POST /signup. |
otp_locked |
429 | The fifth wrong code locked this one. Ask for a new code after Retry-After seconds. |
enrolment_invalid |
400 | The handle is unknown or older than 30 minutes, here or at a later step. Start again with POST /signup. |
The two proofs
Two proofs guard the calls that matter. Build each as a function once. Every later step uses them. Wallet proof samples has working code in Go, Swift and Kotlin.
- The DPoP proof shows that the request comes from this device. Every call carries one, except
GET /meta,GET /documents,GET /pin_keys,POST /signup,POST /otp/verifyand the identification steps. - The PIN proof carries the PIN, sealed so that only the server can read it. Only the calls that set or check the PIN carry one.
Both name the server nonce: a value the server hands out in the DPoP-Nonce header of every answer. A nonce works for 5 minutes. Use the one from the last answer you received.
The DPoP proof
The DPoP header is a JWT signed with the device key (ES256). Its header carries the public key, and its claims name the request:
{
"header": {"typ": "dpop+jwt", "alg": "ES256", "jwk": {"kty": "EC", "crv": "P-256", "x": "iYpyZ8n0fNyVKXtEuMUm8rsOvkqOW8e0qsPtDunJX1M", "y": "pUwj2b9mfCV7H3hB8VZwbo4zcysELnoHzEpZ1sBrJEc"}},
"claims": {"jti": "5c0e1b7a-4f2d-4c9e-a3b8-0d6f9e2a7c41", "htm": "POST", "htu": "https://wallet.pf.organizer.tr/w1/devices/bind", "iat": 1792054800, "nonce": "<the DPoP-Nonce of the last answer>"}
}
jwkis the public half of the device key, with no private part.jtiis new for each proof. A proof is never sent twice, not even in a retry.htmis the request's method andhtuits full URL without the query.iatis the device's time in Unix seconds. It must be within 60 seconds of the server's clock.nonceis the server nonce.athis added when the request carries an access token. It is the base64url SHA-256 of the token. The calls that open a session (POST /devices/bind,POST /sessions) have no token yet, so they carry noath. A proof withathon a request without a token is refused.
To sign it, write both parts as JSON, encode each as base64url without padding, and join them with a dot:
signing_input = base64url(header_json) + "." + base64url(claims_json)
signature = base64url(ES256(device_key, signing_input))
DPoP header = signing_input + "." + signature
ES256 signs the SHA-256 of signing_input. The signature is 64 bytes: the 32-byte r, then the 32-byte s. This is the raw form, such as CryptoKit's rawRepresentation. Android's Signature returns DER, so convert it to the raw form first.
A proof with a missing or old nonce is refused before anything else is read:
{
"error": {
"type": "authentication_error",
"code": "use_dpop_nonce",
"param": null,
"message": "Retry with the server nonce of the DPoP-Nonce header.",
"request_id": "req_01M4ZCMBM02Y8EVVXJM9YW418V"
}
}
The retry has four steps:
- Read the
DPoP-Nonceheader of the 401 answer. - Make the DPoP proof again with that nonce, a new
jtiand a newiat. - If the body holds a PIN proof, seal it again with the same nonce.
- Send the request again with the same
Idempotency-Key. The 401 answer was not kept, so the key is still free.
Any other proof problem is 401 dpop_invalid. Check htm, htu, iat, ath and the form of the signature.
The PIN proof
The app never sends the PIN in the clear. It seals the PIN to a public key of the installation. Read the keys first:
curl https://wallet.pf.organizer.tr/w1/pin_keys \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0"
{
"data": [
{
"id": "pk_1",
"key": "Xf7dO2vUf2-ijuFdlp1bsOpTd01Ii9r53xxuASSz7yI",
"current": true,
"kem": "DHKEM(X25519, HKDF-SHA256)",
"kdf": "HKDF-SHA256",
"aead": "AES-256-GCM",
"info": "pf-wallet-pin/v1"
}
]
}
Use the key with current: true. key is its public key as base64url. The answer also carries a DPoP-Nonce header.
The plaintext is this JSON. All five fields are strings, and the PIN has 6 digits:
{
"pin": "739150",
"purpose": "enrol",
"device": "Nf3mW8ZJq1xKc5bP0yVt7sRhLd2gAeUiO4nT6wXzQ9E",
"digest": "",
"nonce": "<the DPoP-Nonce of the last answer>"
}
purposesays what the PIN is for. The binding usesenrol, a sign-insessionand a money confirmationconfirm.deviceis the device'swdv_id. Before the binding the device has none, soenroluses the JWK thumbprint (RFC 7638) of the device key, as base64url.digestis empty. Only a confirmation puts the challenge's digest in it.nonceis the nonce of the request's DPoP proof. A nonce works once in a PIN proof, so each new attempt needs a new nonce.
To seal it, use HPKE (RFC 9180) in base mode with the suite the key names, info as the info string and no associated data:
sealed = HPKE_Seal(public_key = base64url_decode(key), info = "pf-wallet-pin/v1", aad = "", plaintext = json)
ciphertext = base64url(encapsulated_key + sealed)
The encapsulated key is 32 bytes for this suite, and base64url has no padding. Send the key's id as key_id and the result as ciphertext, both in the pin_proof object of the request.
| Code | Status | What the app does |
|---|---|---|
pin_key_unknown |
400 | The key is not published any more. Read GET /pin_keys again and seal again. |
parameter_invalid, param is pin_proof |
400 | The proof cannot be opened, was made for another purpose, device or nonce, or its nonce was used already. Seal again with the new nonce and send the request with a new Idempotency-Key. |
A wrong PIN is another answer, pin_invalid. The binding below shows it.
Bind the device and set the PIN
The binding sends the device key, its attestation and the PIN proof. Use the DPoP-Nonce of the GET /pin_keys answer in both proofs. The DPoP proof of this call has no ath.
curl -X POST https://wallet.pf.organizer.tr/w1/devices/bind \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Idempotency-Key: a7d2c519-6e08-4f3b-9c1a-58b4e0d27f96" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..." \
-H "Content-Type: application/json" \
-d @bind.json
{
"enrolment": "p3GuQwVIwZ2exwjtgD-ZpWP2jKcaytgacHAsifeWSII",
"device_name": "Ayşe's iPhone",
"device_key": {
"kty": "EC",
"crv": "P-256",
"x": "iYpyZ8n0fNyVKXtEuMUm8rsOvkqOW8e0qsPtDunJX1M",
"y": "pUwj2b9mfCV7H3hB8VZwbo4zcysELnoHzEpZ1sBrJEc"
},
"attestation": "o2NmbXRvYXBwbGUtYXBwYXR0ZXN0Z2F0dFN0bXSiY3g1Y4JZA",
"pin_proof": {
"key_id": "pk_1",
"ciphertext": "ywuJzcz_0EBO9dqOag2gaQA_YqNmOMbSXLhvjYDibnb9mh0mI_LW0UsDrYHzujSs-99LCyTNjSHCLBtbDPyb6PgB6qrgt_6iqkA1Xz-gS2rhRfvSFLV2TbL3L3gslK0X"
}
}
device_keyis the public half of the device key, the same key that signed the DPoP proof.attestationis the App Attest (iOS) or Play Integrity (Android) result over the server nonce. It is a risk signal and never blocks the binding on its own. The field is required: without it the answer is 400parameter_missing. A sandbox takes any text.txn_keyandpush_tokenare optional. See the reference for both.
{
"access_token": "lxsFzKevwOEfzeNdK6Hbe-ixyOgxgMPFJX5kMMqe3rQ",
"token_type": "DPoP",
"expires_in": 600,
"refresh_token": "H0gnyOQ5RpkYajXm3yPjYuMrLEHaL7i8-ijnWAJIAI0",
"user": "wu_01M4ZCMBM08PQN5V4T7RMHCH15",
"device": "wdv_01M4ZCMBM0VFSCYC6RA84Y57MJ",
"device_state": "bound_full"
}
The binding answers 201. The user is signed up and signed in. Keep both tokens and the device id in the Keychain or the keystore, never in plain app storage.
For a known number (pin_step: enter), the binding checks the PIN the user already has and does not replace it. The new device is bound_restricted for 72 hours: it cannot raise limits and sends only small amounts. The user's other devices are suspended, and each of them gets a push that lets the user report the change with POST /freeze.
| Code | Status | What the app does |
|---|---|---|
pin_too_weak |
400 | The new PIN is too easy to guess, such as 123456. Ask for another one. |
pin_invalid |
401 | The PIN is wrong (pin_step: enter). attempts_remaining says how many tries are left. |
pin_locked |
423 | Five wrong PINs in a row lock PIN use for 30 minutes. locked_until and Retry-After say until when. |
identification_required |
409 | The enrolment must identify first (next_step: identify). |
pin_reset_requires_identification |
409 | The user sent pin_forgotten: true. Identify with the enrolment handle, then bind with new_pin_proof. |
pin_reset_requires_support |
409 | The user forgot the PIN and was never identified, so there is no identity to match. Send the user to support. |
account_frozen |
403 | A frozen user binds no new device. Support lifts the freeze. |
Keep the user signed in
Every signed-in call carries the access token and a DPoP proof that includes ath:
curl https://wallet.pf.organizer.tr/w1/home \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Authorization: DPoP lxsFzKevwOEfzeNdK6Hbe-ixyOgxgMPFJX5kMMqe3rQ" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..."
The access token lives 10 minutes (expires_in is in seconds). When it runs out, a call answers 401 session_expired. Exchange the refresh token for a new pair:
curl -X POST https://wallet.pf.organizer.tr/w1/sessions/refresh \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..." \
-H "Content-Type: application/json" \
-d '{"refresh_token": "H0gnyOQ5RpkYajXm3yPjYuMrLEHaL7i8-ijnWAJIAI0"}'
The answer is a new Session with a new refresh token. A refresh token works once: sending it a second time ends the whole session. When several calls find the session expired at the same time, let one of them refresh and the others wait for it.
A session ends at the latest 90 days after the user last entered the PIN. The app then signs in again with POST /sessions, with a DPoP proof and an Idempotency-Key. The body names the device and a server nonce. The device key signs that nonce with ES256, in the raw form of the DPoP proof's signature, over the nonce's UTF-8 bytes. A PIN proof of purpose session names the same nonce and the device's wdv_ id.
{
"device": "wdv_01M4ZCMBM0VFSCYC6RA84Y57MJ",
"nonce": "<the DPoP-Nonce of the last answer>",
"signature": "<base64url of the device key's signature over the nonce>",
"pin_proof": {"key_id": "pk_1", "ciphertext": "<sealed with purpose session>"}
}
The answer is 201 with a new Session. A user has one session at a time, so while another phone holds it the answer is 409 other_session_active. Ask the user, then send close_other_session: true.
At launch
Before the PIN screen, ask whether this device is still bound. The call needs a DPoP proof of the device key and no access token.
curl https://wallet.pf.organizer.tr/w1/devices/current \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..."
{
"object": "device_status",
"device": "wdv_01M4ZCMBM0VFSCYC6RA84Y57MJ",
"state": "bound_full",
"restricted_until": null,
"dispute_until": null,
"session_active": true,
"other_session_active": false,
"account_status": "active",
"pin_attempts_remaining": 5,
"pin_locked_until": null
}
state |
What the app does |
|---|---|
bound_full |
Refresh the session if session_active is true, otherwise show the PIN screen. |
bound_restricted |
The same, and show that some actions wait until restricted_until. |
suspended |
Another phone took over the account. For 72 hours after the change, until dispute_until, offer "this was not me", which is POST /freeze. |
not_bound |
The device key is unknown. Start again with the phone number. |
GET /freeze and POST /freeze also work with a proof alone, so the lock screen can show the freeze state and offer the emergency freeze without the PIN.
Documents published later
When the institution publishes a new version of a mandatory document, money actions answer 428 documents_required. Read GET /consents, show the documents listed in required, and send the user's choices with POST /consents. Then repeat the request with a new Idempotency-Key, because a 428 answer is never kept under the old one.
Identify the user
Until the user identifies, the account has a small allowance: they can load money by card and pay in shops. Sending money, withdrawals, cards and pots answer 409 identification_required. An action over the allowance answers 402 unverified_limit_exceeded:
{
"error": {
"code": "unverified_limit_exceeded",
"message": "This amount is over the limit of an account that is not identified yet (wallet_load, month); 550000 still fits. Identify to lift it.",
"param": "wallet_load",
"period": "month",
"remaining": 550000,
"request_id": "req_01M4ZCMBM01HAJ2EBDPFETMRY1",
"type": "invalid_request_error"
}
}
param is the limit, period its period and remaining what still fits, in kuruş. A kuruş is a hundredth of a lira, so 550000 is ₺5,500.00. Offer identification next to the message.
Read the limits before identification
curl https://wallet.pf.organizer.tr/w1/limits \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Authorization: DPoP lxsFzKevwOEfzeNdK6Hbe-ixyOgxgMPFJX5kMMqe3rQ" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..."
{
"after_identification": [
{"kind": "wallet_load", "period": "month", "limit": 10000000, "currency": "TRY"},
{"kind": "wallet_p2p_out", "period": "transaction", "limit": 2000000, "currency": "TRY"},
{"kind": "wallet_p2p_out", "period": "month", "limit": 5000000, "currency": "TRY"},
{"kind": "wallet_balance_cap", "period": "standing", "limit": 5000000, "currency": "TRY"}
],
"data": [
{"kind": "wallet_balance_cap", "period": "standing", "limit": 550000, "used": 0, "remaining": 550000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null},
{"kind": "wallet_load", "period": "month", "limit": 550000, "used": 0, "remaining": 550000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null},
{"kind": "wallet_card_load", "period": "day", "limit": 500000, "used": 0, "remaining": 500000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null},
{"kind": "wallet_card_load", "period": "month", "limit": 550000, "used": 0, "remaining": 550000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null},
{"kind": "wallet_spend", "period": "transaction", "limit": 2000000, "used": 0, "remaining": 2000000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null},
{"kind": "wallet_spend", "period": "month", "limit": 5000000, "used": 0, "remaining": 5000000, "currency": "TRY", "card": null, "settable": false, "own_limit": null, "maximum": null, "pending": null}
],
"tier": "unverified"
}
tier is unverified while the allowance is open, and null when the installation has closed it. after_identification lists what identification opens, for the screen that invites the user to identify. The values here are a sandbox's. Each installation sets its own, so show what the call returns and never hard-code them.
Ask for consent and start the session
Identification reads the ID card's face image and records the user's face, which is biometric data. Show the consent text before the camera and NFC steps, and start the session only after the user agrees.
curl -X POST https://wallet.pf.organizer.tr/w1/kyc/sessions \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Authorization: DPoP lxsFzKevwOEfzeNdK6Hbe-ixyOgxgMPFJX5kMMqe3rQ" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..." \
-H "Idempotency-Key: 3e9a7c14-0d5b-4f82-b6e1-c27f80a49d35" \
-H "Content-Type: application/json" \
-d '{"consent": {"biometric": true, "text_version": "1.0"}}'
{
"id": "wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q",
"object": "kyc_session",
"status": "started",
"reason": null,
"review": null,
"can_retry": false,
"steps": ["document_nfc", "profile", "liveness"],
"liveness_prompts": ["turn_left", "smile", "blink"],
"expires_at": 1792056600,
"submitted_at": null,
"decided_at": null,
"profile_required": true,
"sdk_token": "hZK6UL2FXMGxHo-YEjlp8Km5ytA3JpGxKxomauYICQ0"
}
text_versionnames the consent text the app showed. Change it whenever the text changes.sdk_tokenauthorizes the steps of this session. It is shown once and works untilexpires_at, 30 minutes after the start.stepsis the order to follow.profileis listed only for a user who has not answered the customer questions before.- A new session replaces the user's sessions that were not finished. The answer is never kept under the
Idempotency-Key, so a retry starts a new session.
The steps carry the step token in the Argus-KYC-Token header. They take no DPoP proof, no access token and no Idempotency-Key.
Read the chip
The app reads the chip over NFC with the keys from the card's MRZ, then sends data groups 1 and 2 and the security object as read. Each value is the standard base64 of the raw bytes, at most 64 KiB.
curl -X POST https://wallet.pf.organizer.tr/w1/kyc/sessions/wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q/document \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Argus-KYC-Token: hZK6UL2FXMGxHo-YEjlp8Km5ytA3JpGxKxomauYICQ0" \
-H "Content-Type: application/json" \
-d @chip.json
{
"dg1": "YV1fH1pJPFRVUlM5OUEwMDAwMTMxMDAwMDAwMDE0Njw8PDw5MDA1MTQ1RjMxMDUxNDZUVVI8PDw8PDw8PDw8PDhZSUxNQVo8PEFZU0U8PDw8PDw8PDw8PDw8PDw8PDw=",
"dg2": "UEYtU0FOREJPWC1ERzItRkFDRTpTOTlBMDAwMDE=",
"sod": "eyJ2IjoxLCJzaWduZXIiOiJQRiBTYW5kYm94IENTQ0EiLCJhbGciOiJzaGEyNTYifQ=="
}
The answer is the session with status: document_accepted. A read that fails can be repeated in the same session.
Answer the customer questions
When steps lists profile, ask the questions next and send the answers before the liveness step. The app shows its own words for each code. occupation, purposes and monthly_volume take the values the reference lists for POST /kyc/sessions/{id}/profile.
curl -X POST https://wallet.pf.organizer.tr/w1/kyc/sessions/wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q/profile \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Argus-KYC-Token: hZK6UL2FXMGxHo-YEjlp8Km5ytA3JpGxKxomauYICQ0" \
-H "Content-Type: application/json" \
-d @profile.json
{
"occupation": "employee_private",
"purposes": ["daily_spending", "online_shopping"],
"monthly_volume": "5k_20k",
"address": {"address_number": "1234567890"}
}
The session stays document_accepted, and profile_required turns false. The address is either the 10-digit address number of the residence certificate or the province, district and street line.
Record the liveness check
Show the prompts of liveness_prompts one by one and take one camera frame for each, in that order. Then take a selfie, and compare it on the device with the chip's face image.
curl -X POST https://wallet.pf.organizer.tr/w1/kyc/sessions/wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q/liveness \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Argus-KYC-Token: hZK6UL2FXMGxHo-YEjlp8Km5ytA3JpGxKxomauYICQ0" \
-H "Content-Type: application/json" \
-d @liveness.json
{
"frames": [
{"prompt": "turn_left", "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsL", "captured_at": 1792054797000},
{"prompt": "smile", "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0N", "captured_at": 1792054798000},
{"prompt": "blink", "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQ", "captured_at": 1792054799000}
],
"selfie": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA4KCwwLCQ4MCwwQDw4RFSIWFRQU",
"face_match": {"score": 91, "method": "vision-featureprint-v1"}
}
- Each image is a base64 JPEG of at least 120 × 120 pixels and at most 128 KiB. The images in the sample are cut short, so send real photos.
- The prompts in the sample are an example. A session can list them in another order, and you send the frames in the order its
liveness_promptsgives. captured_atis when the camera took the frame, in Unix milliseconds on the device clock. Frames must be in capture order, at least 200 ms apart and within two minutes.- Every image must be new. An image sent before, in any session, is refused, and so is a selfie equal to a frame.
face_match.scoreruns from 0 to 100. A low score sends the identification to a person and never refuses it alone.
{
"id": "wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q",
"object": "kyc_session",
"status": "in_review",
"reason": null,
"review": "automatic",
"can_retry": false,
"steps": ["document_nfc", "profile", "liveness"],
"liveness_prompts": ["turn_left", "smile", "blink"],
"expires_at": 1792056600,
"submitted_at": 1792054800,
"decided_at": null,
"profile_required": false
}
Wait for the decision
The decision usually arrives within one to two minutes, and later when a person reviews it (review: manual). Poll GET /kyc/sessions/{id} with the step token every few seconds, or GET /kyc when signed in. The user also gets an SMS and the push wallet_kyc_verified_push or wallet_kyc_failed_push.
curl https://wallet.pf.organizer.tr/w1/kyc \
-H "Argus-App-Platform: ios" \
-H "Argus-App-Version: 2.4.0" \
-H "Authorization: DPoP lxsFzKevwOEfzeNdK6Hbe-ixyOgxgMPFJX5kMMqe3rQ" \
-H "DPoP: eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwiY3J2IjoiUC0yNTYiLCJ4Ijoi..."
{
"can_retry": false,
"decided_at": 1792054890,
"profile_required": false,
"reason": null,
"review": null,
"session": "wky_01M4ZCMBM0HJV34JNZ8Q99HN3Q",
"status": "verified"
}
GET /kyc status |
Session status | What it means |
|---|---|---|
not_started |
The user has never started an identification. | |
in_progress |
started, document_accepted |
A session is open and its steps are not done. |
in_review |
submitted, in_review |
The steps are done and the decision is pending. review says automatic or manual. |
verified |
verified |
The user is identified. GET /me now carries the name from the chip. |
rejected |
rejected |
The identification was refused. reason says why. |
expired_document |
expired_document |
The ID card has expired. |
expired |
The session passed expires_at before its steps were done. Start a new one. |
After rejected or expired_document, can_retry says whether a new session can change the outcome. When it is false, offer support instead of "try again".
reason |
Can retry | What the app says |
|---|---|---|
face_mismatch |
Yes | The face does not match the ID card. |
liveness_failed |
Yes | The liveness check failed. Record it again in good light. |
expired_document |
Yes | The ID card has expired. Use a valid one. |
rejected |
Yes | The identification was refused. |
identity_mismatch |
Yes | The ID card is not the one of this account's owner. |
identity_in_use |
No | This person already has a wallet. |
underage |
No | The person is under 18. |
screening_hit |
No | The institution must review this person. Contact support. |
Errors of the identification steps
| Code | Status | Step | What the app does |
|---|---|---|---|
consent_required |
400 | start | The user did not consent. Nothing starts. |
kyc_already_verified |
409 | start | The user is identified already. Skip identification. |
kyc_in_review |
409 | start | An identification is being decided. Wait for it. |
kyc_unavailable |
503 | start | The installation has no identification service now. Try later. |
kyc_token_invalid |
401 | every step | The session is unknown or the token belongs to another one. Start a new session. |
chip_unreadable |
422 | document |
Hold the card to the phone and read it again. |
chip_not_authentic |
422 | document |
The chip failed the authenticity check. Read the card again. If it fails again, offer support. |
document_not_accepted |
422 | document |
The installation does not accept this card. Ask for another identity card or offer support. |
kyc_profile_required |
409 | liveness |
Take the profile step first. |
liveness_invalid |
422 | liveness |
The frames broke a rule above. Record the step again in the same session. |
liveness_replayed |
422 | liveness |
An image was sent before. Record the step again with the camera. |
kyc_step_out_of_order |
409 | every step | The step was done already, or comes too early. |
kyc_session_expired |
409 | every step | The session expired or a newer one replaced it. Start a new session. |
Identify during sign-up
When POST /otp/verify answers next_step: identify, there is no session yet. Start the identification with the enrolment handle instead of the access token, without a DPoP proof:
{
"enrolment": "p3GuQwVIwZ2exwjtgD-ZpWP2jKcaytgacHAsifeWSII",
"consent": {"biometric": true, "text_version": "1.0"}
}
Run the steps the same way and poll GET /kyc/sessions/{id} until the session is verified. Then bind the device with POST /devices/bind and the same enrolment handle. Before that, the binding answers 409 identification_required.
A known user who forgot the PIN takes the same path. The binding with pin_forgotten: true answers 409 pin_reset_requires_identification. Once the identification is verified, bind with new_pin_proof, which carries the new PIN. The identification must match the identity the user already has, otherwise it is rejected with identity_mismatch.
What changes after identification
Read GET /limits again when the push wallet_kyc_verified_push arrives, and refresh GET /home. tier is now t2, after_identification is null and the allowance is gone. What was loaded this month still counts.
| Limit | Before (sandbox) | After (sandbox) |
|---|---|---|
wallet_balance_cap, standing |
₺5,500.00 | ₺50,000.00 |
wallet_load, month |
₺5,500.00 | ₺100,000.00 |
wallet_card_load, month |
₺5,500.00 | ₺20,000.00 |
wallet_p2p_out, transaction |
not open | ₺20,000.00 |
wallet_p2p_out, month |
not open | ₺50,000.00 |
wallet_transfer_out, day |
not open | ₺50,000.00 |
wallet_spend, day |
not listed | ₺50,000.00 |
The identified user can now send money, withdraw, and create cards and pots. Some entries are settable: true: these are the user's own limits, which PUT /limits/{kind} lowers at once or raises 24 hours later. A raise needs the PIN and is allowed only 7 days after the identification.
A user who was identified before the customer questions existed answers them later. Their money actions answer 428 profile_required until the app sends the answers to POST /kyc/profile. GET /kyc then says profile_required: false.
In the sandbox
These apply only to a sandbox installation. A live installation has none of them.
- The numbers
+90555080followed by four digits are reserved for tests. For these numbers the sandbox may shorten the 72 hours of a new device. A sandbox sends no real SMS: the installation either uses one fixed code or lets its operator read the code from the sandbox's message log. Ask the operator which. - With
test_identities: trueinGET /meta, the app may offer test identities instead of reading a real chip, for the reserved numbers only. Any other number must read a real card. See Test identities. - The sandbox's identification service decides at once. The liveness step then answers
verified,rejectedorexpired_documentdirectly, withoutin_review. A sandbox that reads real ID cards decides one to two minutes later, as live does. - The documents may be drafts with
test_only: true.
Test identities
To use a test identity, send its key as dg1, face as dg2 and sod as sod, each in base64:
{"dg1": "dmVyaWZpZWQ=", "dg2": "ZmFjZQ==", "sod": "c29k"}
| Key | dg1 |
Outcome |
|---|---|---|
verified |
dmVyaWZpZWQ= |
verified, as Ayşe Yılmaz |
verified_2 |
dmVyaWZpZWRfMg== |
verified, as Mehmet Ali Kaya |
minor |
bWlub3I= |
rejected, underage |
expired |
ZXhwaXJlZA== |
expired_document |
face_mismatch |
ZmFjZV9taXNtYXRjaA== |
rejected, face_mismatch |
review |
cmV2aWV3 |
in_review until the operator decides |
On a reserved test number, each test identity is a person of that number. verified on +905550801401 and verified on +905550801402 are two people with the same name and different identity numbers. Every reserved number can therefore sign up and identify with verified. A tester needs only a new number for a new user.
A person still has one wallet. Another test identity on the same number is another person, so a device change or a PIN reset with it is rejected with identity_mismatch. Use the number's first key again.
A sandbox that reads no real ID cards takes test identities from other numbers too. There each identity verifies one user only, and the next user is rejected with identity_in_use. Give testers reserved numbers.
Errors any call can return
| Code | Status | What the app does |
|---|---|---|
app_platform_invalid, app_version_invalid |
400 | Fix the app headers. |
app_update_required |
426 | Show the update screen. |
parameter_missing, parameter_invalid |
400 | A field or header is missing or wrong. param names it. |
use_dpop_nonce |
401 | Retry once with the nonce of the answer's DPoP-Nonce header, as The DPoP proof shows. |
dpop_invalid |
401 | The proof does not match the request or the token. Check htm, htu, iat and ath. |
session_expired |
401 | Refresh the session. If the refresh fails, sign in again with the PIN. |
documents_required |
428 | Show the new documents, then repeat the request with a new key. |
profile_required |
428 | Ask the customer questions, then repeat the request with a new key. |
idempotency_conflict |
409 | The key was used with another body. Use a new key for a new action. |
channel_closed |
503 | This part of the wallet is closed now. Nothing happened. |
Next: Move the first money with Wallet top-ups, payments and transfers.