FDMSReversal Component
Properties Methods Events Configuration Settings Errors
The FDMSREVERSAL component is used to reverse a transaction that was previously authorized using the FDMSRETAIL , FDMSECOMMERCE , or FDMSHEALTHCARE component. This immediately releases the funds in the cardholder's open-to-buy that were blocked by the original authorization.
Syntax
nsoftware.InPayDirect.Fdmsreversal
Remarks
Unlike the Timeout Reversals used in the FDMSDebit and FDMSBenefit components, a credit card reversal is used to void a transaction and return funds to the customer. Often this is used in a split-tender situation, where a customer uses a prepaid Visa or MasterCard (or health care FSA card) to make a purchase which is partially authorized for less than the transaction amount. Partially authorized transactions will have an ApprovalCode that beings with "AL" instead of "AP". If the customer does not have an additional source of funds to make up the difference, the authorization must be reversed and the funds immediately returned to the customer's card. To do this, set the AuthorizedAmount to the Response.AuthorizedAmount from the original transaction, and set the SettlementAmount to "0". This is called a full reversal (in this case, of a partially authorized transaction), and the detail record for the original transaction should be discarded - it must not be settled at the end of the day.
Alternatively, a merchant may need to settle a transaction amount for less than was originally authorized. In this case, set the AuthorizedAmount to the original TransactionAmount, and set the SettlementAmount to the new amount you wish to settle for. After a successful reversal, use the FDMSDetailRecord component to update the SettlementAmount of the detail record for the original transaction with the new amount. This is called a partial reversal. You may also submit a full reversal by setting the SettlementAmount to "0". In that case, all of the funds are returned to the customer and the detail record for the original transaction should be discarded.
Note that partial authorizations must be fully reversed. You cannot partially reverse a partial authorization. Normally authorized transactions can be either partially or fully reversed. A normal authorization has a ApprovalCode that begins with "AP" (APproved). A partial authorization has a ApprovalCode that begins with "AL" (Approved for a Lesser amount).
Upon a successful reversal, the ApprovalCode field will contain either "AP888888" or "AP868686" indicating the reversal was accepted. This code does not indicate the original transaction was found and reversed, merely that the reversal was received and properly formatted. First Data does not actually check whether the original transaction occurred or not. If the transaction was declined ApprovalCode will contain one of the response messages listed in the table below:
Response Message | Meaning |
CALL CARD CENTER | System problem. |
DECLINED | Decline the transaction. |
EXPIRED CARD | Card is expired. |
HOLD - CALL CTR | Problem with card. |
INV ACCT NUM | Invalid card number or prefix. |
INV CREDIT PLAN | Private label message only. |
INV EXP DATE | Invalid expiration date. |
INV MER ID | Merchant is not set up on Host file. |
INV TERM ID | Terminal is not set up on Host file. |
PLEASE RETRY | System time-out or other generic system error. |
REFERRAL | Referral. |
REFERRAL INV TR2 | Referral - Invalid Track II Data. |
REFERRAL INV TR1 | Referral - Invalid Track I Data. |
SERV NOT ALLOWED | Merchant is not entitled to this card type. |
SYS REJECT | Transaction was rejected by the system due to "batch in progress indicators" being turned on. |
INV AMT | Invalid amount. |
INV TRAN | Transaction not permitted |
REV REJECTED | Reversal was rejected. |
TRAN NOT ALLOWED | Transaction not allowed. |
FDMSRetail1.TransactionNumber = 3; FDMSRetail1.TransactionAmount = "300"; FDMSRetail1.Card.Number = "4111111111111111"; FDMSRetail1.Card.ExpMonth = 12; FDMSRetail1.Card.ExpYear = 13; FDMSRetail1.Card.EntryDataSource = edsManuallyEntered; FDMSRetail1.Authorize();The above authorization was successful, but for some reason it needs to be voided. You could simply not settle the transaction, and that would clear the block on the cardholder's funds in a few days. However, a reversal allows you to clear that block immediately. To start with, we set the FDMSReversal component with the same merchant setup and basic transaction info used in the original authorization.
FDMSReversal1.MerchantNumber = FDMSRetail1.MerchantNumber; FDMSReversal1.MerchantTerminalNumber = FDMSRetail1.MerchantTerminalNumber; FDMSReversal1.DatawireId = FDMSRetail1.DatawireId; FDMSReversal1.URL = FDMSRetail1.URL; FDMSReversal1.Card.Number = FDMSRetail1.Card.Number; FDMSReversal1.Card.ExpMonth = FDMSRetail1.Card.ExpMonth; FDMSReversal1.Card.ExpYear = FDMSRetail1.Card.ExpYear; FDMSReversal1.Card.EntryDataSource = FDMSRetail1.Card.EntryDataSource;Next, we need to specify the exact transaction we wish to reverse. The properties below are required for First Data to identify and reconcile the reversal. Note that if the original transaction was authorized for an amount less than the original TransactionAmount, AuthorizedAmount should be set with the AuthorizedAmount from the original transaction, instead of the TransactionAmount which was requested.
FDMSReversal1.ApprovalCode = FDMSRetail1.Response.ApprovalCode; FDMSReversal1.TransactionId = FDMSRetail1.Response.TransactionId; FDMSReversal1.AuthorizedAmount = FDMSRetail1.TransactionAmount; FDMSReversal1.ReturnedACI = FDMSRetail1.Response.ReturnedACI; FDMSReversal1.ValidationCode = FDMSRetail1.Response.ValidationCode;All that is left is to set the new settlement amount and submit the transaction. To completely reverse the transaction and return all funds to the customer, set the SettlementAmount to zero ("0"). To return a portion of the funds to the customer set the SettlementAmount property with the result of the original authorized amount minus the amount to be unblocked on the customer's card. For instance, this $3 transaction has $2 reversed, for a new settlement amount of $1.
FDMSReversal1.TransactionNumber = 4; FDMSReversal1.SettlementAmount = "100"; FDMSReversal1.Reverse();If the reversal is successful the ApprovalCode will contain either "AP868686" or "AP888888", indicating the reversal was accepted.
Note that partially authorized transactions cannot be partially reversed, they must be fully reversed. For instance, say a customer uses a prepaid visa card to buy $100 worth of merchandise, but his card only has a $50 balance. If the customer does not have an additional form of tender, (cash, check, credit, etc), the $50 that was partially authorized must be reversed and returned to the card. First Data does not support any scenario where a partially authorized transaction may be reversed for less than the full amount.
To reiterate, when a transaction is fully reversed, it must be removed from the batch settlement entirely. A partially reversed transaction must update the SettlementAmount of the original detail record, using the FDMSDetailRecord component. Reversal transactions themselves may not be settled, even if the CaptureFlag is True.
Important Note: You must ping your list of service provider URLs and update the URL property to the service provider with the shortest response time every 100 transactions, as well as when your application initially starts. This is not a normal ICMP ping - to determine the fastest transaction URL you must use the special Ping method inside the FDMSRegister component. (You may update your list of service provider URLs with the FDMSRegister component's ServiceDiscovery method).
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
ApplicationId | Identifies the merchant application to the Datawire System. |
ApprovalCode | Approval code of the transaction to be reversed. |
AuthorizedAmount | Authorized Amount from the original response. |
Card | Contains the customer's credit card information. |
DatawireId | Identifies the merchant to the Datawire System. |
DirectMarketingType | Specifies the type of direct marketing transaction to reverse. |
FDMSPlatform | Specifies the FDMS platform that the transactions will be processed on. |
HealthCare | Indicates whether this is a healthcare auto-substantiation reversal. |
IndustryType | Code which indicates the industry the merchant is engaged in. |
MerchantNumber | A unique number used to identify the merchant within the FDMS and Datawire systems. |
MerchantTerminalNumber | Used to identify a unique terminal within a merchant location. |
Proxy | A set of properties related to proxy access. |
Response | Contains the response to an authorization request. |
ReturnedACI | Returned ACI from the original response. |
SettlementAmount | New settlement amount after the reversal. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
Timeout | A timeout for the component. |
TransactionId | Transaction Id from the original response. |
TransactionNumber | Uniquely identifies the transaction. |
URL | Location of the Datawire server to which transactions are sent. |
ValidationCode | Validation Code from the original response. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
Interrupt | Interrupts the current action. |
Reset | Clears all properties to their default values. |
Reverse | Reverses a credit card transaction. |
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.
Connected | Fired immediately after a connection completes (or fails). |
Disconnected | Fired when a connection is closed. |
Error | Information about errors during data delivery. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
Status | Shows 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.
AVSResult | Contains the Address Verification System result code of the transaction to be reversed. |
ECI | Electronic Commerce Indicator. |
PINCapability | The PIN Capability of the terminal. |
TotalAuthorizedAmount | The total amount authorized including all incremental authorizations. |
RawRequest | Returns the request sent to the server for debugging purposes. |
RawResponse | Returns the response received from the server for debugging purposes. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseManagedSecurityAPI is True. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
OpenSSLCADir | The path to a directory containing CA certificates. |
OpenSSLCAFile | Name of the file containing the list of CA's trusted by your application. |
OpenSSLCipherList | A string that controls the ciphers to be used by SSL. |
OpenSSLPrngSeedData | The data to seed the pseudo random number generator (PRNG). |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |