#adam-sct
1 messages ยท Page 1 of 1 (latest)
hello Adam, that 500 error is most likely from your backend code/server, not from Stripe
Hey @grizzled umbra, yes however Im just wondering how come I dont get a 500 error with stripe.accounts.create,
well that could be for many reasons
There must be something fundamentally different about Transfers from creating an account or AccountLink, that makes it fail
well not really
first let's start here
what is the 500 error say? what is the full error object/msg
yeah so going off that error msg, there's nothign Stripe related in there right
your client-side code is having trouble talking to your Firebase function
The fetch still works with the same CORS config when I do create.stripe.account
if it was a Stripe issue, it would be something like cannot make fetch to api.stripe.com/v1/transfers for e.g.
so again, lets ignore the Stripe related things here for a second
in whatever your endpoint/cloud function for transfers is, just remove all code
and add a simple log statement like console.log("Hello Adam")
and do somethign simple like return a simple response like res.send("hello world")
(don't copy exactly what I'm saying, I'm just giving you an example)
and see if that works
again, I'm 90% certain this is a CORS issue with your code and your Firebase app, nothing to do with Stripe
yes I tried this before with the same CORS config, not changing any other code, and it Does return the response, it just did so again now with res.send({testing:true}).
stepping away but Karbi is around to help out, give us a min
But hold on im gonna step away for a few minutes
๐
Oh hello, yes so basically the endpoint is fine, and it 1) works with a basic hello world response, and 2) even when I run create.stripe.account under that endpoint.
One thing I was curious of though is, I have the create.transfers.create isolated in its own endpoint. So Im wondering how it would know what account to do the transfer From
However that might not have to do with the 500 CORS error
Lets do one thing at a time and keep focusing on the 500 error for now
So what's the current state of everything? are you still seeing the 500 CORS error when creating transfers?
Yes, confirmed I still get this 500 CORS error with transfers
Would it help at all to try a webhook for transfers? I'm just going off this 500 stripe article https://stripe.com/docs/error-handling
Confirmed that you're still seeing the error? Or confirmed that it's no longer happening?
Yes still seeing error
No error when I do res.send("hello world"), so that should mean the Endpoint /transfers is fine
No error when I create.stripe.account under that endpoint, so that should mean this error is specific to transfers
So when you put in the request to transfer, do you see any other error messages? Does the request actually go through to Stripe successfully?
Just what is in this pic, Im not sure if it reaches Stripe
Trying to look thru the discord chat history to see if others have had similar issue
Could it possibly due to the destination account not having Payouts or Transfers enabled?
Stepping away for a bit
You should check your requests in the dashboard to see if you have successful or failing transfer requests
Looking into this now
Well after checking the Dashboard
I was trying to send to a Payments Disabled account, which was giving an error
But when I transferred to tr_1K3nKcHBsyfQ9rBxsAtlwD2i (Im not sure if you can see that transaction) it worked
200 Success
So Im not sure why it would give a 500 CORS error from having the wrong destination ID for the transfer, but regardless
Issue resolved, thanks for the support, and thanks again.
๐ glad you could get it sorted!
If you have any follow-ups @hollow quail is around and can help
Okay, thanks for the support!!