Answers.Body: <p>I could be wrong here as I've not used subscriptions with Commerce yet, but using the filter <code>|currency</code> worked perfectly for me when outputting the correct format after having tried <code>|replace</code> and <code>|number</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T14:22:46.633Z
Answers.Text: I thought that might have worked, but sadly it still just output `£30,000.00` :(
Answers.UserDisplayName: Jason Mayo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T11:17:50.517Z
Answers.LastActivityDate: 2018-10-08T11:17:50.517Z
Answers.UserDisplayName: fbnntt
Answers.Body: <p>Stripe <a href="https://stripe.com/docs/api#balance_transaction_object-amount" rel="nofollow noreferrer">stores the amount in cents</a>. If you want to format it from the <code>subscriptionPlanData.plan.amount</code> variable in your template you would need to divide by 100 first.</p>
  
  <pre><code>{{ (subscriptionPlanData.plan.amount / 100)|currency }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-12T00:18:46.630Z
Answers.LastActivityDate: 2018-10-12T00:18:46.630Z
Answers.UserDisplayName: Stephen Bowling
Body: <p>We've currently got Subscriptions setup on a site which works a charm, but my main issue is outputting the price of the subscription, after the user has subscribed.</p>
  
  <p>From the docs/templates I can even see how this is possible?! </p>
  
  <p>You can get it via:</p>
  
  <pre><code>{% set subscriptions = craft.subscriptions.user(currentUser) %}
  
  {% for subscription in subscriptions %}
      {{ subscriptionPlanData.plan.amount }}
  {% endfor %}
  </code></pre>
  
  <p>But if for example, the plan is <code>£300.00</code> then it outputs as <code>30000</code> and when formatted, it comes out like <code>30,000.00</code> using <code>{{ subscriptionPlanData.plan.amount|number_format(2, '.', ',') }}</code></p>
  
  <p>I can't see anyway of showing the user, how much they've paid in a human format without hacking around the number.</p>
  
Tags: <plugin-craftcommerce><plugin-craftcommerce2>
Title: Commerce 2 Subscription Prices
ThreadText: # Commerce 2 Subscription Prices
  
  (Asked by: username_0 on 2018-10-08)
  
  We've currently got Subscriptions setup on a site which works a charm, but my main issue is outputting the price of the subscription, after the user has subscribed.
  
  From the docs/templates I can even see how this is possible?!
  
  You can get it via:
  
  ```
  {% set subscriptions = craft.subscriptions.user(currentUser) %}
  
  {% for subscription in subscriptions %}
      {{ subscriptionPlanData.plan.amount }}
  {% endfor %}
  
  ```
  
  But if for example, the plan is `£300.00` then it outputs as `30000` and when formatted, it comes out like `30,000.00` using `{{ subscriptionPlanData.plan.amount|number_format(2, '.', ',') }}`
  
  I can't see anyway of showing the user, how much they've paid in a human format without hacking around the number.
  
  **Tags:** plugin-craftcommerce, plugin-craftcommerce2
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-10-12. Score: 4 | Accepted answer
  
  Stripe [stores the amount in cents](https://stripe.com/docs/api#balance_transaction_object-amount). If you want to format it from the `subscriptionPlanData.plan.amount` variable in your template you would need to divide by 100 first.
  
  ```
  {{ (subscriptionPlanData.plan.amount / 100)|currency }}
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2018-10-08. Score: 2
  
  I could be wrong here as I've not used subscriptions with Commerce yet, but using the filter `|currency` worked perfectly for me when outputting the correct format after having tried `|replace` and `|number`.
  
  > **Comments:**
  > **username_0**: I thought that might have worked, but sadly it still just output `£30,000.00` :(  
  
  ---
  
  