Stripe.js Charge Payment Error

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

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 anytime! :slight_smile:

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

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

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

image

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.

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

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.

Thanks for feeding back @philip! :slight_smile:

Got it, thanks for the feedback guys.