Skip to main content
If you only want to see what a person sees when they verify, start with the Hosted Enrollment Playground. KYA follows the same rule as the rest of Baselayer: the API key you call with decides the environment.
  • 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.
See Sandbox vs. Production Environments for keys and the console environment selector. For KYA, the two environments stay fully separate, and sandbox credentials are signed by their own issuer.

Choose a testing path

Sandbox is for credentials: sandbox keys and a test person. Staging is for Agent Acceptance.

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

You create a test person 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:
  1. 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).
  2. Leave the country as United States, then enter the phone number +1 210-555-8890 and the date of birth 1997-03-11.
  3. At the code step, enter any six digits except 000000 (for example 123456).
  4. Confirm the details shown. The person is verified.
To add the test business in the same flow: 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’s individual_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. First turn on sandbox credentials at your test site. See Let your test site accept sandbox credentials.

4. Check it

The test site checks the credential the same way as in production.

Let your test site accept sandbox credentials

Sandbox credentials are test data, signed by the sandbox issuer. A production check refuses them with the code sandbox_issuer. To accept them in your own test site, trust the sandbox issuer as well as the production one, in test environments only, and fetch its keys and status lists from https://sandbox.registry.baselayer.com. See Issuer Keys. A business presentation must use one issuer for both of its credentials, so a sandbox credential can never be paired with a production one.

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 the audience. 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_ref or business_ref from your sandbox application returns 404 when 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/credentials list, 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 test site.
See the API reference. This endpoint takes the same body as 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 sub is its own per-site ID, separate from the one a production mint gives the same person at the same site.
  • Sites with sandbox credentials turned on accept it.
  • 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.

Troubleshooting