# Find your payment keys

> Where Stripe and PayPal show the keys Settings → Payments asks for, live and test.

**Settings → Payments** asks for two keys from each account: a public one and a secret one. Paste the **live** keys to take real payments. The **test** keys are optional: they let you try your checkout with test cards first. You don't need anything else, because the webhooks are set up for you when you save (see [Payments](https://docs.adventfunnel.com/payments#add-the-webhooks)).

## Stripe

1. Sign in to your Stripe dashboard at dashboard.stripe.com.
2. Open **Developers → API keys** (or search the dashboard for "API keys").
3. Copy the **Publishable key** (`pk_live_…`) into **Publishable key**.
4. Under **Secret key**, choose **Reveal live key** (or create one if Stripe asks you to) and copy it (`sk_live_…`) into **Secret key**. Stripe shows a new secret key only once, so paste it straight away.
5. Save. Advent Funnel adds the webhook in your Stripe account and the Payments page shows its live keys are set.

For **Test mode**, switch the dashboard to test mode (or open a sandbox) and copy the same two keys there: they start with `pk_test_` and `sk_test_`.

> A restricted key (`rk_live_…`) works too. If it isn't allowed to manage webhook endpoints, the Payments page says the webhook couldn't be set up: add one by hand as [Payments](https://docs.adventfunnel.com/payments#add-the-webhooks) describes, and paste its signing secret under **Advanced**.

## PayPal

PayPal's keys belong to a REST app, made in the developer dashboard with your PayPal business account.

1. Sign in at developer.paypal.com with your PayPal business account.
2. Open **Apps & Credentials** and switch the toggle at the top to **Live**.
3. Open your app, or choose **Create App** and give it a name (such as your store's).
4. Copy the **Client ID** into **Client ID** and the **Secret** into **Client secret**.
5. Save. Advent Funnel adds the webhook to that app and the Payments page shows its live keys are set.

For **Sandbox (test mode)**, switch the toggle to **Sandbox** and copy the Sandbox app's Client ID and Secret the same way. You pay with one of PayPal's sandbox test accounts there, never real money.

## When something doesn't save

- **Must start with…**: the key is from the other mode (a test key in a live field, or the other way round) or isn't the key asked for. Check the toggle in Stripe's or PayPal's dashboard and copy it again.
- **Couldn't set up the webhook**: the reason is on the Payments page, with **Set up the webhook** to try again once it's fixed.
- A saved key is never shown again, only its last 4 characters. To change one, paste the new key over it; to drop one, tick **Remove this key**.
