2xx response always has status: "success", and error_code tells you which outcome you got: null for a verified result, IDTO_202 when the source has no record. Anything else is an error response with a non-2xx status and billed: false.
1
Set your credentials
Use
https://dev.idto.ai (staging) while you build and https://prod.idto.ai (production) when you go live. Keep the client ID and API key on your server only. Never ship them to a browser or a mobile app..env
2
Call PAN validation and branch
3
Read the result
The sample PAN The code prints
ABCDE1234F is a placeholder. It passes idto’s format check, so the call reaches a source, and the result depends on which source serves your account. Staging hits live sources, so expect either of these:400 Rejected by the source, not billed
200 No record, billed
error for the first and no_record for the second. A 401 (wrong keys) has only a detail field, and the code reports it as error with that text. With a real PAN you are authorised to verify, the same code returns verified with the card details, or no_record.Good to know
- Never treat
status: "success"alone as “verified”. Checkerror_codetoo. - Both
2xxoutcomes are billed, so storebilledwith the result for reconciliation. - See Error codes for every code and the HTTP status it comes with.