Charge FAQs

What is the Stripe TLS update?

Stripe is dropping support for older versions of security protocols TLS 1.0, TLS 1.1, and SHA-1 which are insecure and have been updated to TLS 1.2.

Charge 2 is compatible with TLS 1.2.

A full explanation is available here.

What are the server requirements?

Charge versions greater than 1.10.0 will require servers to be running PHP 5.3 or newer.

$form.get(...).submit is not a function

Why am I getting a javascript error "$form.get(...).submit is not a function"?

This happens when you give your submit button or some other element on your page/form an ID of "submit". Change your ID tag to something else like "submitBtn" or "submit_button" and it that error should go away!

You must supply either a card, customer, pii data, or bank account to create a token.

Why am I getting the error "You must supply either a card, customer, pii data, or bank account to create a token."

You are either missing or have incorrect tag names for the Stripe "data-stripe" tags. The tag names are different than the Charge field names. A list of the Stripe tag names can be found on the Stripe website.

The {card_years} {year} tag is returning the same year over and over.

ExpressionEngine is overriding the Charge {year} tag. Use the tag {year_long} or {year_short} instead.

Why are no credit card errors showing up on my form?

Make sure you have the {exp:charge:error_info} tag somewhere on your payment form. Errors from Stripe are NOT included in the {have_errors} and {errors} {error_message} {/errors} tags in the {exp:charge:form} tag.

How do I fix "502 Bad Gateway" errors in nginx?

Nginx has very conservative memory limits and this is often the cause of 502 Bad Gateway errors.  Even if most of your site works fine, any page that requires a bit of extra processing power may push it over the edge and throw a 502 Bad Gateway error.

Disclaimer: We are not server admins. The following information is provided as helpful suggestions for debugging only. Please check with your qualified server admin before implementing these changes on your production server.

We have had success using the following nginx config values to increase the memory allotted:

server {
   // Add this inside your server block
   proxy_buffer_size 128k;
   proxy_buffers 4 256k;
   proxy_busy_buffers_size 256k;
   fastcgi_buffers 16 16k;
   fastcgi_buffer_size 32k;

   location ~\.php$ {
         // Add this inside your location php block
         fastcgi_buffers 16 16k;
         fastcgi_buffer_size 32k;
   }
}

Can I manually add/modify/remove a customer's Charge subscription?

No. You cannot manually change a customer's subscription in any way.

Charge relies on Stripe's webhooks to handle subscription management. If you were to manually adjust a customer's subscription, it would break the link between Charge and Stripe for that customer.

We are looking into options for offering manual subscription adjustment but do not have an estimated release date at this time.

Have a question?

Documentation and FAQ not answering your questions? Drop us an email! We'll help you out.