The PayPal Sandbox connector is the PayPal connector pointed at `api.sandbox.paypal.com`, for testing with the sandbox buyer accounts in your developer dashboard.

## Copy the redirect URI

In the [Authdog console](https://console.authdog.com), select the project and environment, open **Authentication > Providers**, find **PayPal Sandbox**, and click **Enable**. Copy the redirect URI shown in the form:

```url
https://identity.authdog.com/api/v1/callback/<connectionId>
```

## Create the application

1. Create the app under **Sandbox** in the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard/applications/sandbox).
2. Enable **Log in with PayPal** and add the redirect URI from Authdog as a **Return URL**.
3. Create sandbox personal accounts under **Testing Tools > Sandbox Accounts**.
4. Copy the sandbox app's **Client ID** and **Secret**.

## Configure Authdog

| Field | Value |
| --- | --- |
| **Client ID** | The client identifier from the provider |
| **Client Secret** | The client secret from the provider |

Save, then toggle the connection **active**.

## What PayPal Sandbox returns

Authdog requests the `openid profile address` scopes and reads the profile from `https://api.sandbox.paypal.com/v1/identity/oauth2/userinfo`.

Sandbox responses mirror live ones. Sandbox buyer accounts have their own credentials — real PayPal logins will not work here.

Configure this connector in a development environment and the live connector in production so a test credential can never issue a production session.

## Test it

1. Open your environment's hosted sign-in page, or link to `https://identity.authdog.com/api/v1/signin/<connectionId>`.
2. Select the PayPal Sandbox button and complete the flow.
3. Confirm the user appears under **Users** in the console with a PayPal Sandbox identity linked.

## Troubleshooting

| Symptom | Cause |
| --- | --- |
| `invalid_client` | Live credentials used against the sandbox endpoint, or the reverse |
| Redirect or callback URL error | The URI registered with the provider does not match Authdog's exactly |
| Works in one environment only | Each environment has its own `connectionId`, and so its own redirect URI to register |

## Related

| Read | To learn how to |
| --- | --- |
| [Connectors](/docs/connectors) | Set up any other social provider |
| [PayPal](/docs/connectors/paypal) | Set up the live connector |
