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

# Test in the sandbox

> Set up sandbox access and test BV and PA outcomes with mock_result.

Use a sandbox organization to test API requests and result handling. Ask your
Develop Health contact or [support](mailto:support@develophealth.ai) to provision
sandbox access and confirm which organization your credentials belong to.

## Environment and credentials

Sandbox and production organizations use the same API base URL:

```text theme={null}
https://api.develophealth.ai
```

Use an [API token](/api-reference/authentication) for the intended organization
and configure its webhook destination with a signing secret. Keep sandbox and
production credentials and webhook destinations separate in your application's
configuration. A successful call to `/status` checks connectivity; confirm the
token's organization separately.

Use `mock_result` in your sandbox organization. It is not supported in
production. For PA requests, `mock_result_not_allowed` means the request used
production credentials. Remove `mock_result` or use your sandbox credentials.

## Start with a complete request

The [BV request guide](/api-reference/medication-benefit-check/request-guide#example-sandbox-request)
contains a complete synthetic BV request. The [PA request guide](/api-reference/prior-authorization/request-guide#example-sandbox-request)
contains a complete synthetic PA request. Keep `mock_result` in those requests
when testing simulated outcomes.

Mock requests must pass validation, including required fields and valid enum
values. When using an NDC, use a supported code. If a mock request is
rejected, inspect its HTTP status and error before waiting for a webhook.

## Simulate benefit verification outcomes

Add a `mock_result` object to a BV create request. Its case applies to every
drug in that request.

| Scenario | `mock_result.status` | `mock_result.case` |
| - | - | - |
| Covered, PA required, copay available | `completed` | `drugs_covered__prior_auth_required__has_copay` |
| Covered, PA required, no copay returned | `completed` | `drugs_covered__prior_auth_required__no_copay` |
| Covered, no PA required, copay available | `completed` | `drugs_covered__prior_auth_not_required__has_copay` |
| Covered, no PA required, no copay returned | `completed` | `drugs_covered__prior_auth_not_required__no_copay` |
| Not covered | `completed` | `drugs_not_covered__prior_auth_na__no_copay` |
| Patient consent required | `failed` | `patient_consent_required` |

For example, replace the BV example's `mock_result` with:

```json theme={null}
{
  "status": "failed",
  "case": "patient_consent_required"
}
```

BV mocks send a `benefit_verification.status_change` webhook with the simulated
result to your configured endpoint. You can also retrieve the result with
[`GET /benefit-verification/{id}`](/api-reference/medication-benefit-check/get_item).
Use an explicit mock result to test a specific terminal outcome. Unmocked sandbox BVs
do not exercise the full production verification process.

See the [create reference](/api-reference/medication-benefit-check/post) for all
available cases, including reverification scenarios.

## Simulate prior authorization outcomes

PA mocks use a different shape from BV mocks. Add one of these objects as the
PA request's `mock_result`:

```json theme={null}
{
  "result": "Approved",
  "detail_code": "approval"
}
```

| Scenario | `result` | Example `detail_code` | Expected resource status |
| - | - | - | - |
| Approved | `Approved` | `approval` | `completed` |
| Denied | `Denied` | `plan_exclusion` | `completed` |
| Stopped before submission | `Not Submitted` | `more_information_required` | `not_submitted` |
| Other terminal outcome | `Other` | `payer_unable_to_locate_member` | `completed` |

PA mocks send a `prior_authorization.status_change` webhook with the selected
outcome to your configured endpoint. They skip the manual review step.

To test PA review, send a sandbox PA request without `mock_result`. Once it
reaches `awaiting_review`, open its `data.url` to review and submit it in
Develop Health.

See the [PA create reference](/api-reference/prior-authorization/post) for the
complete mock schemas and permitted detail codes.


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