API SDK Documentação - Charges
import { Malga } from 'malga' const malga = new Malga({ apiKey: '17a64c8f-a387-4682-bdd8-d280493715e0', clientId: 'd1d2b51a-0446-432a-b055-034518c2660e', }) await malga.charges.create({ merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1', customerId: '2c48166b-51fe-4d8d-a450-1385df8a95b9', amount: 100, paymentMethod: { type: 'boleto' }, })
{ id: 'e09ef791-1aaa-4b11-8173-698f2689a04d', clientId: 'd1d2b51a-0446-432a-b055-034518c2660e', merchantId: '8cfef0d1-73af-4bdb-b6c4-09ad3fbfc7f1', description: null, orderId: null, providerReferenceKey: null, createdAt: '2023-12-31T18:19:44.993Z', amount: 100, originalAmount: 100, currency: 'BRL', statementDescriptor: null, capture: false, isDispute: false, status: 'pending', paymentMethod: { paymentType: 'boleto', barcodeData: '1111 2222 3333 4444', barcodeImageUrl: 'https://malga.io', }, paymentSource: { sourceType: 'customer', customerId: '2c48166b-51fe-4d8d-a450-1385df8a95b9', }, transactionRequests: [ { id: 'a6cc6bda-3f6d-4277-8ea2-e4bbd9166f16', createdAt: '2023-12-31T18:19:45.013Z', updatedAt: '2023-12-31T18:19:45.044Z', idempotencyKey: '3b42ede3-15a8-4d81-b6e9-54c5762776c6', providerId: '694f7eee-2966-4825-a847-65d070cbdece', providerType: 'SANDBOX', transactionId: '18242a4d-dd35-475f-b79b-5cbe8f9d1fea', amount: 100, authorizationCode: null, authorizationNsu: null, requestStatus: 'success', requestType: 'pending', responseTs: '11ms', boleto: { expiresDate: null, barcodeData: '1111 2222 3333 4444', barcodeImageUrl: 'https://malga.io', } } ], appInfo: null }
Show Parâmetros do paymentMethod
boleto
Show Parâmetros do interest
Show Parâmetros do customer
Show Parâmetros do document
Show Parâmetros do address
Show Parâmetros do splitRules
Show Parâmetros do fares
Show Parâmetros do paymentFlow
Show Parâmetros do appInfo
Show Parâmetros do device
Show Parâmetros do system
Was this page helpful?