<p>Like this:</p>

<pre><code>{% if cart.paymentMethod.class == 'Stripe' %}
    {{ cart.paymentMethod.settings.publishableKey }}
{% endif %}
</code></pre>

CC BY-SA 3.0
2018-01-24T16:03:32.603Z
Thanks. Works like a charm. Is this documented somewhere?
outline4
CC BY-SA 3.0
2018-01-25T08:58:33.100Z
I'm not sure. I just checked the payment method model + the database.
Fred Carlsen
CC BY-SA 3.0
2018-01-24T11:50:36.937Z
2018-01-24T11:50:36.937Z
Fred Carlsen
<p>I would like to know how I can output Craft Commerces Stripes Publishable Key, which I define under Payment Methods, in a template? </p>

<p>The value I set is settings[publishableKey].</p>

<p>Thanks<br>
Stefan </p>

<plugin-craftcommerce>
How I can output Craft Commerces Stripes Publishable Key in a template
# How I can output Craft Commerces Stripes Publishable Key in a template

(Asked by: username_0 on 2018-01-24)

I would like to know how I can output Craft Commerces Stripes Publishable Key, which I define under Payment Methods, in a template?

The value I set is settings[publishableKey].

Thanks  
Stefan

**Tags:** plugin-craftcommerce


---

## 1 answers

### Answer by username_1 on 2018-01-24. Score: 1 | Accepted answer

Like this:
{% if cart.paymentMethod.class == 'Stripe' %}
    {{ cart.paymentMethod.settings.publishableKey }}
{% endif %}

> **Comments:**
> **username_0**: Thanks. Works like a charm. Is this documented somewhere?  
> **username_1**: I'm not sure. I just checked the payment method model + the database.  

---

