#nepotist84
1 messages ยท Page 1 of 1 (latest)
Hi there!
Hello!
Indeed the request you shared has an empty body
Can you share the code you are using to make the API call?
response = await this.axiosInstance.post(
/customers/${stripeCustomerId}/funding_instructions,
{
funding_type: 'bank_transfer',
bank_transfer: {
eu_bank_transfer: {
country: 'DE'
},
type: 'eu_bank_transfer'
},
currency: 'eur'
},
{
auth: {
username: this.stripeToken,
password: ''
},
headers: { 'content-type': 'application/x-www-form-urlencoded' }
}
)
Why aren't you using our SDK?
It says in the funding_instructions docs that this method isn't included for node.js
We use the SDK everywhere else, we LOVE the SDK ๐
Looking into this
Awesome, thanks!
I have a teammate logging on to take over while I run to an appointment.
Hi I am taking over for Nepotist as he has to go ๐
Julian is the Dev actually writing this code ๐
Hi, we're still looking. Please give me a moment.
No problem. thanks for looking!
I am not sure if axios actually send this as the JSON request body or as the query parameters. It needs to be in the query.
From my understanding we currently sending it in the request body. So I should use the query parameters instead?
I have a log of the failed request which shows the data like
config: { url: '/customers/cus_P0gul3u0DdI416/funding_instructions', method: 'post', data: '{"funding_type":"bank_transfer","bank_transfer":{"eu_bank_transfer":{"country":"DE"},"type":"eu_bank_transfer"},"currency":"eur"}',
and data should be the request body
found a solution to send the request using query parameter. Testing it now
Yeah, but that's not an final request, but some intermediary structure.
I see the query parameters in the request now: req_6dTcgoZ3cHZiwO
seems like I need to get the format of bank_transfer correct.
The bank_transfer parameter is a string, not an object.
Yes. I think I can figure out the rest from here on out ๐ Thanks for you help!
Happy to help.