Soft Check

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.

1export const SessionContainer = ({ children }) => {
2 const { createSoftEligibilitySession } = useBridgeSdk();
3 const session = useMemo(() => {
4 return createSoftEligibilitySession({ serviceTypeIds: ["svt_xxx"] });
5 }, [createSoftEligibilitySession]);
6
7 return (
8 <SoftEligibilityProvider session={session}>
9 {children}
10 </SoftEligibilityProvider>
11 );
12};
2

Form Input

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

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

Submission

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

1export const SoftEligibilitySubmitButton = () => {
2 const { isDisabled, submit } = useSoftEligibilitySubmit();
3
4 return (
5 <button disabled={isDisabled} onClick={() => submit()}>
6 Submit
7 </button>
8 );
9};
4

Handle the result

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