Answer the question
In order to leave comments, you need to log in
How to pass json through a form?
hello how to pass json data through form?
[email protected]:~$ curl -X POST "https://edge.qiwi.com/sinap/api/v2/terms/1963/payments" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer YUu2qw048gtdsvlk3iu" \
-d '{
"id":"21131343",
"sum":{
"amount":1000,
"currency":"643"
},
"paymentMethod":{
"type":"Account",
"accountId":"643"
},
"fields": {
"account":"4256********1231"
}
}'
Answer the question
In order to leave comments, you need to log in
Only through JS you can send json, so there is no way in this case if the api does not allow cross-domain requests.
And so you need to make such requests from the backend, in the same place the key transmits your secret for authorization, or do you want to give it to the world along with the wallet?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question