# About Stripe

Stripe (https://stripe.com/)  is a global payment processing platform that enables businesses to accept online payments and manage financial transactions. It supports multiple payment methods, including credit/debit cards, digital wallets, and local payment options. Stripe offers a suite of financial services, including fraud prevention, invoicing, and subscription management, making it a preferred choice for startups, enterprises, and e-commerce platforms worldwide.

# How to connect with Stripe

To connect with Stripe you have different options. 

You can either connect by using Congrify Stripe's app, directly from you Stripe account or you can follow a process where you will provide an API Key directly from Stripe.

As an additional option you can configure Webhook's ingestion. Refer to the steps listed at the end of this page.

## Required access credentials

1. Name
Name of Stripe's Account 

2. API key
The KeyID used for connection to Stripe

## Importing Historical Data
During the onboarding process with Congrify, you can import historical data from Stripe. Please reach out to Congrify's team to confirm which data can be historically downloaded.

# Available Reports

The following reports are available for the PaySafecard integration and will provide the necessary data for a successful integration with Congrify. Please ensure that you select these reports as a minimum when configuring your PaySafecard connection:

- Balance Report
- Balance Reconciliation Report
- Payout Report
- Payout Reconciliation Report
- Transaction webhooks

# Webhook's integration

To ensure we receive all your transactional events, please follow the steps below to configure your webhooks with Stripe.
Important: If you have integrated Stripe via the Stripe App Marketplace flow, configuring webhooks is not necessary. In such cases, please contact our support team for assistance.

1. In the Stripe Dashboard, navigate to the bottom left corner and click on "Developers". ​
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config1.png)

Alternatively: Use the search bar to search for "webhooks" and click on Event destinations.​
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config2.png)
2. Click on “Add destination”
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config3.png)
3. Select your account and API version, then locate the event groups listed below.
- Charge
- File 
- Payment intent
- Payout
- Radar
- Refund
- Reporting

Within each event group, select all associated events to ensure comprehensive monitoring of transactional activities. For a detailed list of event types, refer to Stripe's Types of events documentation.
![Alt text](https://docs.congrify.com/Images/Stipe_webhooks_config8.png)

4. ​After selecting all events within each group, you should have a total of 34 events selected. This comprehensive selection ensures that your webhook endpoint receives all relevant transactional events from Stripe.​
![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config9.png)
![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config10.png)

5. Then Select "webhook endpoint"
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config5.png)
6. Enter the URL from the receiving Congrify endpoint. The endpoint structure should https://tech.prod.aws.congrify.com/webhooks-v2/stripe/{YOUR-MERCHANT-ID}. You can find it in the "Connections" page in Congrify UI under "Stripe" -> "Add provider" at the bottom of the pop-up screen
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config6.png)
7. Click on "Create destination". Get you signing key for the webhooks by clicking on "Reveal", copy it and enter in the corresponding field in the Congrify UI, Connnections page for Stripe (below the webhooks enpoint link)
    ![Alt text](https://docs.congrify.com/Images/Stripe_webhooks_config7.png)
8. ​After completing the previous steps, retrieve your Stripe webhook endpoint's Signing Secret Key and enter it into Congrify's Stripe connection settings to finalize the setup. This key is essential for verifying the authenticity of incoming webhooks from Stripe. To locate the Signing Secret Key:​
 - In your Stripe Dashboard, navigate to the Developers section and select Webhooks.​
 - Click on the webhook endpoint you've configured.​
 - In the Signing secret section, click Reveal to view your secret key.
