I’m creating a crowd funding app and I’m trying to get the credit cards charged.
The flow of my app consists of:
Multiple users pledge an amount that they will pay and I collect their CC information, but don’t charge.
1.1. A separate record is created in a pledge data type capturing how much each user pledged to pay.
Once the item that they are committing to pay for is completed, then the users need to be charged.
I think I should use the “Charge a user using saved CC”, but I’m not sure how to setup the fields in the below screenshot and how to charge all users that have a record(s) in the pledge data type.
One option could be to authorize the charge, not just save the CC info.
If you authorize the charge, you can collect the amount using either the Stripe dashboard or an API call. You also won’t have to worry about cards being declined after you’ve collected them. Granted, you’ll need to collect them within 7 days after authorization, or they’ll drop off.
Not sure how this fits into the scope of your app, but just an option.
@emmanuel, is this something that the Bubble API could handle? Maybe loop through the Pledge table and charge each user until it finds no more records to charge?
You could schedule a workflow and have a condition on the workflow thing to see if it could actually get ran at the end of the crowdfunding period. Then, it would charge each user. There is a little bit of work but I think it’s doable.
So you think it’s possible to have it loop through the table and charge each user one-by-one? Just having a hard time figuring out how to loop and setup the “Charge a user using saved CC” with the correct parameters.
I think I may need to hire someone for this – it’s getting a little too complex for my abilities.
Not sure I see what the API connector has to do with this. You’d be using a stripe action. And the key would be the stripe key. It’s simpler than you think.
now in your main workflow when you schedule the charge you should create an action that’s called "schedule an API workflow on a list of things (see the next screenshot)
you will need to define the list of users that have to be charged. Also you need to pass the amount parameter (Which can be static or dynamic). The only thing that I’m not sure of what to pass as a user parameter here. I thought maybe we should remove it but then the charge CC action cannot refer to a user. Maybe @emmanuel could help here?
Hope this is helpful, if not feel free to let me know.
Thanks,
Levon.
Thanks Levon! I am storing all of the Amounts in another table, different from the user table – let’s call it the “pledges” table. One user could have multiple pledges for one product. So could the “List to run on” search for the sum of all pledges submitted by the user being charged?
I think it would be useful to walk through all of this on a Skype call. What do you think?
Hi Keith, seems like I figured what should be in the user parameter - it should be “this user” and yes, I guess we could sum up all the amounts for each user. I’ll send you a DM now to schedule a skype call.