DX STF Client API

<back to all web services

AddSettlement

Settlement Requests

Settlement

Requires Authentication
The following routes are available for this service:
POST/api/settlementAdd new Settlement
"use strict";
export class TokenDto {
    /** @param {{token?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    token;
}
export class DocumentIdentification {
    /** @param {{identifier?:string,type?:string,creationDateAndTime?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    identifier;
    /** @type {string} */
    type;
    /** @type {string} */
    creationDateAndTime;
}
export class Identifier {
    /** @param {{authority?:string,text?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    authority;
    /** @type {string} */
    text;
}
export class ContactInformation {
    constructor(init) { Object.assign(this, init) }
}
export class Partner {
    /** @param {{identifier?:Identifier,contactInformation?:ContactInformation[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Identifier} */
    identifier;
    /** @type {ContactInformation[]} */
    contactInformation = [];
}
export class Header {
    /** @param {{documentIdentification?:DocumentIdentification,sender?:Partner,receiver?:Partner}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DocumentIdentification} */
    documentIdentification;
    /** @type {Partner} */
    sender;
    /** @type {Partner} */
    receiver;
}
/** @typedef {'ADD'|'CHANGE_BY_REFRESH'|'DELETE'|'REJECTED'} */
export var DocumentAction;
(function (DocumentAction) {
    DocumentAction["ADD"] = "ADD"
    DocumentAction["CHANGE_BY_REFRESH"] = "CHANGE_BY_REFRESH"
    DocumentAction["DELETE"] = "DELETE"
    DocumentAction["REJECTED"] = "REJECTED"
})(DocumentAction || (DocumentAction = {}));
/** @typedef {'ADDITIONAL_TRANSMISSION'|'COPY'|'ORIGINAL'} */
export var DocumentStatus;
(function (DocumentStatus) {
    DocumentStatus["ADDITIONAL_TRANSMISSION"] = "ADDITIONAL_TRANSMISSION"
    DocumentStatus["COPY"] = "COPY"
    DocumentStatus["ORIGINAL"] = "ORIGINAL"
})(DocumentStatus || (DocumentStatus = {}));
export class AvpList {
    /** @param {{code?:string,value?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    code;
    /** @type {string} */
    value;
}
export class BaseDocument {
    /** @param {{currencyCode?:string,creationDateTime?:string,documentActionCode?:DocumentAction,documentStatusCode?:DocumentStatus,documentStructureVersion?:string,lastUpdateDateTime?:string,revisionNumber?:number,avpList?:AvpList[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    currencyCode;
    /** @type {string} */
    creationDateTime;
    /** @type {DocumentAction} */
    documentActionCode;
    /** @type {DocumentStatus} */
    documentStatusCode;
    /** @type {string} */
    documentStructureVersion;
    /** @type {?string} */
    lastUpdateDateTime;
    /** @type {?number} */
    revisionNumber;
    /** @type {AvpList[]} */
    avpList = [];
}
export class PaymentMethod {
    /** @param {{automatedClearingHousePaymentFormat?:string,paymentMethodCode?:string,paymentMethodIdentification?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    automatedClearingHousePaymentFormat;
    /** @type {string} */
    paymentMethodCode;
    /** @type {string} */
    paymentMethodIdentification;
}
export class Ecom_PartyIdentificationType {
    /** @param {{gln?:string,name?:string,additionalPartyIdentification?:AvpList[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    gln;
    /** @type {string} */
    name;
    /** @type {AvpList[]} */
    additionalPartyIdentification = [];
}
export class CommunicationChannel {
    /** @param {{communicationChannelCode?:string,communicationChannelName?:string,communicationValue?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    communicationChannelCode;
    /** @type {string} */
    communicationChannelName;
    /** @type {string} */
    communicationValue;
}
export class Contact {
    /** @param {{contactTypeCode?:string,personName?:string,departmentName?:string,jobTitle?:string,responsibility?:string,communicationChannel?:CommunicationChannel[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    contactTypeCode;
    /** @type {string} */
    personName;
    /** @type {string} */
    departmentName;
    /** @type {string} */
    jobTitle;
    /** @type {string} */
    responsibility;
    /** @type {CommunicationChannel[]} */
    communicationChannel = [];
}
export class Address {
    /** @param {{streetAddressOne?:string,streetAddressTwo?:string,streetAddressThree?:string,city?:string,postalCode?:string,provinceCode?:string,countryCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    streetAddressOne;
    /** @type {string} */
    streetAddressTwo;
    /** @type {string} */
    streetAddressThree;
    /** @type {string} */
    city;
    /** @type {string} */
    postalCode;
    /** @type {string} */
    provinceCode;
    /** @type {string} */
    countryCode;
}
export class FinancialRoutingNumber {
    /** @param {{number?:string,numberTypeCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    number;
    /** @type {string} */
    numberTypeCode;
}
export class FinancialAccount {
    /** @param {{number?:string,numberTypeCode?:string,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    number;
    /** @type {string} */
    numberTypeCode;
    /** @type {string} */
    name;
}
export class FinancialInstitutionInformation {
    /** @param {{financialInstitutionBranchName?:string,financialInstitutionName?:string,financialRoutingNumber?:FinancialRoutingNumber,financialAccount?:FinancialAccount,swiftCode?:string,exportersCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    financialInstitutionBranchName;
    /** @type {string} */
    financialInstitutionName;
    /** @type {FinancialRoutingNumber} */
    financialRoutingNumber;
    /** @type {FinancialAccount} */
    financialAccount;
    /** @type {string} */
    swiftCode;
    /** @type {string} */
    exportersCode;
}
export class TransactionalParty extends Ecom_PartyIdentificationType {
    /** @param {{contact?:Contact[],address?:Address,communicationChannel?:AvpList[],financialInstitutionInformation?:FinancialInstitutionInformation,dutyFeeTaxRegistration?:string,entityIdentification?:string,gln?:string,name?:string,additionalPartyIdentification?:AvpList[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {Contact[]} */
    contact = [];
    /** @type {Address} */
    address;
    /** @type {AvpList[]} */
    communicationChannel = [];
    /** @type {FinancialInstitutionInformation} */
    financialInstitutionInformation;
    /** @type {string} */
    dutyFeeTaxRegistration;
    /** @type {string} */
    entityIdentification;
}
export class DocumentReference {
    /** @param {{creationDateTime?:string,revisionNumber?:number,lineItemNumber?:number,entityIdentification?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    creationDateTime;
    /** @type {?number} */
    revisionNumber;
    /** @type {?number} */
    lineItemNumber;
    /** @type {string} */
    entityIdentification;
}
export class TransactionalReference extends DocumentReference {
    /** @param {{transactionalReferenceTypeCode?:string,creationDateTime?:string,revisionNumber?:number,lineItemNumber?:number,entityIdentification?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    transactionalReferenceTypeCode;
}
export class SettlementAdjustment {
    /** @param {{adjustmentAmount?:number,financialAdjusmentReasonPartyRoleCode?:string,financialAdjustmentReasonCode?:string,transactionalReference?:TransactionalReference}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    adjustmentAmount;
    /** @type {string} */
    financialAdjusmentReasonPartyRoleCode;
    /** @type {string} */
    financialAdjustmentReasonCode;
    /** @type {TransactionalReference} */
    transactionalReference;
}
export class ContentOwner {
    /** @param {{gln?:string,additionalPartyIdentification?:AvpList[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    gln;
    /** @type {AvpList[]} */
    additionalPartyIdentification = [];
}
export class InvoiceDocumentReference extends DocumentReference {
    /** @param {{invoiceTypeCode?:string,contentOwner?:ContentOwner,creationDateTime?:string,revisionNumber?:number,lineItemNumber?:number,entityIdentification?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    invoiceTypeCode;
    /** @type {ContentOwner} */
    contentOwner;
}
export class Ecom_PartyIdentification {
    /** @param {{additionalPartyIdentification?:AvpList[],gln?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {AvpList[]} */
    additionalPartyIdentification = [];
    /** @type {string} */
    gln;
}
export class SettlementParty extends Ecom_PartyIdentification {
    /** @param {{partyRoleCode?:string,additionalPartyIdentification?:AvpList[],gln?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    partyRoleCode;
}
export class SettlementLineItem {
    /** @param {{amountPaid?:number,lineItemNumber?:number,originalAmount?:number,settlementAdjustment?:SettlementAdjustment[],avpList?:AvpList,debitCreditAdvice?:DocumentReference,invoice?:InvoiceDocumentReference,requestForPayment?:DocumentReference,settlementParty?:SettlementParty[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    amountPaid;
    /** @type {number} */
    lineItemNumber;
    /** @type {?number} */
    originalAmount;
    /** @type {SettlementAdjustment[]} */
    settlementAdjustment = [];
    /** @type {AvpList} */
    avpList;
    /** @type {DocumentReference} */
    debitCreditAdvice;
    /** @type {InvoiceDocumentReference} */
    invoice;
    /** @type {DocumentReference} */
    requestForPayment;
    /** @type {SettlementParty[]} */
    settlementParty = [];
}
export class SettlementExtensionLineItem {
    /** @param {{number?:number,documentType?:string,documentNumber?:string,itemText?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    number;
    /** @type {string} */
    documentType;
    /** @type {string} */
    documentNumber;
    /** @type {string} */
    itemText;
}
export class AdjustmentAndDiscountSummary {
    /** @param {{amountTotal?:number,amountNett?:number,amountVat?:number,reasonMessage?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    amountTotal;
    /** @type {number} */
    amountNett;
    /** @type {number} */
    amountVat;
    /** @type {string} */
    reasonMessage;
}
export class TotalAmountSplit {
    /** @param {{amountTotal?:number,amountNett?:number,amountVat?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    amountTotal;
    /** @type {number} */
    amountNett;
    /** @type {number} */
    amountVat;
}
export class SettlementExtension {
    /** @param {{settlementExtensionLineItem?:SettlementExtensionLineItem[],adjustmentAndDiscountSummary?:AdjustmentAndDiscountSummary[],totalAmountSplit?:TotalAmountSplit}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {SettlementExtensionLineItem[]} */
    settlementExtensionLineItem = [];
    /** @type {AdjustmentAndDiscountSummary[]} */
    adjustmentAndDiscountSummary = [];
    /** @type {TotalAmountSplit} */
    totalAmountSplit;
}
export class Settlement extends BaseDocument {
    /** @param {{batchIdentification?:string,paymentEffectiveDate?:string,settlementCurrency?:string,settlementHandlingTypeCode?:string,totalAmount?:number,paymentMethod?:PaymentMethod,payee?:TransactionalParty,payer?:TransactionalParty,remitTo?:TransactionalParty,settlementIdentification?:string,settlementLineItem?:SettlementLineItem[],extension?:SettlementExtension,currencyCode?:string,creationDateTime?:string,documentActionCode?:DocumentAction,documentStatusCode?:DocumentStatus,documentStructureVersion?:string,lastUpdateDateTime?:string,revisionNumber?:number,avpList?:AvpList[]}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    batchIdentification;
    /** @type {string} */
    paymentEffectiveDate;
    /** @type {string} */
    settlementCurrency;
    /** @type {string} */
    settlementHandlingTypeCode;
    /** @type {?number} */
    totalAmount;
    /** @type {PaymentMethod} */
    paymentMethod;
    /** @type {TransactionalParty} */
    payee;
    /** @type {TransactionalParty} */
    payer;
    /** @type {TransactionalParty} */
    remitTo;
    /** @type {string} */
    settlementIdentification;
    /** @type {SettlementLineItem[]} */
    settlementLineItem = [];
    /** @type {SettlementExtension} */
    extension;
}
export class SettlementMessage {
    /** @param {{header?:Header,settlement?:Settlement}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Header} */
    header;
    /** @type {Settlement} */
    settlement;
}
export class AddSettlement {
    /** @param {{settlement?:SettlementMessage}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {SettlementMessage}
     * @description Settlement model containing all of the Settlement data */
    settlement;
}

JavaScript AddSettlement DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/settlement HTTP/1.1 
Host: stf-api-uat.data-xchange.co.za 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"settlement":{"header":{"documentIdentification":{"identifier":"String","type":"String"},"sender":{"identifier":{"authority":"String","text":"String"},"contactInformation":[{}]},"receiver":{"identifier":{"authority":"String","text":"String"},"contactInformation":[{}]}},"settlement":{"batchIdentification":"String","settlementCurrency":"String","settlementHandlingTypeCode":"String","totalAmount":0,"paymentMethod":{"automatedClearingHousePaymentFormat":"String","paymentMethodCode":"String","paymentMethodIdentification":"String"},"payee":{"contact":[{"contactTypeCode":"String","personName":"String","departmentName":"String","jobTitle":"String","responsibility":"String","communicationChannel":[{"communicationChannelCode":"String","communicationChannelName":"String","communicationValue":"String"}]}],"address":{"streetAddressOne":"String","streetAddressTwo":"String","streetAddressThree":"String","city":"String","postalCode":"String","provinceCode":"String","countryCode":"String"},"communicationChannel":[{"code":"String","value":"String"}],"financialInstitutionInformation":{"financialInstitutionBranchName":"String","financialInstitutionName":"String","financialRoutingNumber":{"number":"String","numberTypeCode":"String"},"financialAccount":{"number":"String","numberTypeCode":"String","name":"String"},"swiftCode":"String","exportersCode":"String"},"dutyFeeTaxRegistration":"String","entityIdentification":"String","gln":"String","name":"String","additionalPartyIdentification":[{"code":"String","value":"String"}]},"payer":{"contact":[{"contactTypeCode":"String","personName":"String","departmentName":"String","jobTitle":"String","responsibility":"String","communicationChannel":[{"communicationChannelCode":"String","communicationChannelName":"String","communicationValue":"String"}]}],"address":{"streetAddressOne":"String","streetAddressTwo":"String","streetAddressThree":"String","city":"String","postalCode":"String","provinceCode":"String","countryCode":"String"},"communicationChannel":[{"code":"String","value":"String"}],"financialInstitutionInformation":{"financialInstitutionBranchName":"String","financialInstitutionName":"String","financialRoutingNumber":{"number":"String","numberTypeCode":"String"},"financialAccount":{"number":"String","numberTypeCode":"String","name":"String"},"swiftCode":"String","exportersCode":"String"},"dutyFeeTaxRegistration":"String","entityIdentification":"String","gln":"String","name":"String","additionalPartyIdentification":[{"code":"String","value":"String"}]},"remitTo":{"contact":[{"contactTypeCode":"String","personName":"String","departmentName":"String","jobTitle":"String","responsibility":"String","communicationChannel":[{"communicationChannelCode":"String","communicationChannelName":"String","communicationValue":"String"}]}],"address":{"streetAddressOne":"String","streetAddressTwo":"String","streetAddressThree":"String","city":"String","postalCode":"String","provinceCode":"String","countryCode":"String"},"communicationChannel":[{"code":"String","value":"String"}],"financialInstitutionInformation":{"financialInstitutionBranchName":"String","financialInstitutionName":"String","financialRoutingNumber":{"number":"String","numberTypeCode":"String"},"financialAccount":{"number":"String","numberTypeCode":"String","name":"String"},"swiftCode":"String","exportersCode":"String"},"dutyFeeTaxRegistration":"String","entityIdentification":"String","gln":"String","name":"String","additionalPartyIdentification":[{"code":"String","value":"String"}]},"settlementIdentification":"String","settlementLineItem":[{"amountPaid":0,"lineItemNumber":0,"originalAmount":0,"settlementAdjustment":[{"adjustmentAmount":0,"financialAdjusmentReasonPartyRoleCode":"String","financialAdjustmentReasonCode":"String","transactionalReference":{"transactionalReferenceTypeCode":"String","creationDateTime":"0001-01-01","revisionNumber":0,"lineItemNumber":0,"entityIdentification":"String"}}],"avpList":{"code":"String","value":"String"},"debitCreditAdvice":{"creationDateTime":"0001-01-01","revisionNumber":0,"lineItemNumber":0,"entityIdentification":"String"},"invoice":{"invoiceTypeCode":"String","contentOwner":{"gln":"String","additionalPartyIdentification":[{"code":"String","value":"String"}]},"creationDateTime":"0001-01-01","revisionNumber":0,"lineItemNumber":0,"entityIdentification":"String"},"requestForPayment":{"creationDateTime":"0001-01-01","revisionNumber":0,"lineItemNumber":0,"entityIdentification":"String"},"settlementParty":[{"partyRoleCode":"String","additionalPartyIdentification":[{"code":"String","value":"String"}],"gln":"String"}]}],"extension":{"settlementExtensionLineItem":[{"number":0,"documentType":"String","documentNumber":"String","itemText":"String"}],"adjustmentAndDiscountSummary":[{"amountTotal":0,"amountNett":0,"amountVat":0,"reasonMessage":"String"}],"totalAmountSplit":{"amountTotal":0,"amountNett":0,"amountVat":0}},"currencyCode":"String","documentActionCode":"ADD","documentStatusCode":"ADDITIONAL_TRANSMISSION","documentStructureVersion":"String","lastUpdateDateTime":"0001-01-01","revisionNumber":0,"avpList":[{"code":"String","value":"String"}]}}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{}