> For the complete documentation index, see [llms.txt](https://hollow-peak.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hollow-peak.gitbook.io/docs/payments/stripe.md).

# Stripe

Cards, Apple Pay and Google Pay through Stripe.

Stripe is the most widely available provider in Hollow Peak and the only one that can present Apple Pay and Google Pay.

## Before you start

You need a Stripe account. Stripe decides whether it accepts your country and business type — check [stripe.com/global](https://stripe.com/global) first.

## Getting your keys

In the Stripe Dashboard:

1. Toggle **Test mode** on, in the top right
2. **Developers → API keys**
3. Copy the **Publishable key** (`pk_test_…`) and the **Secret key** (`sk_test_…`)

{% hint style="info" %}
Test and live keys come from the same Stripe account, distinguished by the `test` or `live` in the key itself. This is unlike Safepay and PayFast, where sandbox is a separate account.
{% endhint %}

## Configuring

**Payments → Settings → Stripe**

| Field           | What to enter                                         |
| --------------- | ----------------------------------------------------- |
| Enable Stripe   | Tick                                                  |
| Mode            | **Test** while setting up                             |
| Publishable key | `pk_test_…` — safe to expose; it reaches the browser  |
| Secret key      | `sk_test_…` — **stored encrypted**, never shown again |
| Webhook secret  | From the webhook step below                           |
| Methods         | Card, and optionally Apple Pay and Google Pay         |

Save, then press **Test These Credentials**.

## Webhooks

Stripe confirms payments by webhook. Without one, a payment may complete at Stripe while your order stays pending.

1. Stripe Dashboard → **Developers → Webhooks → Add endpoint**
2. Endpoint URL:

   ```
   https://your-domain.com/webhooks/stripe
   ```
3. Select these events:

   ```
   checkout.session.completed
   payment_intent.succeeded
   payment_intent.payment_failed
   charge.refunded
   ```
4. Copy the **Signing secret** (`whsec_…`) into the Webhook secret field in Hollow Peak

{% hint style="warning" %}
Test-mode and live-mode webhooks are configured separately in Stripe and have different signing secrets. Switching Hollow Peak to Live without updating the webhook secret means every webhook is rejected.
{% endhint %}

See **Webhooks** for testing an endpoint that is not yet public.

## Apple Pay and Google Pay

Both are presented by Stripe, and both need:

* **HTTPS** — they will not appear otherwise, and Hollow Peak refuses them over plain HTTP
* **Domain registration** — Stripe Dashboard → **Settings → Payments → Payment methods → Apple Pay**, add your domain
* A customer on a supporting device and browser

If they do not appear, that is normal on an unsupported device — test Apple Pay in Safari on an Apple device, and Google Pay in Chrome with a saved card.

## Test cards

| Card                  | Result              |
| --------------------- | ------------------- |
| `4242 4242 4242 4242` | Succeeds            |
| `4000 0000 0000 0002` | Declined            |
| `4000 0025 0000 3155` | Requires 3-D Secure |

Any future expiry date, any three-digit CVC.

## Going live

1. Complete Stripe's account activation
2. Switch **Test mode** off in Stripe and copy the live keys (`pk_live_…`, `sk_live_…`)
3. Create a **live** webhook endpoint and copy its signing secret
4. In Hollow Peak, set Mode to **Live** and paste all three values
5. Press **Test**
6. Place one small real payment and refund it

## Common problems

| Symptom                                    | Cause                                                  |
| ------------------------------------------ | ------------------------------------------------------ |
| “Stripe credentials have not been entered” | Secret key missing, or saved blank                     |
| Card option missing at checkout            | Currency unsupported, or Stripe switched off           |
| Apple/Google Pay missing                   | No HTTPS, domain not registered, or unsupported device |
| Payment succeeds, order stays pending      | Webhook not configured, or wrong signing secret        |
| “No signatures found matching” in logs     | Webhook secret is from the other mode                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hollow-peak.gitbook.io/docs/payments/stripe.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
