Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

86
Visualizações
checkout for a single Product with productId commercejs

if i capture the order in commercejs i need to provide ´line_items´ with the item_id as key. But I dont have an item_id (item_xyz0123) i just have an product id (prod_xyz123). is there an way to capture the order without implemting the whole cart logig?

This is my code so far:

res = await commerce.checkout.capture(token.id, {
        line_items: {
           item_0919893978: {quantity: 1} // i dont want this, because i have not a cart 
        customer: {
          firstname: "John",
          lastname: "Doe",
          email: "john.doe@example.com",
        },
        payment: {
          gateway: "test_gateway",
          card: {
            number: "4242424242424242",
            expiry_month: "02",
            expiry_year: "24",
            cvc: "123",
            postal_zip_code: "94107",
          },
        },
      });
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda