Skip to main content
Best answer

Handling nested response from Stripe with Zapier webhook


I am trying to do a simple function to retrieve Stripe balance on an hourly basis.  The Zapier integration doesn’t have this feature, so I am using a combination of Zapier Schedule and Zapier Webhook.

According to stripe, the command is simple:

 

curl https://api.stripe.com/v1/balance \ -u sk_test_your_key:


I am successfully querying and authenticating with stripe, but the Zapier error is:

 

Results list {"object": "balance", "available": [{"amount": 0, "currency": "usd", "source_types": {"card": 0}}], is malformed. A results list must hold children that are objects like [{key: value}]. We found "object" though.

Obviously, I can see that the nested values amount, currency, and source_types are causing it fits.

How do I overcome this error?

Best answer by SamBBest answer by SamB

Just wanted to follow up here as I noticed that @mebrandon reached out to our Support Team who identified that the data in the Key field of the Webhook step is what had caused the “Results list…is malformed” error.

Clearing the selected value from the Key field got rid of the error. Marking this as closed as the error no longer exists for them. :)

View original
Did this topic help you find an answer to your question?
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

GetUWired
Forum|alt.badge.img+12
  • Zapier Expert
  • 1030 replies
  • July 14, 2021

It seems not all webhooks return data that Zapier can process… https://zapier.com/help/doc/common-problems-with-webhooks#webhook-not-returning-results-for-next-steps 

It may be necessary to build a custom zapier integration (https://developer.zapier.com/) or to make your request in a code block where you will have greater control. 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7472 replies
  • Answer
  • September 13, 2021

Just wanted to follow up here as I noticed that @mebrandon reached out to our Support Team who identified that the data in the Key field of the Webhook step is what had caused the “Results list…is malformed” error.

Clearing the selected value from the Key field got rid of the error. Marking this as closed as the error no longer exists for them. :)