Best answer

Is it possible to to process a payment from a Webhook and JS Scripting block?

  • 20 April 2020
  • 2 replies
  • 1717 views

Userlevel 2

Assuming that I want to use Zapier for my MVP, I’m trying to figure out if I can use a scripting block zap and then send a webhook with raw payment data to Stripe, even if requires several steps to tokenize and verify.

A webhook/http request with the data should be able to do the same thing in theory, I just don’t want to sink more time into seeing if its possible than I would just building out a solution with Node and Stripe.js.

icon

Best answer by TimS 21 April 2020, 01:51

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +3

Hi DataBass,

 

Tim here from Zapier Support, happy to help! 

 

Yes, this would be possible to do in a Webhook by Zapier and/or Code by Zapier Steps. You should be able to send the information over to Stripe in a single request because their API uses Basic Auth via an API Key: https://stripe.com/docs/api/authentication

One caveat, just in case you happen to be working on a Teams plan or with other team members - this would require you to save your API key as plain text inside of the Zap. That’s fine if you’re the only one accessing the data, but if you’re working with others, it’s something to keep in mind. 

You could also use our free developer platform to set up a custom private integration. One of the advantages being that when you enter your API key for Stripe, it would be encrypted and hidden inside the Account Connection for your custom integration. 

Setting up an integration would also make it easier for you to set up multiple Zaps with the same functionality if needed.

If you wanted to use Stripe.js inside of Zapier, you could also import that into your custom integration if you use the CLI Command Line Interface. It can’t be imported into a Code Step. 

You can learn more about the Developer Platform here: https://zapier.com/platform

 

Hope this helps!

Userlevel 2

Thank you! That’s exactly what I was hoping to hear. Much appreciated!