We hope to have a Stripe add-on available in the future, for now you can accept Stripe payments from forms using the guide below.
Step 1
Add an HTML element to the form, and in the settings for it enter the following code as the content.
1 2 3 4 5 6 7 | <div class="quform-label"> <label class="quform-label-text" for="card-element">Credit or debit card<span class="quform-required">*</span></label> </div> <div id="card-element" class="quform-field-text" style="padding: 12px 8px;"></div> <div id="card-errors" role="alert" style="color:#c73412;"></div> <input type="hidden" id="stripe_payment_method_id" name="stripe_payment_method_id"> <input type="hidden" id="stripe_payment_intent_id" name="stripe_payment_intent_id"> |
<div class="quform-label"> <label class="quform-label-text" for="card-element">Credit or debit card<span class="quform-required">*</span></label> </div> <div id="card-element" class="quform-field-text" style="padding: 12px 8px;"></div> <div id="card-errors" role="alert" style="color:#c73412;"></div> <input type="hidden" id="stripe_payment_method_id" name="stripe_payment_method_id"> <input type="hidden" id="stripe_payment_intent_id" name="stripe_payment_intent_id">
Step 2
Download the quform-stripe plugin zip file. Unzip the file and open the quform-stripe/quform-stripe.php file in a text editor, then make the following changes.
- On line 9, replace the number
1
with the form ID - On line 33, replace
sk_test_key
with your Stripe Secret key (get it from https://dashboard.stripe.com/account/apikeys) - On line 40, replace
2000
with the amount to charge in the currency’s smallest unit (e.g. cents) - On line 41, replace
usd
with the currency code (see https://stripe.com/docs/currencies) - On line 42, replace
Example product
the description for this charge - On lines 48 and 50, replace
1_3
with the Email element unique ID (to associate the customer email address with the payment) - On line 86, replace
pk_test_key
with your Stripe Publishable key (get it from https://dashboard.stripe.com/account/apikeys)
Finally, upload the quform-stripe folder to the web server at wp-content/plugins then go to the Plugins page within WordPress and activate the plugin Quform Stripe.
Show legacy instructions
These legacy instructions use the Card element with Tokens, which do not support Strong Customer Authentication or 3D Secure.
Step 1
Add an HTML element to the form, and in the settings for it enter the following code as the content.
1 2 3 4 5 6 | <div class="quform-label"> <label class="quform-label-text" for="card-element">Credit or debit card<span class="quform-required">*</span></label> </div> <div id="card-element" style="padding: 12px 8px; border: 1px solid #e3e3e3;"></div> <div id="card-errors" role="alert" style="color:#c73412;"></div> <input type="hidden" id="stripeToken" name="stripeToken"> |
<div class="quform-label"> <label class="quform-label-text" for="card-element">Credit or debit card<span class="quform-required">*</span></label> </div> <div id="card-element" style="padding: 12px 8px; border: 1px solid #e3e3e3;"></div> <div id="card-errors" role="alert" style="color:#c73412;"></div> <input type="hidden" id="stripeToken" name="stripeToken">
Step 2
Download the quform-stripe plugin zip file. Unzip the file and open the quform-stripe/quform-stripe.php file in a text editor, then make the following changes.
- On line 9, replace the number
1
with the form ID - On line 33, replace
sk_test_key
with your Stripe Secret key (get it from https://dashboard.stripe.com/account/apikeys) - On line 36, replace
2000
with the amount to charge in the currency’s smallest unit (e.g. cents) - On line 37, replace
usd
with the currency code (see https://stripe.com/docs/currencies) - On line 38, replace
Example product
the description for this charge - On line 41, replace
1_3
with the Email element unique ID (to associate the customer email address with the payment) - On line 62, replace
pk_test_key
with your Stripe Publishable key (get it from https://dashboard.stripe.com/account/apikeys)
Finally, upload the quform-stripe folder to the web server at wp-content/plugins then go to the Plugins page within WordPress and activate the plugin Quform Stripe.