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

# Testing

> Run every ABDM Connect journey against sandbox before you go live.

Run the happy path of every journey you support against sandbox before you go live. Each item below links the workflow's own Test it checklist, which also covers the failure cases.

## In short

* Run the happy path of every journey you support against sandbox before you go live.
* Sandbox is `https://api.dev.eka.care`; production is `https://api.eka.care`.
* Log in with your API client to get an access token, and refresh it on a `401`.
* Share a webhook endpoint that sandbox can reach with Eka before you start.
* Each item links the workflow's own Test it checklist.

## Sandbox

| Setting | Value |
| - | - |
| Sandbox base URL | `https://api.dev.eka.care` |
| Production base URL | `https://api.eka.care` |
| Authentication | Bearer token in the `Authorization` header on every call |

The base URLs are the spec's `Stage/Sandbox` and `Production` servers.

## Sandbox credentials

1. Create an Eka account and a workspace. See [Setting up your Eka account](https://developer.eka.care/api-sdk/auth/getting-started.md#setting-up-your-eka-account).
2. In the [Eka Developer Console](https://console.eka.care), open **Manage API Credentials** and create an API client. Copy the `client_id` and `client_secret`. The secret is shown once.
3. Log in with [Client login](https://developer.eka.care/api-sdk/auth/client-login.md) to get an access token and a refresh token.
4. When a call returns `401`, the access token has expired. Get a new one with [Refresh token](https://developer.eka.care/api-sdk/auth/refresh-token-v2.md).

You also need a webhook endpoint that sandbox can reach. Share it with Eka before you start, and allowlist the staging IP addresses if your network restricts inbound traffic. See [Webhooks](https://developer.eka.care/docs/hie-cm/webhooks).

## Test data

## Happy paths

### Register a walk-in patient and link the visit

[Journey](https://developer.eka.care/docs/hie-cm/journeys/hip-register-patient-and-link-visit.md)

* [ ] [Log in to an existing ABHA](https://developer.eka.care/docs/hie-cm/workflows/login-abha.md#test-it), for a patient who has one
* [ ] [Create an ABHA with Aadhaar OTP](https://developer.eka.care/docs/hie-cm/workflows/create-abha-aadhaar-otp.md#test-it), for a patient who has none
* [ ] [Link a care context as a HIP](https://developer.eka.care/docs/hie-cm/workflows/link-care-context-hip.md#test-it)
* [ ] Optional: [Create an ABHA address with mobile OTP](https://developer.eka.care/docs/hie-cm/workflows/create-abha-mobile-otp.md#test-it)
* [ ] Optional: [Create an ABHA with face authentication](https://developer.eka.care/docs/hie-cm/workflows/create-abha-face-auth.md#test-it)
* [ ] Optional: [Receive a scanned profile as a HIP](https://developer.eka.care/docs/hie-cm/workflows/hip-scan-and-share.md#test-it)
* [ ] If you keep the clinical data yourself: [Serve records on a fetch request](https://developer.eka.care/docs/hie-cm/workflows/serve-data-on-fetch.md#test-it)

### Let a patient claim their old records

[Journey](https://developer.eka.care/docs/hie-cm/journeys/hip-answer-discovery.md)

* [ ] [Answer discovery and link old records](https://developer.eka.care/docs/hie-cm/workflows/hip-discovery-and-link.md#test-it)
* [ ] If you keep the clinical data yourself: [Serve records on a fetch request](https://developer.eka.care/docs/hie-cm/workflows/serve-data-on-fetch.md#test-it)

### Fetch a patient's records with consent

[Journey](https://developer.eka.care/docs/hie-cm/journeys/hiu-fetch-records-with-consent.md)

* [ ] [Request a patient's consent as a HIU](https://developer.eka.care/docs/hie-cm/workflows/hiu-request-consent.md#test-it)
* [ ] [Receive and decrypt records as a HIU](https://developer.eka.care/docs/hie-cm/workflows/hiu-receive-data.md#test-it)

### Gather every health record in a PHR app

[Journey](https://developer.eka.care/docs/hie-cm/journeys/phr-patient-aggregates-records.md)

* [ ] [Create an ABHA with Aadhaar OTP](https://developer.eka.care/docs/hie-cm/workflows/create-abha-aadhaar-otp.md#test-it) or [Log in to an existing ABHA](https://developer.eka.care/docs/hie-cm/workflows/login-abha.md#test-it)
* [ ] [Hold the ABHA Gateway session](https://developer.eka.care/docs/hie-cm/workflows/hold-gateway-session.md#test-it)
* [ ] [Manage the ABHA profile and KYC](https://developer.eka.care/docs/hie-cm/workflows/manage-profile-and-kyc.md#test-it)
* [ ] [Discover and link records from a facility](https://developer.eka.care/docs/hie-cm/workflows/phr-discover-and-link.md#test-it)
* [ ] [List a patient's linked records](https://developer.eka.care/docs/hie-cm/workflows/phr-list-records.md#test-it)
* [ ] [Approve, deny or revoke a consent in a PHR app](https://developer.eka.care/docs/hie-cm/workflows/phr-act-on-consent.md#test-it)
* [ ] [Set up the patient's health locker](https://developer.eka.care/docs/hie-cm/workflows/set-up-health-locker.md#test-it)
* [ ] [Share a profile at a facility counter](https://developer.eka.care/docs/hie-cm/workflows/phr-scan-and-share.md#test-it)

### Onboard a facility and its professionals to ABDM

[Journey](https://developer.eka.care/docs/hie-cm/journeys/facility-onboard-to-abdm.md)

* [ ] [Create an HPR ID with Aadhaar OTP](https://developer.eka.care/docs/hie-cm/workflows/create-hpr-id.md#test-it)
* [ ] [Register and onboard a facility](https://developer.eka.care/docs/hie-cm/workflows/register-hfr.md#test-it)
* [ ] Optional: [Log in to HPR with a mobile OTP](https://developer.eka.care/docs/hie-cm/workflows/hpr-mobile-login.md#test-it)

### Book an in-person doctor visit over UHI

[Journey](https://developer.eka.care/docs/uhi/journeys/uhi-book-physical-consultation.md)

* [ ] [Log in to an existing ABHA](https://developer.eka.care/docs/hie-cm/workflows/login-abha.md#test-it)
* [ ] [Book a physical consultation over UHI](https://developer.eka.care/docs/uhi/workflows/uhi-book-consultation.md#test-it)
* [ ] Optional: [Search blood banks over UHI](https://developer.eka.care/docs/uhi/workflows/blood-bank-search.md#test-it)

### Pay an open bill by scanning the counter QR

[Journey](https://developer.eka.care/docs/uhi/journeys/uhi-scan-and-pay.md)

* [ ] [Log in to an existing ABHA](https://developer.eka.care/docs/hie-cm/workflows/login-abha.md#test-it)
* [ ] [Pay an open order with Scan and Pay](https://developer.eka.care/docs/uhi/workflows/scan-and-pay.md#test-it)

## Before go-live

* [ ] Every webhook your workflows consume arrives, its signature verifies, and your endpoint replies `200` within 5 seconds.
* [ ] Your error handling matches [Error codes](https://developer.eka.care/docs/hie-cm/errors.md), including the By symptom section.


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