Last updated: Dec 3, 2018

paymentForm

The paymentForm tag will Output your Stripe Form with a single line of code. Pass the handle of your Stripe Payment Form as parameter:

{{ craft.enupalStripe.paymentForm('handle') }}

Options #

Additionally, you can pass the following options to the paymentForm variable. These options are only available for one-time payment forms.

  • quantity
  • amount
  • calculateFinalAmount

The calculateFinalAmount setting is enabled by default so if you pass false, we don't calculate quantity * amount as the final amount, you can apply any discount to the amount that you want to charge and will override the amount saved in your Stripe Payment Form

{% set options = {amount: 99.99, quantity: 2, calculateFinalAmount: false} %}

{{ craft.enupalstripe.paymentForm('handle', options) }}

Tiered Plans #

For plans with Tiered Pricing, you need to pass the quantity and Stripe Payments will calculate and charge the final amount.

{{ craft.enupalstripe.paymentForm('handle', {quantity: 20}) }}