4D Payments SDK 2016 .NET Edition

Questions / Feedback?

FDMSSettle Component

Properties   Methods   Events   Configuration Settings   Errors  

The FDMSSettle component is used to do a Batch Settlement on all transactions that were successfully authorized with the FDMSECOMMERCE or FDMSRETAIL components. This component may also send Level 2 and Level 3 Corporate Purchasing Card data for better interchange rates.




This component connects to the First Data Merchant Services (FDMS) processor, by way of the Datawire VXN transaction transport network. Transactions originating with these components go through Datawire, to the FDMS processor where the transaction is authorized. The result is then returned back through Datawire and received by the component. This component can be integrated into web pages or stand-alone Point Of Sale applications. Because all SSL communications are handled inside the component, any application or web page can be deployed without the need for expensive dedicated SSL servers.

The FDMSSettle component is used to settle all transactions previously authorized by the FDMSECommerce or FDMSRetail component. When a transaction is authorized, money in the customer's account is blocked and tagged for the merchant. However, funds do not actually change hands at this point. When transactions are settled with the FDMSSettle component the funds are deducted from the customer's account and added to the merchant's. It is essential that the authorized transactions are properly recorded and resent later in a Batch Settlement.

Sending a Batch Settlement with this component is easy. First, you must register and activate your account with Datawire. Datawire will provide you with a MerchantNumber and MerchantTerminalNumber, but you'll need to use the FDMSRegister component to activate the merchant and receive a DatawireId. Once you acquire the DatawireId and receive your transaction URLs through Service Discovery, you may begin to authorize transactions.

To authorize a credit card, set the MerchantNumber and MerchantTerminalNumber with the values supplied by FDMS and Datawire, and the DatawireId with the value retrieved by the FDMSRegister component after activating your merchant account. Set the URL property with one of the URLs you retrieved during Service Discovery.

  FDMSSettle.MerchantNumber = "000000999990";                   'Supplied by FDMS/Datawire
  FDMSSettle.MerchantTerminalNumber = "555555";                 'Supplied by FDMS/Datawire
  FDMSSettle.DatawireId = "0000B47FFFFFFFFFFFFF";               'Retrieved with the FDMSRegister component.
  FDMSSettle.URL = "https://staging1.datawire.net/sd/";         'Retrieved with the FDMSRegister component.

Additionally, set the IndustryType and the BatchSequenceNumber.

  FDMSSettle.IndustryType = itDirectMarketing
  FDMSSettle.BatchSequenceNumber = "4127"  

At this point, you are ready to add transactions to the batch settlement. Each transaction to be settled must be added to the DetailRecords collection;. The XML aggregates for transactions are returned from the FDMSRetail, FDMSECommerce, or FDMSDetailRecord component's GetDetailAggregate method.

  FDMSSettle.DetailRecords.Add(new FDMSRecordType(FDMSEcommerce.GetDetailAggregate()));

Finally, call the SendSettlement method.


If the settlement is successful, the BatchStatus will contain "OK" and the BatchNumber will contain a number which can be used to identify the batch in the future. If the batch was not successful the component throws an exception that indicates the problem. If any individual record in the batch fails, information concerning that record will appear in the Error event when the response to that particular record is received.

Up to 1000 detail records may be settled in the above manner, just by adding transactions to the DetailRecords property. However, it is recommended that Batch Settlements be kept relatively small - around 100 transactions or so - to decrease the number of records that must be resent in the event of an error.

To void a transaction that has been authorized but has not yet been settled, simply do not include it in the batch settlement. The block on the cardholder's account will clear automatically. If you wish to explicitly void the transaction, use the FDMSDetailRecord component to modify the transaction aggregate and set the TransactionType property to ttVoid. Credits and forced transactions may also be created using the FDMSDetailRecord component and settled in the same manner as regular transactions.

To add Level 2 and Level 3 data to the settled transactions, use the FDMSLevel2 and FDMSLevel3 components to create addendum aggregates, and then add them to the AddendumAggregate for the corresponding transaction stored in DetailAggregate.

Note that the IndustryType from the FDMSSettle component MUST match the detail record aggregate of EACH transaction that is added to the settlement. You cannot mix industry types in a batch - you must settle a separate batch for each industry type.

Property List

The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

ApiVersionIdentifies the application version number.
ApplicationIdIdentifies the merchant application to the Datawire System.
BatchSequenceNumberStarting sequence number for the transactions in this batch.
DatawireIdIdentifies the merchant to the Datawire System.
DetailRecordsCollection of detail records to send in the settlement.
FDMSPlatformSpecifies the FDMS platform that the transactions will be processed on.
IndustryTypeCode which indicates the industry the merchant is engaged in.
MerchantNumberA unique number used to identify the merchant within the FDMS and Datawire systems.
MerchantServiceNumberMerchant's customer service phone number.
MerchantTerminalNumberUsed to identify a unique terminal within a merchant location.
ProxyA set of properties related to proxy access.
ResponseContains the response to the settlement.
SSLAcceptServerCertInstructs the component to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to be used during SSL negotiation.
SSLServerCertThe server certificate for the last established connection.
TimeoutA timeout for the component.
URLLocation of the Datawire server to which transactions are sent.

Method List

The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
InterruptInterrupts the current action.
ResetClears all properties to their default values.
SendSettlementBegins a Batch Settlement transaction with the transaction server.

Event List

The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectedFired immediately after a connection completes (or fails).
DataPacketInFired when receiving a data packet from the transaction server.
DataPacketOutFired when sending a data packet to the transaction server.
DisconnectedFired when a connection is closed.
ErrorInformation about errors during data delivery.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StatusShows the progress of the FDMS/Datawire connection.

Configuration Settings

The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

ClientTimeoutIndicates timeout client application will wait for response.
DetailErrorIndexContains the detail record number that caused the error during settlement.
RawRequestReturns the request sent to the server for debugging purposes.
RawResponseReturns the response received from the server for debugging purposes.
UseEnhancedSettlementForces enhanced settlement mode.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
CACertFilePathsThe paths to CA certificate files when using Mono on Unix/Linux.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCACertsA newline separated list of CA certificate to use during SSL client authentication.
SSLCheckCRLWhether to check the Certificate Revocation List for the server certificate.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLEnableRenegotiationWhether the renegotiation_info SSL extension is supported.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLNegotiatedCipherReturns the negotiated ciphersuite.
SSLNegotiatedCipherStrengthReturns the negotiated ciphersuite strength.
SSLNegotiatedKeyExchangeReturns the negotiated key exchange algorithm.
SSLNegotiatedKeyExchangeStrengthReturns the negotiated key exchange algorithm strength.
SSLNegotiatedProtocolReturns the negotiated protocol version.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
SSLServerCACertsA newline separated list of CA certificate to use during SSL server certificate validation.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 8017]