Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.malga.io/llms.txt

Use this file to discover all available pages before exploring further.

Busque uma sessão pelo seu ID.

Método

import { Malga } from "malga";

const malga = new Malga({
  apiKey: "17a64c8f-a387-4682-bdd8-d280493715e0",
  clientId: "d1d2b51a-0446-432a-b055-034518c2660e",
});

await malga.sessions.find("bbc9d986-b65e-48fe-b879-2e1df10aea87");
{
  id: 'bbc9d986-b65e-48fe-b879-2e1df10aea87',
  name: 'Link de Pagamento',
  status: 'created',
  isActive: true,
  clientId: 'd1d2b51a-0446-432a-b055-034518c2660e',
  orderId: null,
  amount: 100,
  currency: 'BRL',
  capture: null,
  merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1',
  dueDate: '2023-12-31T03:00:00.000Z',
  description: null,
  statementDescriptor: null,
  items: [
    {
      name: 'Produto 1',
      description: null,
      unitPrice: 100,
      quantity: 1,
      tangible: null
    }
  ],
  paymentLink: '',
  paymentMethods: [
    {
      paymentType: 'pix',
      expiresIn: 500
    },
    {
      paymentType: 'credit',
      installments: 1,
      recurrence: null
    },
    {
      paymentType: 'boleto',
      expiresDate: '2023-12-31T00:00:00.000Z',
      instructions: null
    },
    {
      paymentType: 'drip',
      successRedirectUrl: null,
      cancelRedirectUrl: null
    }
  ],
  createdAt: '2023-01-31T00:00:00.000Z',
  updatedAt: '2023-01-31T00:00:00.000Z',
  publicKey: 'b8d59a73-fd16-4d6b-9e0f-9d7b2a8a7e6d',
  multiplePayments: {
    allow: true,
    maxPayments: 5,
    paymentCount: 0,
    pendingCount: 0,
    status: 'active'
  },
}

Parâmetros

Lista de todos os parâmetros suportados pelo método.
id
uuid
required
ID da Sessão