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

# <MoonPayConnectionCheck />

> Headless connection check. The declarative alternative to client.getConnection().

`<MoonPayConnectionCheck>` is a headless component (renders nothing visible)
that checks the customer's connection status. It is the declarative alternative
to [`client.getConnection()`](/platform/sdk-reference/react-native/get-connection).

When the connection is active, credentials are decrypted and stored on the
shared client automatically. Subsequent calls to `client.getQuote()`,
`client.setupApplePay()`, etc. use those credentials without any extra steps.

Mount this component once early in your flow — for example, when your app loads
or when a payment screen becomes visible. Unmount it after you receive the
`"complete"` event.

```tsx PaymentFlow.tsx theme={null}
import React from "react";
import {
  MoonPayConnectionCheck,
  MoonPayConnect,
  type ConnectionCheckEvent,
} from "@moonpay/platform-sdk-react-native";

export function PaymentFlow() {
  const [connectionStatus, setConnectionStatus] = React.useState<string | null>(
    null,
  );

  const handleCheckEvent = (event: ConnectionCheckEvent) => {
    if (event.kind === "complete") {
      setConnectionStatus(event.payload.status);
    }
    if (event.kind === "error") {
      console.error(event.payload.message);
    }
  };

  return (
    <>
      {connectionStatus === null && (
        <MoonPayConnectionCheck onEvent={handleCheckEvent} />
      )}
      {connectionStatus === "connectionRequired" && <MoonPayConnect />}
    </>
  );
}
```

***

## Props

| Prop      | Type                                    | Required | Description                                                                                                      |
| --------- | --------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `skipKyc` | `boolean`                               |          | Pass `true` for headless/Identity API integrations so the check opts out of KYC-based statuses. Mount-time only. |
| `onEvent` | `(event: ConnectionCheckEvent) => void` |          | Callback for connection check events. See [`ConnectionCheckEvent`](#connectioncheckevent).                       |

This component renders nothing visible (0×0). It has no `style` prop.

### `ConnectionCheckEvent`

| kind         | Payload                                                                        | When you receive it                                    |
| ------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------ |
| `"complete"` | [`Connection`](/platform/sdk-reference/react-native/get-connection#connection) | The check finished. Inspect `payload.status` to route. |
| `"error"`    | `{ message: string }`                                                          | The check encountered an error.                        |

**`Connection` statuses:**

| Status                      | Meaning                                                                      |
| --------------------------- | ---------------------------------------------------------------------------- |
| `"active"`                  | The customer is connected. Credentials are applied to the client.            |
| `"connectionRequired"`      | The customer needs to connect. Render `<MoonPayConnect>` or `<MoonPayAuth>`. |
| `"unavailable"`             | The customer's region is not supported.                                      |
| `"pending"`                 | KYC is in progress — may resolve on a subsequent check.                      |
| `"failed"`                  | KYC failed or was rejected.                                                  |
| `"termsAcceptanceRequired"` | The customer must accept updated terms before proceeding.                    |
