payactive v1.0.7
Payactive API Client
This is a client for the Payactive API. It is a wrapper around the API that makes it easier to use with Node/TS-Node projects.
Installation
npm install payactive
Usage
Check out the API documentation for more information about the API.
import { DebitorsApi, SEPAMandatesApi, InvoiceApi, PaymentsApi } from 'payactive';
const apiKey = "...";
const debitorsApi = new DebitorsApi(apiKey);
const sepaMandatesApi = new SEPAMandatesApi(apiKey);
const invoicesApi = new InvoiceApi(apiKey);
const paymentsApi = new PaymentsApi(apiKey);
const debitor = await debitorsApi.createDebitor({
address: {
street: "PLatz der Republik",
houseNumber: "1",
city: "Berlin",
country: "DE",
zipCode: "11011"
},
companyName: "Test Company",
emailAddress: "test@example.com",
firstName: "Max",
lastName: "Mustermann",
});
console.log(debitor);
const mandate = await sepaMandatesApi.createSepaMandateForDebtor({
debitorId: debitor.id,
iban: "DE89370400440532013000",
bic: "COBADEFFXXX",
signatureDate: (new Date()).toISOString(),
});
const invoice = await invoicesApi.createInvoice({
debitorId: debitor.id,
creditorBankAccountId: "...",
positions: [{
description: "Test",
price: 100,
quantity: 1,
taxRate: {
rate: 19,
description: "19% MwSt."
}
}]
});
const finalizedInvoice = await invoicesApi.finalizeInvoice(invoice.id);
const payment = await paymantsApi.getPayment(finalizedInvoice.data.paymentId!);
console.log(payment);
License
Copyright (C) 2023 Audoora GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.