> For the complete documentation index, see [llms.txt](https://docs.humblytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humblytics.com/how-to-track-purchase-events/stripe/stripe-payment-links.md).

# Stripe Payment Links

## Step 1: Connect Stripe to Humblytics

Before you can track revenue with Stripe Payment Links, you need to connect your Stripe account to Humblytics:

1. **Go to your Humblytics dashboard** and navigate to Site Settings
2. **Click on the Revenue tab** to access revenue tracking settings
3. **Select Stripe** as your payment provider
4. **Choose "Payment Links"** as your integration method
5. **Enter your Stripe Secret Key** (found in your [Stripe Dashboard](https://dashboard.stripe.com/apikeys))
6. **Save the configuration** to connect your Stripe account

Your Stripe Secret Key will be encrypted and stored securely. Never share your secret key publicly.

## Step 2: Configure Payment Links

Once your Stripe account is connected, configure your Stripe Payment Links:

In your Stripe Payment Links, select a product and go to the "After Payment" tab.

For "Confirmation page", choose to redirect customers to your website and add `?stripe_session_id={CHECKOUT_SESSION_ID}` to the URL.

![Stripe Payment Links Configuration](https://via.placeholder.com/600x400?text=Stripe+Payment+Links+Configuration)

Humblytics will automatically look for the `stripe_session_id` in the URL and track the payment.

## Important Notes

* **Duplicate payment events are ignored** so you don't need to worry about multiple redirects
* **Works best when customers complete the purchase journey on the same device/browser**
* **No additional code required** - just configure the redirect URL

After receiving a successful payment, you should see revenue data in your dashboard (referrer, country, browser, etc.). If you don't, please contact us at <support@humblytics.com>.

<figure><img src="/files/LMg5TVRvTnqaABjajcln" alt=""><figcaption></figcaption></figure>

## Key Benefits

| Benefit                | Detail                                           |
| ---------------------- | ------------------------------------------------ |
| **Zero code required** | Just configure the redirect URL in Stripe        |
| **Automatic tracking** | Revenue automatically attributed to visitor data |
| **Privacy-compliant**  | Cookie-free tracking, no consent banners         |
| **Split test ready**   | Use revenue as conversion goals in A/B tests     |

## Setting Up Split Tests with Revenue Goals

1. **Create a split test** on your main website
2. **Choose Revenue** as your goal type
3. **Set your target revenue amount** or use "Any Revenue" for all purchases
4. **Launch your test** - revenue will be automatically tracked

<figure><img src="/files/QtSszJYYXHQwYi1d0rYc" alt=""><figcaption></figcaption></figure>

## Troubleshooting

* **No revenue data appearing?** Check that your Stripe account is properly connected
* **Missing attribution?** Verify the session\_id is being passed in the redirect URL
* **Need help?** Contact <support@humblytics.com> for assistance


---

# 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.humblytics.com/how-to-track-purchase-events/stripe/stripe-payment-links.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.
