#Rodrigo (Tookyer)

1 messages ยท Page 1 of 1 (latest)

low lanceBOT
junior dove
#

Hi there!

#

What is your quesiton?

#

@ashen elk here

ashen elk
#

Oh

#

sorry!

#

I am sending it to stripe

#

But i receive it

junior dove
ashen elk
#

understood, can you give me an example of this body sending name and email?

junior dove
#

I know nothing about the tool you are using to make API requests, but it says "body type: JSON" in your screenshot, which won't work with Stripe.

ashen elk
#

no problem! I will try it here. I am using bubble.io api connector to do it.

#

Worked! Thanks ๐Ÿ™‚

craggy fulcrum
#

@ashen elk I have re-opened this thread

ashen elk
#

Thank you Pompy!

#

i am trying to send the address fields but it dont work

#

When i send name and email, it works well, but with the address i receive the error 400

craggy fulcrum
#

Can you show me the request body you are sending when you get that error?

ashen elk
#

Yah!

#

This is the full requisition

craggy fulcrum
#

Oh gotcha

#

Looking in to this. I forget the syntax with Postman, I think it should be the same for cURL

ashen elk
#

I think so hehe

#

there i am using this requisition

#

with the same problem, when i remove the address, it works well

#

i think the problem are the structure of the child field

#

using json, it's like:

{
{"address":
{"address.country":"BR",}
}
}

#

but I dont know how to translate it into a url-enconded

craggy fulcrum
#

Yeah. I rmemver knowing how to do that at a point. Can you try address[country]? I think that is the syntax somewhere

ashen elk
#

sure, gimme a sec

#

same error =/

craggy fulcrum
#

Interesting because that worked for me in my test.

  -d description="Test Customer" \
  -d address[country]="US"```
ashen elk
#

hum... let check here

craggy fulcrum
#

Oh wait that error message is different though!

#

It is saying it recognized the key but not the value

ashen elk
#

worked hehehe

craggy fulcrum
#

Nice

#

Not sure why that is happening in postman like that though

ashen elk
#

one ";"

#

haha

#

ever are the the ; or the :

#

thank you Pompey!

craggy fulcrum
#

Glad I could help!

ashen elk
#

Pompey, last question...

#

do you know how i set the "preferred_locales" on the requisition?

#

preferred_locales=pt-BR;

#

I tried it, but didnt worked

craggy fulcrum
#

Can you try preferred_locales[]

#

It is supposed to be an array, the error is about how you are directly passing a value

ashen elk
#

nice, 1 sec

#

didnt work =/

#

with empty value, returns the same error

forest vapor
#

Hi ๐Ÿ‘‹
It looks like the array is still incorrectly formatted.

#

I'm not certain how to do it in Postman

ashen elk
#

Hello Snufkin!

#

Humm...

forest vapor
#

But can you share the request ID so I can check what the arguments came to our API looking like?

ashen elk
#

i am using the parameters like this: address[state]=SP;

#

sure

#

sorry,

#

this is the correct

forest vapor
#

The problem is you are passing the parameter as an object. This is what our API got {pt-BR: "pt-BR"}

#

Try just preferred_locales[] in the key

#

You are currently using preferred_locales[pt-BR] which is why it is sent to our API as an key: value object instead of an array

ashen elk
#

great, i will try here

#

worked Snufkin, thank you for your help!

forest vapor
#

Happy we could get it worked out ๐Ÿ™Œ