- A sandbox key works in your sandbox application, and a production key works in your production application.
- The endpoints and request shapes are the same.
Choose a testing path
Run a full sandbox test
A full sandbox test has four steps: verify the test person and business, mint a credential, present it to your test site, and check it there. All of it uses your sandbox application and a sandbox API key.1. Verify the test person and business
Sandbox has no shortcut that creates a test person. You create one the same way as in production: someone completes your hosted enrollment flow while your sandbox application is selected. In sandbox, the person check runs against test data and the business check answers from Baselayer’s seeded sandbox businesses, so enter the values below exactly. To enroll the test person:- In the console, select Sandbox, then open your enrollment flow from Enrollment Flows. Hosted enrollment must be turned on for your organization (see Hosted Enrollment).
- Leave the country as United States, then enter the phone number
+1 210-555-8890and the date of birth1997-03-11. - At the code step, enter any six digits except
000000(for example123456). - Confirm the details shown. The person is verified.
The test business is an active Texas LLC. Its business check comes back verified with a matching tax ID and no watchlist hits, so the test person’s link to it is
VERIFIED without a manual review, and you can mint business credentials for the pair right away. See Who Can Act for a Business.
Once enrolled, the test person appears under People and the test business under Businesses, only while Sandbox is selected. Use their individual_ref and business_ref in the next step.
2. Mint a credential
Mint with your sandbox key, using the test person’sindividual_ref (and business_ref for a business credential). The request is the same as in production. See Minting Credentials. The credential is signed by the sandbox issuer.
3. Present it to your test site
Present the credential to your test site the same way an agent would in production. Your test site must accept sandbox credentials. See Let your test site accept sandbox credentials.4. Check it
The test site checks the credential the same way as in production. A sandbox credential passes only when the site accepts sandbox credentials.Let your test site accept sandbox credentials
Sandbox credentials are test data, so the KYA SDK refuses them by default. The refusal comes before any network call, with the codeSANDBOX_ISSUER.
To accept them, for example in your own staging site, turn on the sandbox switch when you create the verifier.
The KYA SDK is coming soon. The packages aren’t published yet, so the code below won’t run until they are.
Testing as a site
A site that only accepts credentials needs a sandbox credential minted for its own audience. If you have a Baselayer sandbox application, run the full sandbox test yourself with your test site’s domain as theaudience. If you don’t, ask the agent platform you work with to mint one for your test site’s domain with its sandbox key.
How sandbox and production stay separate
Every KYA record belongs to the application it was created in: people, businesses, operator links, issued credentials and audit log entries.- People and businesses you verify with a sandbox key appear only in sandbox lists and lookups. Production lists never return them.
- An
individual_reforbusiness_reffrom your sandbox application returns404when you look it up with a production key, and the other way around. It reads exactly like a reference that does not exist. One exception: once you mint a test credential for a production person or business, the credential list and audit log filters accept that production reference with a sandbox key. - Credentials you mint in sandbox show up only in your sandbox
GET /issuance/credentialslist, and can only be revoked with a sandbox key. - Your sandbox is yours. If another organization enrolls the same test person, theirs is a separate person with separate references, and neither organization can see the other’s.
Test a production identity without minting a production credential
Use this when you want to test a production person or business at a staging site.POST /issuance/credentials and mints the same credential, signed by the sandbox issuer. It works with a production key too, for a person or business verified in production, so you can test a real person’s credential at a site’s staging environment without minting a production credential. POST /issuance/credentials/test/preview previews it.
- The test credential is recorded in your sandbox application, so it appears in your sandbox credential list.
- Its
subis its own per-site ID, never the one a production mint gives the same person at the same site. - Sites accept it only when they accept sandbox credentials.
- It needs an
Idempotency-Key, like a production mint, and your organization needs a sandbox application.
Sandbox issuer reference
Credentials minted with a sandbox key are signed by Baselayer’s sandbox issuer, with its own signing key and its own revocation status list.
Everything else in a sandbox credential is shaped exactly like production, including its
vct (credential type) URL, which names the production registry for both. Revoking a sandbox credential only touches the sandbox status list.