Stripe - collect cc info & charge a customer

(Alicia) #1

I am confused re: how to collect credit card info and charge a new customer.

Creating a new customer seems straight forward -

But how can I easily collect credit card info to pass to stripe?

If it helps for info - I am also using typeform.

Any help is appreciated!

Thanks!

(Sarah Palombo) #2

Hi Alicia, :wave: You can’t ask for payment details inside your bot. Instead, you could use messengers webview to direct the user to a payment page which handles the payment. I think stripe offer payments forms so that could be where you redirect the user to. ?
Sarah

(Anders Eidergard) #3

I’m facing a similar situation but running my bot in an iFrame on our website.

Ideally I would like to run Stripe’s Checkout functionality (or some other way ofc) within the bot itself.
Basically showing this button

when clicked this little form is shown

From what I’ve been reading in these forums that doesn’t seem possible right now but what I’m not really clear on is what to do instead.
You mentioned using messengers webview, but since I’m on my own website what do I do instead?

For now I’ve added a Card with a link to another page on my site but is that the way to go?
Can I pass data to that page with the information I’ve collected so far from the user? How?

Would be real nice with some assistance.
Thanks in advance!
/Anders

(Daniel Beckett) #4

Hi Anders,

Unfortunately there’s no web view option available for the Web Messenger so the method you’re currently using is pretty much the only way to handle it currently.

You could look into adding additional functionality by working directly with the Stripe API through the Webhooks & HTTP service.

(Anders Eidergard) #5

Can I use the API somehow and listen to what’s happening in the bot?
That way I could have my stripe-checkout on the parent page and could have it show up at a specific point in the bot-flow.

I’ve tried to get the API working using your example but so far no success on that front.
There’s nothing showing up in the console no matter what I do.
The embedding itself works and the speech bubble shows up, but nothing more.

Is there a specific location where the script should go? I put everything just before the /body tag but nothing seems to happen.

(Daniel Beckett) #6

The only real way you could get updates back from Stripe would be by having a webhook trigger setup for one of your flows to capture webhooks from Stripe. Unfortunately I can’t really give specifics on what is/isn’t possible as this is all custom API requests and not directly supported in the Flow XO platform itself.

(Anders Eidergard) #7

But listening to events and getting data back out of the flow and into the parent webpage where the bot is embedded.
How does that work?

I can’t get your API example to work unfortunately.

(Steven Booth) #8

Hey all - This is another arising use case which is really powerful.

The most sublime way to handle payments with Stripe is to build the web view - So the bot knows when a payment has been made successfully and can alter the conversation as such.

We’d be happy at Autosermo to build this out for anyone that’s interested, you can reach me on Messenger at https://www.messenger.com/t/steven.booth.3133 if you’d like to discuss further

:+1: