I need to get some data from the balance transaction of Stripe, but Zapier doesn't have the ability to do that directly. I'd like to send a curl command in order to get this data. This is what Stripe provides in their docs:
$curl
https://api.stripe.com/v1/balance/history/txn_1DFV3e2fooKYlo2CdUbarQBA \
-u sk_test_5z3BDUirhsfooIUypbari76o:
I'm thinking I can use a custom request for this, but have no idea how the formatting would work for the secret key
David here, from the Zapier Platform team.
The good news is this is very straightfoward. The setup is as such:
You want to GET
a url (probably a mapped value instead of the hardcoded url you provided.
As for the auth, the -u
param in curl
is for user and takes the form username:password
. In your case, it looks like an API key. So username is the key and password is blank. Zapier lets you do the same thing, but using a bar (|
) instead.
As a general rule of thumb, any configuration you can do in curl, you can also do in Zapier webhooks. You can also use Python or js and use the included requests libraries. More info here.