> For the complete documentation index, see [llms.txt](https://docs.omnichat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.omnichat.ai/en/features/she-ding/integrations/app-integrations/integrate-with-stripe.md).

# Integrate with Stripe

{% hint style="info" %}
Chat to order now supports payment via Stripe and Global Payment. The following explains how customers can link their Stripe account to Omnichat.
{% endhint %}

### Onboarding Flow 

1. Customers complete the purchase of the OMO Chat to Order Module or WhatsApp Commerce Module.
2. Customers can complete the Stripe account setup or use an existing Stripe account.
3. Obtain the relevant Stripe API Secret Key information and complete the setup in the Omnichat backend.
4. Complete the connection of the relevant webhooks in Stripe and complete the configuration in the Omnichat backend.

### Workflow

#### Create Stripe Account 

1. Create an account: Go to <https://dashboard.stripe.com/register> and enter email, full name, password, country and click Create account

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2F5b4vqaa4TUwFB5tzSGAY%2Fimage.png?alt=media&amp;token=9c7bf0a3-02d5-4627-9b20-225b9d569f0b" alt=""><figcaption></figcaption></figure>
2. Verification email: You will receive an email with a verification link immediately after registration. If you cannot find it, you can check your spam folder or request a resend through the Stripe backend.
3. Activate account:
   1. Once the account is created, it will be set to Sandbox Mode by default. To start receiving payments, you must first activate the account before you can switch to Live Mode.
   2. To activate your account, you will need to fill out an account application form, providing basic information such as your business details, products, and your relationship with the company.
   3. During the process, you may be asked to set up account security, and you can only start receiving payments after checking all the information and making sure everything is in order.

      <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FDx4zZXnycXRDbarpCDpV%2Fimage.png?alt=media&amp;token=20a580c6-3bc8-47dc-8260-a547a9340399" alt=""><figcaption></figcaption></figure>
4. Account verification: For most merchants, the application is approved almost instantly and they can start receiving payments immediately; if Stripe needs more information or expects the verification to take longer, they will proactively contact the customer.

   Points to note:

   * Country selection cannot be changed: Once the account is activated, the country cannot be changed. If you want to use Stripe in other supported countries, you must create a new account.
   * Taiwanese businesses cannot register directly: Stripe currently does not support direct merchant accounts in Taiwan. A common practice is to first establish a company in another country, then use that country's corporate account to receive payments and remit them back to Taiwan.

#### Setup Webhook

1. Go to <https://dashboard.stripe.com/webhooks> or find the "Developers" menu in the lower left corner of the page and select "Webhooks".

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FwMCUUtpqDCKg2bLDqm7C%2Fimage.png?alt=media&amp;token=b9f2aa98-694b-43f7-a68a-387bb4fd0b33" alt=""><figcaption></figcaption></figure>
2. Select "Create an event destination"

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FC51r2m7ooRLpEkKUDVIw%2Fimage.png?alt=media&amp;token=e8621408-edf5-4547-931d-7f117dabc2e9" alt=""><figcaption></figcaption></figure>
3. Select "Your Account" for the event destination scope.
4. Select "Snapshot" for payload style.
5. Select "2024-12-18.acacia" as the API version.

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2F7Z2TQOMK4ACAdRaZgq8U%2Fimage.png?alt=media&amp;token=dbd4c1e6-b785-4c18-96f6-5abfd4673626" alt=""><figcaption></figcaption></figure>
6. Select events:
   * Checkout (All 4 events)

     <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FJhzs9DDLNpqrvQSNzpd4%2Fimage.png?alt=media&amp;token=f07580e0-8a51-4a40-a4e2-77a92dee129a" alt=""><figcaption></figcaption></figure>
   * Charge (All 13 events)

     <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FfBCNp38XVmZt0BtUipV8%2Fimage.png?alt=media&amp;token=fe0a9723-c777-4ff5-8c6b-ea2256f9bdc1" alt=""><figcaption></figcaption></figure>
7. Choose where you want to send events, select "Webhook endpoint"

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FgtFsM0HuUlA3MvMTWPcq%2Fimage.png?alt=media&amp;token=9d892e5d-25e3-40b7-b767-dd771bf6b514" alt=""><figcaption></figcaption></figure>
8. Input the Endpoint URL: <https://payment-api.omnichat.ai/v1/webhook/stripe>

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2Fly9BTCbQMplS3VvOrAuw%2Fimage.png?alt=media&amp;token=5b66a04b-d9a4-4a33-861d-7a06c866b254" alt=""><figcaption></figcaption></figure>
9. To obtain the Signing secret: Click on the created Webhook and find the Signing secret.

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FsT5wx1AVJ2axuK7A9Pku%2Fimage.png?alt=media&amp;token=b8f4171b-b538-4881-afc0-ae2ffed0c3a2" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FBSEulKbHDPV71AKiLart%2Fimage.png?alt=media&amp;token=389786bd-b745-4295-9156-b4a47bdb9c50" alt=""><figcaption></figcaption></figure>

#### Get API Secret Key

* Go to <https://dashboard.stripe.com/apikeys> or find the "Developers" menu in the lower left corner of the page and select "API Keys".

  <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FYgsjZ3GeZNjMtWP7QEOH%2Fimage.png?alt=media&amp;token=4f44702f-1380-46e0-b30a-4fdeae65ce11" alt=""><figcaption></figcaption></figure>
* Locate Secret key

  <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2FI4PTx5omLYMgtfUjCKh0%2Fimage.png?alt=media&amp;token=925b7ac6-9ce5-493f-9570-2ce9f4c8a874" alt=""><figcaption></figcaption></figure>

#### Complete Stripe integration in Omnichat

1. Go to the Omnichat admin panel > Settings > App Integrations > Stripe, and click "Integrate".

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2Fb9QhtPPqLFw9EEVApfri%2Fimage.png?alt=media&amp;token=5f0cc76d-80e2-4ed9-abec-aabbd93c3207" alt=""><figcaption></figcaption></figure>
2. Paste the "Secret key" and "Signing secret" obtained in the previous steps and click "Submit".

   <figure><img src="https://2848678129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3u2I1osIy6mEi07X1z46%2Fuploads%2Fch5BqTogsQDCdMeB289o%2Fimage.png?alt=media&amp;token=49406bc2-71d8-4e61-a9f5-638031d9272e" alt=""><figcaption></figcaption></figure>
3. The system will automatically send the data to Stripe to check if it is filled in correctly. If the connection is successful, a "Stripe connection successful" message will pop up; if the data is incorrect, a "Stripe connection failed" message will be displayed. Please check if there is a problem with the data you entered.
