Hey tribe, has anyone here worked with <Gumroad’s ...
# tribe
l
Hey tribe, has anyone here worked with Gumroad’s ping service? I am getting the webhook hit at my end but not receiving any data in the
body
of the request. It is always:
{}
(I am using nodejs + express). I am wondering if it is working like it is supposed to or if I am doing something wrong. (I have tried making trial card purchases and even real purchases, but not getting any data sent over). Thanks.
h
Hmm, I've done this before. I think it might be a middleware issue. Sharing a link in a bit.
b
It is probably working like it should.. can’t imagine the amount of support tickets otherwise. 🙈 Set the webhook URL to one from webhook.site and see if you get the data there first. That way you’ll know if your code is the problem or something else.
h
Not at my computer but I think you need all 3 things on lines 7, 8, and 9. https://github.com/railwayapp/starters/blob/master/examples/expressjs/src/index.ts
l
Yes. I think it is. Just checking. Thanks @bitter-salesclerk-57109 @helpful-raincoat-87337 I was assuming them to send a
JSON
payload — but I feel it might be a
form
payload. Will update in a bit once I have tested.
👍 2
Yep. That was it.
form
vs
json
payload. It was
form
and adding the
Copy code
app.use(express.urlencoded())
enables your API to handle
form
input. Thanks again @helpful-raincoat-87337 @bitter-salesclerk-57109 🙌
b
What are you selling btw?
l
@bitter-salesclerk-57109 Ah .. Software 😬 Too early to share more details. Will share once I feel more confident of it all working.
👍 2
b
Good luck!
🙏 1