> For the complete documentation index, see [llms.txt](https://fast-track-digital.gitbook.io/paytram-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fast-track-digital.gitbook.io/paytram-documentation/initial-setup/stripe.md).

# Stripe

In this step you will  create two **External credentials**, and  create two Named credentials.

{% hint style="warning" %}
Important: When creating your credentials, use the exact spelling and capitalization indicated and follow the credential creation and Flow run in order.
{% endhint %}

## Retrieve or create your API keys from the Gateway

You will need your publishable and secret keys from Stripe. You can find it on <https://dashboard.stripe.com/developers> in the API tab. Copy these to a separate document so you can reference them in a later step.

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

### External Credentials

To create the credential:

1. Navigate to Setup > Named Credentials.
2. Click the External Credentials tab.
3. Click New.
4. Enter the following values:
5. Label and Name: noauth
6. Authentication Protocol: No Authentication
7. Click Save.&#x20;
8. In the credential record, scroll down to locate the Principals section and click New to create a new Principal record.<br>

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

Add the following values:

1. Parameter name: noauth
2. Sequence Number: 1
3. Click Save

### Create a second External credential

1. Click New.
2. Enter the following values:
3. Label and Name: stripeExternal
4. Authentication Protocol: Custom
5. Click Save.&#x20;
6. In the credential record, scroll down to locate the Principals section and click New to create a new Principal record.<br>

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

Add the following values:

1. Parameter name: keys
2. Sequence Number: 1

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdczYbDh1qKpoPTuGEG-lzdVkvK4QpyZeU8fwmoJ9_wuiskN9JFwQwEr0d-haaxdvbE8DYIW4lNoRN8g2dJ6Kv1kTZoajFzM1MOGmANknPr4-5NWxM1cdOK_tn8t5NGyKeUTf2LMCAx0TjoTrbCDQY?key=esorVVMR3D62PAiYn8TVv7VL" alt=""><figcaption></figcaption></figure>

Under the Authentication Parameters section, Click Add to add a Parameter

* Parameter name: publishableKey
* Value: Your Publishable Key

Click Add again to add a 2nd Paramater

* Parameter name: secretKey
* Value: Your Secret Key

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

Click **Save**

### Named Credentials

From Setup, navigate to Named Credentials.&#x20;

In the Named Credentials tab:

1. Click New and complete the following field values:
2. 1. Label and Name: ‘stripe’.
   2. URL field: <https://api.stripe.com/v1/>
   3. Enabled for Callouts: true.
   4. For the External Credential, select the ‘noauth’ credential you previously created.
   5. Select all Callout Options.
   6. Allowed Namespaces for Callouts: ‘paytram’.<br>

      <figure><img src="/files/PSs0fuRHQzPa6ie5iigc" alt=""><figcaption></figcaption></figure>
3. Click Save.&#x20;

### Add a Custom Header

1. Click New
2. Name= Authorization
3. Value= Bearer {your secret key (same as above)}
4. Sequence Number 1
5. Click Save

#### Now create the second Named credential.&#x20;

From the Named Credentials tab:

1. Click New and complete the following fields:
2.

```
1. Label and Name: ‘stripePaytram’
```

```
2. URL: https://gateway.paytram.io
3. Enable for Callouts: true
4. For the External Credential, select the ‘stripeExternal’ external credential you previously created.
5. Select all Callout Options.
6. Allowed Namespaces for Callouts: ‘paytram’.<br>

<figure><img src="/files/xWotNcIGcVtCcZvwHEHR" alt=""><figcaption></figcaption></figure>
```

Click **Save**.

## Session Settings

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

Ensure that the the 2 highlighted fields in Session Settings are **NOT CHECKED**

## Permissions

Continue to set [permissions](/paytram-documentation/initial-setup/permissions-all-gateways.md)&#x20;
