#nepotist84

1 messages ยท Page 1 of 1 (latest)

timber prawnBOT
quick wedge
#

Hi there!

rapid parcel
#

Hello!

quick wedge
#

Indeed the request you shared has an empty body

#

Can you share the code you are using to make the API call?

rapid parcel
#

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' }
}
)

quick wedge
#

Why aren't you using our SDK?

rapid parcel
#

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 ๐Ÿ˜„

quick wedge
#

Looking into this

rapid parcel
#

Awesome, thanks!

#

I have a teammate logging on to take over while I run to an appointment.

pseudo plover
#

Hi I am taking over for Nepotist as he has to go ๐Ÿ™‚

rapid parcel
#

Julian is the Dev actually writing this code ๐Ÿ˜„

elder gyro
#

Hi, we're still looking. Please give me a moment.

rapid parcel
#

No problem. thanks for looking!

elder gyro
#

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.

pseudo plover
#

From my understanding we currently sending it in the request body. So I should use the query parameters instead?

elder gyro
#

Correct.

#

Are you able to print the outgoing requests?

pseudo plover
#

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

elder gyro
#

Yeah, but that's not an final request, but some intermediary structure.

pseudo plover
#

I see the query parameters in the request now: req_6dTcgoZ3cHZiwO

seems like I need to get the format of bank_transfer correct.

elder gyro
#

The bank_transfer parameter is a string, not an object.

pseudo plover
#

Yes. I think I can figure out the rest from here on out ๐Ÿ™‚ Thanks for you help!

elder gyro
#

Happy to help.