# 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FfuVOms85L8mDqcJpwbvX%2FSCR-20250116-jfv-2.png?alt=media&#x26;token=168b38b9-94ca-4a5b-ae92-3e87e0e47ddb" 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FiAp3Awa1JgyHTMGbjrUQ%2FSCR-20250116-ew9-2.png?alt=media&#x26;token=6ad7e91d-ac19-4a7e-ac62-3e7c5d697eb9" 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FiAp3Awa1JgyHTMGbjrUQ%2FSCR-20250116-ew9-2.png?alt=media&#x26;token=6ad7e91d-ac19-4a7e-ac62-3e7c5d697eb9" 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2F6dBFTkyDRLwVaKt6XXPq%2Fimage.png?alt=media&#x26;token=38571446-2d61-453c-a6e8-ae43266d908d" 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FG3kusgBenXHpG1Qie5Yd%2Fimage.png?alt=media&#x26;token=8c64a517-7b10-4911-a1d4-94e756e5a50c" 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="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FNfzLyxHRWjAPJDipcaQj%2FSCR-20250116-lvl.png?alt=media&#x26;token=18ed651b-0c7b-4572-94d5-4bef9aa22000" alt=""><figcaption></figcaption></figure>
```

Click **Save**.

## Session Settings

<figure><img src="https://3963923104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxDloOn8rXTBChTmzNkgG%2Fuploads%2FczxKVWaueZtoMlZxISH1%2FSCR-20250728-djr-2.png?alt=media&#x26;token=89966fcd-a5a5-441e-b6ef-730c55f2e2b0" alt=""><figcaption></figcaption></figure>

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

## Permissions

Continue to set [permissions](https://fast-track-digital.gitbook.io/paytram-documentation/initial-setup/permissions-all-gateways)&#x20;
