> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ripio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KYC in sandbox

> How to test the KYC with liveness check in sandbox, including simulating an approved or a rejected verification.

Sandbox has no one reviewing identity verifications. If your account uses the [KYC with liveness check](/crypto-as-a-service/kyc/kyc-with-liveness-check.md), you can decide the outcome of a submission yourself with two sandbox-only endpoints, and test how your integration handles both an approved and a rejected KYC.

> [!NOTE]
>
> These endpoints only exist in sandbox. In production, the outcome always comes from the identity provider.

> [!NOTE]
>
> If your account uses the [KYC for regulated entities](/crypto-as-a-service/kyc/kyc-for-regulated-entities.md), there is nothing to simulate: the KYC is approved in the same request.

## Simulate approval or rejection

**1. Create the KYC Submission**

Run the normal flow with [Create KYC Submission](/crypto-as-a-service/kyc-submissions/create-kyc-submission.md). The response comes back `IN_REVIEW`, with a `provider_url`. Save the `submission_id`.

You don't need to complete the liveness check at `provider_url` to simulate the decision.

**2. Approve or reject it**

Call [Simulate KYC Approval](/crypto-as-a-service/simulate-kyc-validation/simulate-kyc-approval.md) or [Simulate KYC Rejection](/crypto-as-a-service/simulate-kyc-validation/simulate-kyc-rejection.md) with the `submission_id`.

**3. Confirm the result**

You receive the `KYC.COMPLETED` or `KYC.FAILED` webhook, as in production — see [BaaS Webhooks](/crypto-as-a-service/webhooks/baas-webhooks.md#verification-submission-webhook). You can also check it with [Retrieve KYC Submission](/crypto-as-a-service/kyc-submissions/retrieve-kyc-submission.md).

> [!NOTE]
>
> A successful simulation answers `200 OK` with no body. The status of the submission changes a few moments later, when the KYC service reports the decision back, so confirm it with the webhook or by polling.

### Simulate approval

```bash theme={null}
curl --request POST \
  --url https://sandbox-b2b.ripio.com/api/v1/simulate-kyc-validation/{submission_id}/approve/ \
  --header 'Authorization: Bearer <token>'
```

Use it to let the user operate and continue testing the rest of your integration. See the [Simulate KYC Approval](/crypto-as-a-service/simulate-kyc-validation/simulate-kyc-approval.md) reference.

### Simulate rejection

```bash theme={null}
curl --request POST \
  --url https://sandbox-b2b.ripio.com/api/v1/simulate-kyc-validation/{submission_id}/disapprove/ \
  --header 'Authorization: Bearer <token>'
```

Use it to test how your integration handles a rejected KYC: the `KYC.FAILED` webhook, the message you show the user, and creating a new submission for them. See the [Simulate KYC Rejection](/crypto-as-a-service/simulate-kyc-validation/simulate-kyc-rejection.md) reference.

## Common errors

| HTTP | Code | What it means |
| - | - | - |
| `404` | — | There is no KYC Submission with that `submission_id` in your account. |
| `400` | `20093` | Your account approves KYC automatically, so there is no review to approve or reject. |
| `400` | `20094` | The submission was already approved or rejected. |
| `400` | `20095` | The submission has no verification open with the identity provider, so there is nothing to decide. This happens when your account's KYC flow does not include a liveness check. |
| `400` | `21028` / `21029` | The KYC service could not approve or reject the verification. Retry, or contact Ripio support if it persists. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.