You can use a Credit Card field in your forms to collect payments from users. We don't recommend collecting credit card information without an add-on to handle it securely. As a result, you won't normally see the credit card field listed with your other fields. The Credit Card field will only appear if you have the Stripe or Authorize.net AIM add-on active.
Whenever you are collecting sensitive information, you should use SSL on your site. Depending on your web host, you may be able to get free and easy SSL through Let's Encrypt. Please contact your web host for information on how to set up SSL on your site.
Standard field options
Credit Card Security
When allowing a user to enter their credit card information, you have four different options for storing the credit card information. When collecting credit card information, the CVC code (3-digit code on the back of VISA and MasterCard, and 4-digit code on the front of AMEX) will never be stored.
- Save only the last 4 digits - This will only save the last four digits of the card number, and the card's expiration date.
- Do not store the card number - This will only store the card's expiration date.
- Store the whole card number (not recommended) - This will store the whole card number, and the card's expiration date. Storing credit card numbers on your own site is not recommended, and comes with extra liability.
- Do not store or POST card values - This will only store the card's expiration. In addition to not storing the card's number or CVC, this option will also prevent those values from being sent to your server. This is the most secure option, but is not supported by every payment processor. This option is recommended when using Stripe, but it not supported with Authorize.net.
Displaying credit card information
Based on how you choose to handle the security of your credit card field, you can display your data differently. Here are examples for how your credit card information can be displayed.
- Save only the last 4 digits
- Do not store the card number.
- Store the whole card number (not recommended)
- Do not store or POST card values
Using the Credit Card field
If you would like to find out more about collecting payment, click on the add-on you are using to find out more about creating a form action to collect payment.
Related developer hooks
- Change the labels in a Credit Card field with the frm_combo_dropdown_label hook.
If you have another way of processing payments, you can enable the credit card field by adding this line to your code:
add_filter( 'frm_include_credit_card', '__return_true' );