API SDK Documentação - Sessions
import { Malga } from 'malga' const malga = new Malga({ apiKey: '17a64c8f-a387-4682-bdd8-d280493715e0', clientId: 'd1d2b51a-0446-432a-b055-034518c2660e', }) await malga.sessions.create({ merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1', amount: 100, dueDate: '2023-12-31T03:00:00.000Z', name: 'Link de Pagamento', paymentMethods: [ { paymentType: 'credit', installments: 1 }, { paymentType: 'drip' }, { paymentType: 'nupay' }, { paymentType: 'pix', expiresIn: 3600 }, { paymentType: 'boleto', expiresDate: '2023-12-31' }, ], items: [ { name: 'Produto 1', unitPrice: 100, quantity: 1, }, ], })
{ 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 }, { paymentType: 'nupay', delayToAutoCancel: null, orderUrl: null, returnUrl: null, cancelUrl: null }, ], createdAt: '2023-01-31T00:00:00.000Z', updatedAt: '2023-01-31T00:00:00.000Z', publicKey: 'b8d59a73-fd16-4d6b-9e0f-9d7b2a8a7e6d', }
Show Parâmetros de cartão de crédito
credit
Show Parâmetros de PIX
pix
Show Parâmetros de boleto
boleto
Show Parâmetros do interest
Show Parâmetros de Drip
drip
Show Parâmetros de NuPay
nupay
Show Parâmetros de items
Was this page helpful?