Forum Documentation Showcase Pricing Learn more

Payment error with customer ID (stripe.js)


#1

Hi there

I followed step-by-step videos for setting up payments, but I’m still getting an error message:

Can someone please help?


#2

You should reach out to the plug-in creator for plug-in specific support


#3

If you followed the tutorial exactly, and you’re getting this error, then I agree you should reach out to those guys.

The error is saying that the customer ID you provided has no relationship to the card ID you provided. So either you’re referencing the wrong customer or the wrong card.


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:


#4

I’ve reached out to Stripe, Stripe.js + Bubble, and it looks like it’s an implementation problem.

The card is now being captured and in Stripe I can see the customer has been created + the card has been stored… so it’s the step of payment where I’m having an issue. I’m guessing it may have something to do with the state I created?

Here are all my screenshots:

Please help! :slight_smile:







#5

Two suggestions:

  1. First, you have a charge action where Capture Now? is set to true. That means you don’t need the following Capture action - you’re already capturing it in the charge action. I don’t know if that’s throwing things off, but you can eliminate that Capture action.

  2. Try running this with the debugger in step-by-step mode. The error is saying there is no customer with the id “cus_” which is already telling us the ID is weird… there should be many more characters in that ID. If you run this with the debugger on, you can see if that custom state is even saving any value or not. If not, the culprit is in the vicinity.


#6

It looks like it’s not saving:


#7

Oh I see what might be happening. Your actions are kind of out of order. It looks like the charge is being triggered before the token is able to finish.

Move your Charge Payment action to the orange Token has been Created workflow, after the IDs are set. Also move the Go to Page action at the very end of that workflow too.

The order should go like this:

  • Button Pay is clicked > Show alert > Convert Card to Token

  • When Token is created > Create customer > Create Card > Charge Payment: Customer ID = result of step 1’s ID. Source = result of step 2’s ID

You don’t even need the custom state because the Charge action is in the same workflow and can use the results of the previous steps.

I have to sign off for now, but let me know how this reconfiguration goes!


#8

You’re AMAZING!!! I’ll let Stripe.js know they’ll need to update their video.

Thanks soooooo much!