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

# Stripe

### Configuring Stripe <a href="#configuring-stripe" id="configuring-stripe"></a>

Once you've signed up for a Stripe account, log into your Stripe admin dashboard. Stripe can be run in either testing or live mode - these instructions work for either mode. It's best to start in test mode and run some test transactions to make sure everything is working, you then switch Stripe to live mode and go through this configuration again with your 'live' keys.

There are three main items that you have to get from your Stripe account to configure it in Pakk: **Publishable Key**, **Secret Key** and **Webhook Signing Secret**. You have to fill those in your Stripe config, which can be found in the "Payments" tab of your Pakk account config page (the little cog icon in the Pakk toolbar).

**API Keys**

From the **Developers/API Keys** section, grab the following codes and paste them into your Stripe config in Pakk

* API Keys > Publishable Key
* API Keys > Secret Key

**Webhooks**

In the **Webhooks** section, click **Add Endpoint** to create a new notification endpoint for Stripe payments. In the popup, you need to enter the URL of your webhook, which is *any domain pointed at your site* plus `/webhooks/stripe`.&#x20;

So, if your site was at `pakk.io` you'd enter `https://pakk.io/webhooks/stripe`. Check that the version is 2024-06-20, and then select two events to send:&#x20;

* payment\_intent.payment\_failed
* payment\_intent.succeeded

Once you've created the endpoint, you can get a **Signing secret** from the webhook page you just created in Stripe - you need to paste that into your Stripe config in Pakk too. Finally, again inside the Pakk Stripe config, choose your locale and select **Enable**.

![Stripe API Keys](https://images.pakk.cloud/pakk/2024/7/Clipboard_07-31-2024_02.jpg) ![Stripe Webhooks](https://images.pakk.cloud/pakk/2024/7/Clipboard_07-31-2024_03_2.jpg) ![Stripe Webhooks Config](https://images.pakk.cloud/pakk/2024/7/Clipboard_07-31-2024_01_3.jpg)

### Upgrading a Webhook to a new API version <a href="#upgrading-a-webhook-to-a-new-api-version" id="upgrading-a-webhook-to-a-new-api-version"></a>

If you don't need to upgrade your whole account to the latest API and just want to upgrade your webhook, this what you do:

* Go through the same steps as above and create a new webhook (if it defaults to another version, change it to 2024-06-20)
* Delete the old webhook&#x20;
* Copy the **Signing secret** from the new webhook and paste that into your Stripe config in Pakk. You must **remember** to do this, otherwise your Pakk config will be pointing to the old webhook you have just deleted!


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pakk.io/account-setup/payment-methods/stripe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
