Produtos

Buscar Produto

GET/v1/products/:id
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Autenticação

bearerAuthorizationstring · header · obrigatório

Envie no header:

Authorization: Bearer {{token}}

Path Parameters

NameTypeRequiredDescription
idstringRequiredId

Retorna todos os detalhes de um produto específico, incluindo preço e configurações.

Consultar produto

const url = 'https://sandbox.validapay.com.br/v1/products/:id';

const options = {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer {{token}}'
  },
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Response Examples

200200
{
  "productId": "prod_xxx",
  "name": "Plano Premium",
  "prices": [
    {
      "priceId": "price_xxx",
      "amount": 99.9
    }
  ]
}
404404
{
  "code": "PRODUCT_NOT_FOUND"
}