# Stripe

{% embed url="<https://www.youtube.com/watch?v=11PfBBB_Yck>" %}

## Global Settings

You can integrate and set up **Stripe** to the Cost Calculator in the Payments of the **Global settings**. To do this, go to **Global Settings >Payments> Card Payments** and click **Apply to all calculators** to apply settings to all calculators.

And here you can see **Stripe**:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2F9XYztAjdghBKZXRcpO3Q%2Fpayments%206.jpg?alt=media&#x26;token=ff574cba-a942-41d2-9e2c-a91ac19e7143" alt=""><figcaption></figcaption></figure>

After clicking on **Setup,** these settings will come up:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FJCOlw2t4hWMrkxrRx9e9%2Fpayments%207.jpg?alt=media&#x26;token=b89d829c-3af2-4bf4-a0a8-bb7ae7b36034" alt=""><figcaption></figcaption></figure>

**Public key** - A publishable key that can be found on the API keys page in the Developers Dashboard.

**Secret Key** - A secret key that can be found on the API keys page in the Developers Dashboard.

**Currency** - Put the currency you want to get payments in.

## Settings in the Calculator

You can also set up **Stripe** to the Cost Calculator in the **Payments** section of Individual settings. To do this, go to the **Settings** tab of the calculator you want and head over to the **Card Payment** of the **Payments** section. There will be **Stripe**:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2F18IzQn7ylA230zwDwdiH%2Fpayments%208.jpg?alt=media&#x26;token=2c41835c-b862-4642-901a-9f7a8ff22301" alt=""><figcaption></figcaption></figure>

After enabling **Stripe** and clicking on **Setup,** these settings will come up:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FJCOlw2t4hWMrkxrRx9e9%2Fpayments%207.jpg?alt=media&#x26;token=b89d829c-3af2-4bf4-a0a8-bb7ae7b36034" alt=""><figcaption></figcaption></figure>

**Public key** - A publishable key that can be found on the API keys page in the Developers Dashboard.

**Secret Key** - A secret key that can be found on the API keys page in the Developers Dashboard.

**Currency** - Put the currency you want to get payments in.

**Total Field Element** - It is a feature at the end of the Payments section that lets you choose one or some Total fields(Formula elements) you want to show or hide.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FHZgVcC6Zv5wPj5ZjagPP%2Fpayments%209.jpg?alt=media&#x26;token=34bcd36c-fd52-4184-8ad4-8a9623e6eccf" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When "**Apply for all calculators**" is enabled in the Global settings, it will be applied for all created calculators, and there will be a notice when you edit the individual settings of the certain calculator.&#x20;
{% endhint %}

## How to find and add Public and Secret keys from Stripe?

First, you need a Stripe account on the[ Stripe official website](https://stripe.com/). To get the keys, log in to the **Stripe** website. After logging in to your profile, you can see the necessary keys from your **Dashboard**. To get the test mode key, follow **Dashboard > Get your test API keys**, and to get the live mode keys, go to **Dashboard > Get your live API keys**.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2F868M6L0lRwgErHmVZ5BP%2Fstripe%208.png?alt=media&#x26;token=b505db6d-8dad-46ad-ab00-c978947b7b3e" alt=""><figcaption></figcaption></figure>

Next, copy your **Publishable and Secret Keys** and paste them into the Public key and Secret key fields:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FgcJPyCGvXgkwJpPqo3BX%2Fpayments%207.jpg?alt=media&#x26;token=b9a07d21-b5e3-4fb3-b740-cfd6e2a25b67" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Take note: If you use and add the keys for the test mode, users won’t be able to complete the purchase. The test mode is only for testing your integration without making actual charges or payments. Read here more about the test mode and live mode in [Stripe’s documentation](https://stripe.com/docs/keys#test-live-modes).
{% endhint %}

## Cases when you have several Formula elements

You can set up the order to hide one or some Total fields(Formula elements) to get payment for your services or products.

1. For example, you make Christmas advent calendars and let your customers choose how many days they want to gift someone. They can select 7 days, 10 days, 2 weeks or a month(30 days). When calculating the Cost of the gift, the VAT( Value-added tax) is not included in the Total cost.  <br>

You can enable only the Total cost to be added to the Stripe orders.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FqD7pZrbvo5l6KS7NSQyf%2Fpayments%2010.jpg?alt=media&#x26;token=8e0100c4-8900-4be2-94e3-ad94bdc4e214" alt=""><figcaption></figcaption></figure>

Here is how your users will see it:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2Fj1KFUJoW9qVhnODArbgy%2Fstripe4.png?alt=media&#x26;token=49f3cda4-c22e-4ca8-b8e2-cb5c1bfec8cc" alt=""><figcaption></figcaption></figure>

2. There is another example with the Jewelry shop. Your customers can choose the metal types, and options available for each card, adding a card and special package. They can choose whether they will pick up their order or get their package delivered. <br>

You can set up Stripe to show only the Total cost of the delivery if they decide to choose the delivery.

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FQL51pnAj1ga9jvXLtfpS%2Fpayments%2011.jpg?alt=media&#x26;token=ee5b4384-164e-4487-a690-96bff947c61b" alt=""><figcaption></figcaption></figure>

That is how their order will look:

<figure><img src="https://834137925-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDTO7zmTA5-HpvK8JDA%2Fuploads%2FAoBonyIlPKk1ZCra0amO%2Fstripe%207.png?alt=media&#x26;token=4f9e4dfa-a769-4a98-a2ed-68ce2475a27c" alt=""><figcaption></figcaption></figure>
