Skip to navigation

Refer to the Soft Check guide for what a soft check returns.

See the Demo Project for a working example.

1

Create a Session

Create the SoftEligibilitySession by calling createSoftEligibilitySession on the SDK, nested within your BridgeSdkProvider. You must provide at least one ServiceType ID.

Render SoftEligibilityProvider with the session as a parent of your eligibility form.

export const SessionContainer = ({ children }) => {
const { createSoftEligibilitySession } = useBridgeSdk();
const session = useMemo(() => {
return createSoftEligibilitySession({ serviceTypeIds: ["svt_xxx"] });
}, [createSoftEligibilitySession]);
return (
<SoftEligibilityProvider session={session}>
{children}
</SoftEligibilityProvider>
);
};
2

Form Input

Soft checks require the state and payer fields, never any other information. Use Building Forms for payer autocomplete and field hooks.

const payer = useEligibilityInputField("payer");
const state = useEligibilityInputField("state");
3

Submission

Bridge manages the loading state and validation of your inputs. Use useSoftEligibilitySubmit for isDisabled and submit.

export const SoftEligibilitySubmitButton = () => {
const { isDisabled, submit } = useSoftEligibilitySubmit();
return (
<button disabled={isDisabled} onClick={() => submit()}>
Submit
</button>
);
};
4

Handle the result

Use useSoftEligibilityState to read status and providers. See the Soft Check guide for status values.