WeFact API versie 2.4.0



Facturen

Facturen zijn te beheren via de controller 'invoice'.



partpayment

Middels deze functie kunt u een deelbetaling verwerken bij een factuur. Indien de deelbetaling overeenkomt met het openstaande bedrag wordt de factuur naar status 'Betaald' (= 4) gezet. Deze functie is niet bruikbaar bij een conceptfactuur.
Voorbeeldbestand: /voorbeelden/invoice/invoice.partpayment.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een factuur
InvoiceCode string Het factuurnummer
AmountPaid float Bedrag reeds ontvangen
PayDate date Datum van ontvangst deelbetaling
PaymentMethod string Betaalmethode van de deelbetaling, zie variabelen-lijst
Standaard: bankoverschrijving
Verplichte velden:Identifier of InvoiceCode en AmountPaid

Voorbeeld invoer:
$parameters = [
    "InvoiceCode" => "F0001",
    "AmountPaid" => 25
];

$api->sendRequest('invoice', 'partpayment', $parameters);

Voorbeeld uitvoer:
Array
(
    [controller] => invoice
    [action] => partpayment
    [status] => success
    [date] => 2019-12-01T14:05:21+02:00
    [success] => Array
        (
            [0] => Deelbetaling factuur F0001 is verwerkt
        )

    [invoice] => Array
        (
            [Identifier] => 1
            [InvoiceCode] => F0001
            [Debtor] => 1
            [DebtorCode] => DB10000
            [Status] => 3
            [SubStatus] => 
            [Date] => 2019-10-22
            [Term] => 14
            [PayBefore] => 2019-11-05
            [PaymentURL] => https://www.mijnwefact.nl/betalen/?payment=F0001&key=93b25cc2790e07493c6aea9a12c59335&aid=...
            [AmountExcl] => 229.64
            [AmountTax] => 48.22
            [AmountIncl] => 277.86
            [AmountPaid] => 25.00
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [ReferenceNumber] => 
            [CompanyName] => Jan Janssen B.V.
            [Initials] => Jan
            [SurName] => Janssen
            [Sex] => m
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@example.com
            [InvoiceMethod] => 0
            [SentDate] => 2019-12-01 00:00:00
            [Sent] => 1
            [Reminders] => 0
            [ReminderDate] => 
            [Summations] => 0
            [SummationDate] => 
            [Authorisation] => no
            [PaymentMethod] => wire
            [PayDate] => 
            [TransactionID] => 
            [LanguageCode] => nl_nl
            [Currency] => EUR
            [Description] => 
            [Comment] => 
            [InvoiceLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Date] => 2019-10-22
                            [Number] => 2
                            [NumberSuffix] =>  
                            [ProductCode] => P0001
                            [Description] => Werkzaamheden gebaseerd op uurtarief
                            [PriceExcl] => 100
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [1] => Array
                        (
                            [Identifier] => 2
                            [Date] => 2019-10-22
                            [Number] => 155
                            [NumberSuffix] => km
                            [ProductCode] => P0002
                            [Description] => Reiskosten à € 0,19 per km
                            [PriceExcl] => 0.19
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [2] => Array
                        (
                            [Identifier] => 3
                            [Date] => 2019-10-22
                            [Number] => 1
                            [NumberSuffix] =>  
                            [ProductCode] => P0002
                            [Description] => Reiskosten à € 0,19 per km
                            [PriceExcl] => 0.19
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                )

            [Created] => 2019-12-01 13:05:21
            [Modified] => 2019-12-01 13:05:21
            [VatShift] => no
            [Translations] => Array
                (
                    [Status] => Deels betaald
                    [Country] => Nederland
                    [InvoiceMethod] => Per e-mail
                    [PaymentMethod] => Bankoverschrijving
                    [LanguageLabel] => Nederlands
                )

        )

)