---
title: Stripe
description: Receive logs about event changes in your account from Stripe.
breadcrumbs: Docs > Integrations > Stripe
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Stripe
Integration version1.1.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Stripe is a suite of APIs powering online payment processing and commerce solutions for internet businesses of all sizes. Connect Datadog with your Stripe account to receive logs about event changes in your account. You can also collect Stripe activity logs, which record administrative and security actions such as API key changes, team invitations, role changes, and sign-in configuration changes.

## Setup{% #setup %}

You can collect Stripe events with a webhook, collect activity logs with a restricted API key, or both.

### Webhook Configuration{% #webhook-configuration %}

1. Copy the generated webhook URL from the **Configure** tab on the [Stripe integration tile](https://app.datadoghq.com/integrations/stripe).
1. Go to the [Webhooks](https://dashboard.stripe.com/webhooks) page in your Stripe account.
1. Click **Add Endpoint**.
1. Paste the generated URL from Step 1 into the **Endpoint URL**.
1. Add an optional description in **Description**.
1. Select the events you want to listen to.
1. Click **Add endpoint**.

### Activity log collection (Preview){% #activity-log-collection-preview %}

Datadog collects [Stripe activity logs](https://docs.stripe.com/activity-logs) with a restricted API key. Activity log collection is in Preview and is enabled per organization. To join the Preview, contact [Datadog support](https://docs.datadoghq.com/help). If activity log collection isn't enabled for your organization, saving an account succeeds but no activity logs arrive.

#### Prerequisites{% #prerequisites %}

- A Stripe user with a role that can create API keys, such as Administrator, Super Administrator, or Developer.

#### Create a restricted API key{% #create-a-restricted-api-key %}

1. In the Stripe Dashboard, open the [API keys](https://dashboard.stripe.com/apikeys) page and click **Create restricted key**.
1. Set **Activity logs** to **Read** and every other permission to **None**.
1. Click **Create key**, complete the two-factor verification that Stripe sends you, and copy the key, which starts with `rk_`. Stripe does not show it again. Secret keys and organization keys are not accepted.

The key doesn't expire by default, but a Stripe admin can expire or roll it. Stripe recommends rotating keys when a team member with access to the key leaves your organization. When the key changes, create a new key if needed and update the account in Datadog with the new key.

If the key has an IP access policy, remove the policy or add Datadog's crawler IP addresses to it. Contact [Datadog support](https://docs.datadoghq.com/help) for the list.

Stripe might email you an unusual API activity alert for requests made with this key. If you recognize the activity, no action is needed.

#### Configuration{% #configuration %}

1. Open the [Stripe integration tile](https://app.datadoghq.com/integrations/stripe) in Datadog and click **Add Account**.
1. Enter the restricted API key you created.
1. Click **Save**.

Datadog polls the Stripe activity logs API every 15 minutes and submits new activity logs.

The first collection reads up to 6 months of activity logs, which counts against your Stripe read allocation. A heavy account can receive rate limit (`429`) responses during the first month. Datadog retries on the next run, and collection catches up. Only logs from the last 18 hours before collection are indexed, so older activity from the first collection does not appear in Datadog.

#### Validation{% #validation %}

Within about 30 minutes, search for `source:stripe service:activity-logs` in the [Log Explorer](https://app.datadoghq.com/logs?query=source%3Astripe%20service%3Aactivity-logs) to see Stripe activity logs.

## Uninstallation{% #uninstallation %}

To stop collecting Stripe activity logs:

1. Open the [Stripe integration tile](https://app.datadoghq.com/integrations/stripe) in Datadog and delete the account you added for activity log collection.
1. In the Stripe Dashboard, open the [API keys](https://dashboard.stripe.com/apikeys) page and expire the restricted API key you created for Datadog.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

The Stripe integration does not include any metrics.

### Logs{% #logs %}

Stripe events appear as logs under the `stripe` source. Stripe activity logs appear under the `stripe` source with `service:activity-logs`.

### Events{% #events %}

The Stripe integration does not include any events.

### Service Checks{% #service-checks %}

The Stripe integration does not include any service checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help).
