Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
La API de Coinbase Commerce devuelve un error 400 porque se requiere "pricing_type"
const query = { name: 'The Sovereign Individual', description: 'Mastering the Transition to the Information Age', local_price: { amount: '100.00', currency: 'USD', }, pricing_type: 'fixed_price', metadata: { customer_id: 'id_1005', customer_name: 'Satoshi Nakamoto', }, redirect_url: 'https://charge/completed/page', cancel_url: 'https://charge/canceled/page', }; const opts = { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CC-Api-Key': 'api_key', 'X-CC-Version': '2018-03-22', }, body: JSON.stringify({ query }), }; fetch('https://api.commerce.coinbase.com/charges', opts) .then(res => res.json()) .then(jsonRes => console.log(jsonRes));

y la respuesta es esta

 error:{ message: "Required parameter missing: pricing_type" type: "invalid_request" }

pero pasé el parámetro pricing_type como puede ver, pero sigo recibiendo un error 400 con la solicitud de respuesta no válida

quien tiene una idea de como puedo solucionar esto

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

body: JSON.stringify({query})

creo que debería ser

 body: JSON.stringify(query)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!