pixiSetInvoicePaid
Since pixi version: LOU Official (6.3.0.4452) Additional notes: API Call that sets entered Invoice (InvoiceNr) to paid or unpaid
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
paid | boolean | true | Set to paid =1 or unpaid =0 Type: bit Default value: Example: 0 or 1 Available from: LOU Official (6.3.0.4452) |
PaidSum | number | false | Sum that was paid. @CaptureSum in pixiPaySetInvoiceCapture; If (NULL) or =0 and @Paid=1, then completely paid Type: money Default value: NULL Example: 46.18 Available from: LOU Official - Update 46 (6.9.46.27927) |
eventID | string | false | The EventID of the payment event in Customer Account Type: varchar(3) Default value: NULL Example: MIN Available from: LOU Official (6.3.0.4452) |
PaidDate | string | false | Pay date and time when invoice is set to paid; If NULL, getdate() is used Type: datetime Default value: NULL Example: YYYY-MM-DD hh:mm:ss Available from: LOU Official (6.3.0.4452) |
InvoiceNR | string | true | Invoice number of the invoice that should be set to paid Type: varchar(20) Default value: Example: DEM0000021 Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiSetInvoicePaid>
<InvoiceNR>string</InvoiceNR>
<paid>true</paid>
<PaidDate>string</PaidDate>
<eventID>string</eventID>
<PaidSum>0</PaidSum>
</pixiSetInvoicePaid>
</Body>
</Envelope>
Response
1. Return status
Name | Type | Description |
---|---|---|
Status | string | Result of API Call Type: varchar(10) Available from: 25.06 (25.6.0.58802) |
Message | string | Extended Result of API Call Type: varchar(100) Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiSetInvoicePaidPost200TextXmlResponse>
<Status>string</Status>
<Message>string</Message>
</PixiSetInvoicePaidPost200TextXmlResponse>
HTTP Example
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
# echo -n '{{username}}:{{password}}' | base64 | pbcopy
Authorization: Basic {{token}}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://apigateway.descartes.com/tms/pixi/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:pixiSetInvoicePaid>
<paid xsi:type="xsd:boolean">0 or 1</paid> <!-- required -->
<PaidSum xsi:type="xsd:number">46.18</PaidSum>
<eventID xsi:type="xsd:string">MIN</eventID>
<PaidDate xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</PaidDate>
<InvoiceNR xsi:type="xsd:string">DEM0000021</InvoiceNR> <!-- required -->
</ns1:pixiSetInvoicePaid>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiSetInvoicePaid', [
'paid' => '0 or 1', // boolean (required)
'PaidSum' => '46.18', // number
'eventID' => 'MIN', // string
'PaidDate' => 'YYYY-MM-DD hh:mm:ss', // string
'InvoiceNR' => 'DEM0000021', // string (required)
]);
function getPixiSoapClientResponse(string $method, array $arguments = [])
{
$soapArguments = [];
foreach ($arguments as $key => $value) {
$soapArguments[] = new SoapVar($value, null, '', '', $key);
}
$soapClient = new SoapClient(null, [
'login' => '...',
'password' => '...',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
]);
return $soapClient->__call($method, $soapArguments);
}