# Stripe.js Charge Payment Error

**URL:** <https://forum.bubble.io/t/stripe-js-charge-payment-error/20437>\
**Category:** Plugins\
**Created:** [November 14, 2017, 10:32pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437 "2017-11-14T22:32:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgnldbrks](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rgnldbrks/32/29268_2.png) [@rgnldbrks](https://forum.bubble.io/u/rgnldbrks)\
**Post date:** [November 14, 2017, 10:32pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/1 "2017-11-14T22:32:13Z")

</div>

Has anyone else gotten this message using the Stripe.js plugin?

"You have passed a blank string for ‘source’'. You should remove the ‘source’ parameter from your request or supply a non-blank value." ![18 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/8/f8c38026367fecde89682e6d89edc3511604374d.png)

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [November 15, 2017, 5:19am UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/2 "2017-11-15T05:19:52Z")

</div>

Hey @rgnldbrks,

Whenever you’re charging a payment, the origin of the funds must come from one of many options called Sources. Depending on your platform and user experience, a charge Source could things like a card token or a customer card. Take advantage of Bubble’s Debugger when previewing your site and Logs in your Bubble Editor to see what data is or isn’t being sent. Feel free to reach out to **[plugins@cobubble.com](http://mailto:plugins@cobubble.com)** anytime! 🙂

---

<div class="post-metadata">

**Author:** ![rgnldbrks](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rgnldbrks/32/29268_2.png) [@rgnldbrks](https://forum.bubble.io/u/rgnldbrks)\
**Post date:** [November 15, 2017, 6:14am UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/3 "2017-11-15T06:14:07Z")

</div>

Thanks for the reply. Bubble’s debugger returns this error: “Error: Expected a string, but got a number”

 ![25 AM](https://us1.discourse-cdn.com/bubble/original/3X/7/3/73124d3b0692133a839fb2be75ab0707eec887f2.png) ![09 AM](https://us1.discourse-cdn.com/bubble/original/3X/0/5/059e8d760e5fb1b82965f07ec8e587187c92dd13.png)

---

<div class="post-metadata">

**Author:** ![rgnldbrks](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rgnldbrks/32/29268_2.png) [@rgnldbrks](https://forum.bubble.io/u/rgnldbrks)\
**Post date:** [November 16, 2017, 4:31pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/4 "2017-11-16T16:31:41Z")

</div>

The error doesn’t seem to effect payments being processed.

---

<div class="post-metadata">

**Author:** ![MattN](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattn/32/100743_2.png) [@MattN](https://forum.bubble.io/u/MattN)\
**Post date:** [January 25, 2018, 2:11pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/5 "2018-01-25T14:11:17Z")

</div>

I’m also getting this error (in dev mode), even though payments are being successfully charged via Stripe.

![image](https://us1.discourse-cdn.com/bubble/original/3X/8/b/8b89f2a433bb480061118b29b4b50bfc75a52553.png)

This is only the case when the ‘Charge payment’ action is the same workflow as the ‘Convert card into Stripe token’ action. There is no error when action is triggered by ‘A stripe token for a card has been created’ workflow.

It’s a bit odd. If anyone has an explanation I’m all ears.

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/philip/32/17830_2.png) [@philip](https://forum.bubble.io/u/philip)\
**Post date:** [January 25, 2018, 4:41pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/6 "2018-01-25T16:41:09Z")

</div>

I’m using v1.6.1 and am not encountering errors when testing transactions. Maybe try rolling the plugin back to a previous version (currently 1.6.3) and testing at different stages. Make sure your Stripe API version is up-to-date by checking this page [https://dashboard.stripe.com/account/apikeys](https://dashboard.stripe.com/account/apikeys)

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [January 25, 2018, 4:43pm UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/7 "2018-01-25T16:43:33Z")

</div>

Hey @MattN,

You should only be charging after tokenization has completed, which can be checked by the _A Stripe token has been created_ event. It’s always better practice to wait for an action to finish than assume it will at a certain time.

By the way, it’s always a good idea to ping the plugin developer to see if there’s any reported bugs or general considerations to be aware about. Give us a shout at **[plugins@cobubble.com](mailto:plugins@cobubble.com)**.

Thanks for feeding back @philip! 🙂

---

<div class="post-metadata">

**Author:** ![MattN](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mattn/32/100743_2.png) [@MattN](https://forum.bubble.io/u/MattN)\
**Post date:** [January 26, 2018, 10:59am UTC](https://forum.bubble.io/t/stripe-js-charge-payment-error/20437/8 "2018-01-26T10:59:35Z")

</div>

Got it, thanks for the feedback guys.
