Skip to content

4 - Clearing and Settlement


4.1 - Clearing & Confirmation Data Files

File name = YMMDD + File ID + .otf/.dcf - e.g. "40320001.otf".


4.1.1 - File Header & Trailer

Cf. Chapter 3.3.1 (File Type: otf = original transactions file / dcf = daily confirmation file) and Chapter 3.3.2.


4.1.2 - Batch Header

Field Name Length Comment
Transaction Code 2 96 = Batch Header Record
Merchant ID 6 as assigned by Rapyd
Terminal ID 8 as assigned by Rapyd
Batch ID 10 assigned by the Merchant or Processor (alphanumeric). Merchant ID + Terminal ID + Batch ID will be used for duplicate batch checking.
Batch Date 10 YYYY-MM-DD
DBA Name 25 (as registered at Rapyd), right filled with spaces
DBA City 13 (as registered at Rapyd), right filled with spaces
DBA Country 2 Alphabetic ISO code (e.g. IS = Iceland)
Merchant Category 4 MCC (as assigned by Rapyd)
Currency Code 3 Numeric ISO code (e.g. 840 = US dollar)

Tip

Batch ID may be reused after six months if needed


4.1.3 - Batch Trailer

Field Name Length Comment
Transaction Code 2 97 = Batch Trailer Record
Merchant ID 6 same as in Header
Terminal ID 8 same as in Header
Batch ID 10 same as in Header
Transaction Count 6 i.e. 000567
Batch Total Amount 15 Left zero filled, 2 decimal places are implied. Attention: this is not a clearing total, rather a sum of all transaction amounts used for consistency check, i.e. ‘06’ also counts in plus.

4.1.4 - Financial Transaction

The structure below applies to Original Transactions Files (.otf). The last two elements only appear in Rapyd generated Daily Confirmation Files (.dcf) for rejected transactions.

All transactions in a batch must be from the same Merchant & Terminal ID and with the same currency code. The currency code is also required per transaction – inconsistent transactions will be rejected.

Field Name Length Comment
Transaction Code 2 05 = Sale, 06 = Refund, 07 = Cash Advance (Only valid with MCC 6010 - Manual Cash and 6011 - Auto Cash Disbursements and is currently only used for the Icelandic Domestic market)
Card Type 1 V = Visa, M = MasterCard, A = American Express
Card Number 19 Right filled with spaces
Transaction Amount 12 Left zero filled, 2 decimal places are implied. Example: 000000001230 = 12.30
Transaction Currency 3 ISO numeric code (e.g. 840 = US dollar)
Transaction Date 10 YYYY-MM-DD
Authorization Code 6 = AuthCode - cf. Authorization Spec - 3.1.4. Left-justified with spaces. For online refund this Authorization Code should be from the refund auth. For off-line refund transactions the value from the original sale.
Transaction ID 12 In on-line authorized sale and refund transactions: the value from TransID returned by the authorization service. - cf. Authorization Spec - 3.1.4 In off-line transactions: ‘99’ + Processing Date as MMDD + sequence number (n 6) unique as per day. For off-line refund transactions the value from the TransID from the original sale.
Transaction Type 2 Transaction Type as defined by Rapyd – see Chapter 7 for detailed information. For on-line authorized transactions - the value must be the same as received in the authorization response, i.e. TransType cf. Authorization Spec - 3.1.4 & Chapter 7.
Transaction LCID 15 LifeCycle ID, cf. TransLCID, cf. Authorization Spec - 3.1.4. Required in all on-line authorized transactions.
Visa format: n 15.
MasterCard format: an 13. For online refund this Transaction LCID should be from the refund auth.
+ for transactions rejected by Rapyd
Reason Code 4 4 digit code assigned by Rapyd, see list of reason codes.
Message Text 50 Provided by Rapyd

Please note

The field Transaction LCID is only present in .dcf files when you are in version 3.3.1 and newer. Versions 3.3.1 and above return masked card number (6+4) in the .dcf files.


4.1.5 - Additional Data

Additional Data record must immediately follow in the next line after the financial transaction and have the same Transaction ID.


4.1.5.1 - Airline Data

Field Name Length Usage Comment
Transaction Code 2 M 50 = Additional data
Transaction ID 12 M the same as in the financial transaction
Format Code 2 M AT = Airline - Ticket (or Booking) Number
AI = Airline - Passenger Itinerary Data
Ticket Number 13 M For AT & AI. Left aligned, space filled
+ the following is used if format code = AI
Passenger Name 20 M Right filled with spaces
Departure Date 10 M Format: yyyy-mm-dd
Travel Agency Code 8 M Right filled with spaces
Travel Agency Name 25 M Right filled with spaces
Restriction Indicator 1 M 0 = No restriction
1 = Restricted (non-refundable) ticket
Reservation System 4 M e.g. SABR
Origination City 3 M Airport Code
Trip Leg Info (18) M Group – minimum of one (of length 18), maximum of four (each of length 18), see description below. Trip Legs should be ordered, first leg should appear first in the group

4.1.5.1.1 - Airline Data - Trip Leg Info

Field Name Length Usage Comment
Carrier Code 2 O For example UA for United Airlines or FI for Iceland Air
Service Class 1 O Indicates service class (first class, business class etc.)
Stop-Over Code 1 O O = Stopover allowed
X = Stopover not allowed
Destination City 3 O Airport Code
Fare Basis Code 6 O
Flight Number 5 O For Example 1214

An example might be flight FI301 from Vagar to Keflavik (KEF):

FIFOKEF^^^^^^^^301
^ is used to indicate spaces


4.1.5.2 - ICC (Integrated Circuit Card) Data

An example of ICC can be found in the last transaction of the first example in Chapter 3.1.1.1

Field Name Length Comment
Transaction Code 2 50 = Additional data
Transaction ID 12 the same as in the financial transaction
Format Code 2 CD = Chip - Data
Card Sequence Number 3 Application PAN Sequence Number (tag 5F34)
ICC data length 3 Length of the display hex string
ICC data .. 510 Format: display hex.
Required sub-elements from Authorization Request:
  • 5F2A
  • 82
  • 84 (Mastercard only)
  • 95
  • 9A
  • 9C
  • 9F02
  • 9F03
  • 9F10
  • 9F1A
  • 9F26
  • 9F27 (Only MasterCard and American Express)
  • 9F33 (Visa only)
  • 9F34
  • 9F36
  • 9F37
  • 9F6E
Optional sub-elements from Authorization Response:

4.1.5.3 - Reference Data

Optional data the user may send with a transaction, for example a unique identifier generated by the user to pair with a transaction in the .sdf (Settlement Detail File).

Field Name Length Comment
Transaction Code 2 50 = Additional data
Transaction ID 12 the same as in the financial transaction
Format Code 2 RD = Reference Data
Reference Data 50 Format: 0-9, A-Z, a-z and [+-=_/ ] up to 50 chars, right filled with whitespace.

Please note

Reference Data is returned in .dcf files if version is 3.3.2 or later.


4.1.5.4 - DCC Data

When the Merchant offers Dynamic Currency Conversion he must supply original amount and currency (before conversion into the cardholders preferred currency), the exchange rate used and mark up rate applied.

Field Name Length Comment
Transaction Code 2 50 = Additional data
Transaction ID 12 the same as in the financial transaction
Format Code 2 DC = Dynamic Currency Conversion Data
Amount 12 Numerical, left padded with zeros, with implicit decimal point between digit 10 and 11, that is 000000001250 equals 12.5.
Currency 3 ISO numeric code.
Exchange Rate 8 Numerical. The first digit indicates the placement of an implicit decimal point, for example: 91234567 means 0.001234567 = 1234567 x 10-9
Markup Rate 8 Numerical. Uses the same format as the Exchange Rate. Is the Exchange Rate with additional markup to cover cost of offering DCC.

4.2 - Settlement Reports

File name = YMMDD + File ID + .srf - e.g. "40320001.srf"


4.2.1 - File Header & Trailer

Cf. Chapter 3.3.1 (File Type: srf = Settlement Report file) and Chapter 3.3.2


4.2.2 - Batch Header

Field Name Length Comment
Transaction Code 2 96 = Batch Header Record
Merchant ID 6
Settlement Number 10
Merchant Name 25
Merchant City 13
Merchant Country 2 Alphabetic ISO code

4.2.3 - Batch Trailer

Field Name Length Comment
Transaction Code 2 97 = Batch Trailer Record
Merchant ID 6 same as in Header
Transaction Count 6 e.g. 000021
Currency Code 3 ISO numeric code (e.g. 840 = US dollar)
Batch Total Amount 15 2 decimal places are implied, left zero filled

4.2.4 - Settlement Transaction

Field Name Length Comment
Transaction Code 2 95 = Settlement Record
Settlement Key 6 ADDEDS Added Sum (Depricated)
ADJUST Exception transaction adjustment
AUTFEE Authorization Fee
BUMERC Merchant Service Charges
CHABAC Chargeback
CHBFAG Chargeback Fee - Agent
CHBFVI Chargeback Fee - Rapyd
CMPFEE Compliance Fee
CNPFEE Card Not Present Fee
COMAGH Commission High Risk - Agent (Depricated)
COMAGL Commission Low Risk - Agent (Depricated)
COMAGM Commission Med Risk - Agent (Depricated)
COMMLA Commission Low Amounts (Depricated)
DCCCOM DCC Commission
DEDUCT Deducted Sum (Depricated)
EGMFEE Ecom Gateway Monthly Fee
EGTFEE Ecom Gateway Transaction
HRRFEE High Risk Registration Fee
IBCOMM IMS Based Commission (Depricated)
JOIFEE Joining Fee
MGCOST Management Cost (Depricated)
MMSFEE Minimum Monthly Service Charge
MOBFEE Mobile Airtime Fee
MONTHC Monthly Fee Credit
MONTHD Monthly Fee Debit
MONTHM Monthly Fee Mixed
NEGATI Negative Merchant Settlement (Depricated)
NETSET Net Settlement
OTHER1 Other Fees
OTHERF Other Deductions (Depricated, replaced by OTHER1)
PCMFEE PCI Monthly Fee inc VAT
PENALF Penalty Fee (Depricated)
POSAHL POS Rental - Weekend Fee
POSALE POS Rental Fee
POSALL POS Rental - Long-term Fee
PRAFEE Pre-Authorization Fee
PREARB Pre-Arbitration
RDR15 Rapid Dispute Resolution
RDR16 Rapid Dispute Resolution Refund
RDR17 Rapid Dispute Resolution Cash Advance
RDR35 Rapid Dispute Resolution Reversal
RDR36 Rapid Dispute Resolution Refund Reversal
RDR37 Rapid Dispute Resolution Cash Advance Reversal
REFFEE Refund Fee (Depricated)
REFU06 Refund
REGFEE Registration Fee (Depricated)
REJECT Rejected Transactions
REPRES Re-Presentments
REVERS Reversals
ROLREL Rolling Release
ROLRES Rolling Reserve
SALE05 Sale
SCHFEE Scheme Fee (Depricated)
SWIFTF Payment Fee
TRFSAG Transaction Fee - Settled - Agent (Depricated, replaced by AUTFEE)
TRFUAG Transaction Fee - Unsettled - Agent (Depricated, replaced by AUTFEE)
TRMFEE Terminal Fee
Sign 1 + or – (plus / minus)
Settlement Amount 14 2 decimals are implied (i.e. 12.2, left zero filled)
Currency Code 3 ISO numeric code (e.g. 840 = US dollar)
Settlement Code 2 V0 Visa (all card types)
V1 Visa (all credit card types)
V2 Visa Electron
V3 Visa commercial cards
M0 MasterCard (all card types)
M1 MasterCard (credit cards)
M2 MasterCard (debit cards)
M3 MasterCard commercial cards
Comment max 50 Additional explanation (if necessary)

4.2.5 - Batch Transaction

Field Name Length Comment
Transaction Code 2 93 = Batch ID Record
Original Batch ID 10 as assigned by Merchant or Processor. In case of chargebacks and re-presentments VICBYYMMDD or VIRPYYMMDD will be used.

4.3 Settlement Details

The structure of the file is as follows:

Batch Header
    Settlement Transaction
    Settlement Transaction
    ...
    Settlement Detail Transaction
    Settlement Detail Transaction
Batch Trailer
Batch Header
    Settlement Transaction
    Settlement Transaction
    ...
    Settlement Detail Transaction
    Settlement Detail Transaction
Batch Trailer

Example file:

9623099100253690862022-12-21Payments HG              London       GB
95NETSET+00000033947629978 BNet
95CHBFAG+00000000001500978V1Chargeback Fee
95CHABAC+00000000004297978V1Sale Chargeback
95BUMERC+00000000567648978 BMerchant Service Charges
95SALE05+00000009405425978V2Sale
95REFU06+00000000090367978V2Refund
SALE05V440066******6781   +000000000130009782022-12-18235200429800230991200109541382352018131122tr_fNjSVxmVuJ
SALE05V451014******3011   +000000000186209782022-12-18235200429802230991200005681582352018174907tr_Ci5J5yRS2y
SALE05M535456******2598   +000000000283009782022-12-18235200429811230991200005682MDHB0I16E1217  tr_xMdxopgDA9
SALE05V480025******2204   +000000000039209782022-12-18235200429806230991200021462482352018517753tr_3FgUX9zVBK
REFU06V429667******4984   -000000000012509782022-12-18230823305868230991200006121302308854604722tr_EWBvgmmAP6
REFU06V492505******4236   -000000000012509782022-12-18234517256858230991200006122482345621379443tr_BuN4xUwWiV
REFU06M525897******4593   -000000000012509782022-12-18231416426756230991200006121MCCHXGEOB1110  tr_h8HUgtzXqF
97230991000012978000000106313391

4.3.1 Batch Header

Field Name Length Comment
Transaction Code 2 96 = Batch Header Record
Merchant ID 6
Settlement Number 10
Expected Payment Date 10
Merchant Name 25
Merchant City 13
Merchant Country 2 Alphabetic ISO code

4.3.2 Batch Trailer

Field Name Length Comment
Transaction Code 2 97 = Batch Trailer Record
Merchant ID 2 Same as in Header
Transaction Count 6 e.g. 000021
Currency Code 3 ISO numeric code (e.g. 840=US dollar)

4.3.3 Settlement Keys

Field Name Length Comment
Transaction Code 2 95 = Settlement Key
Settlement Key 6 ADJUST Exception transaction adjustment
AUTFEE Authorization Fee
BUMERC Merchant Service Charges
CASHAD Cash Advance
CHABAC Chargeback
CHBFAG Chargeback Fee
CMPFEE Compliance Fee
CNPFEE Card Not Present Fee
DCCCOM DCC Commission
EGMFEE Ecom Gateway Monthly Fee
EGTFEE Ecom Gateway Transaction
GRSSET Gross
HRRFEE High Risk Registration Fee
INVFEE Invoice fee
JOIFEE Joining Fee
MMSFEE Minimum Monthly Service Charge
MOBFEE Mobile Airtime Fee
MONTHC Monthly Fee Credit
MONTHD Monthly Fee Debit
MONTHM Monthly Fee Mixed
NETSET Net Settlement
OCT08 Original Credit
OTHER1 Other Fees
PCMFEE PCI Monthly Fee inc VAT
POSAHL POS Rental - Weekend Fee
POSALL POS Rental - Long-term Fee
PRAFEE Pre-Authorization Fee
PREARB Pre-Arbitration
REFU06 Refund
REJECT Rejected Transactions
REPRES Re-Presentments
REVERS Reversals
ROLREL Rolling Release
ROLRES Rolling Reserve
SALE05 Sale
SWIFTF PaymentFee
TRMFEE Terminal Fee
Sign 1 + or - (plus og minus)
Amount 14 Decimal
Currency 3 ISO numeric code (e.g. 840 = US dollar)
Card Type 1 V, M, A or " " (space symbol represents a type independent of card scheme)
Card Usage 1 1, 2, 3 or 0 (1=Credit, 2=Debit or 3=Commercial Card 0=if the Settlement Key is one of the obsolete keys*)
Comment 50 Explanation of key if applicable

*The obsolete keys are FJAUON, FJDECL, OTHERF, TPOSNS

4.3.4 Settlement Detail Transaction

Field Name Length Comment
Transaction Code 6 ADDEDS Added Sum (Depricated)
ADJUST Exception transaction adjustment
AUTFEE Authorization Fee
BUMERC Merchant Service Charges
CHABAC Chargeback
CHBFAG Chargeback Fee - Agent
CHBFVI Chargeback Fee - Rapyd
CMPFEE Compliance Fee
CNPFEE Card Not Present Fee
COMAGH Commission High Risk - Agent (Depricated)
COMAGL Commission Low Risk - Agent (Depricated)
COMAGM Commission Med Risk - Agent (Depricated)
COMMLA Commission Low Amounts (Depricated)
DCCCOM DCC Commission
DEDUCT Deducted Sum (Depricated)
EGMFEE Ecom Gateway Monthly Fee
EGTFEE Ecom Gateway Transaction
HRRFEE High Risk Registration Fee
IBCOMM IMS Based Commission (Depricated)
JOIFEE Joining Fee
MGCOST Management Cost (Depricated)
MMSFEE Minimum Monthly Service Charge
MOBFEE Mobile Airtime Fee
MONTHC Monthly Fee Credit
MONTHD Monthly Fee Debit
MONTHM Monthly Fee Mixed
NEGATI Negative Merchant Settlement (Depricated)
NETSET Net Settlement
OTHER1 Other Fees
OTHERF Other Deductions (Depricated, replaced by OTHER1)
PCMFEE PCI Monthly Fee inc VAT
PENALF Penalty Fee (Depricated)
POSAHL POS Rental - Weekend Fee
POSALE POS Rental Fee
POSALL POS Rental - Long-term Fee
PRAFEE Pre-Authorization Fee
PREARB Pre-Arbitration
RDR15 Rapid Dispute Resolution
RDR16 Rapid Dispute Resolution Refund
RDR17 Rapid Dispute Resolution Cash Advance
RDR35 Rapid Dispute Resolution Reversal
RDR36 Rapid Dispute Resolution Refund Reversal
RDR37 Rapid Dispute Resolution Cash Advance Reversal
REFFEE Refund Fee (Depricated)
REFU06 Refund
REGFEE Registration Fee (Depricated)
REJECT Rejected Transactions
REPRES Re-Presentments
REVERS Reversals
ROLREL Rolling Release
ROLRES Rolling Reserve
SALE05 Sale
SCHFEE Scheme Fee (Depricated)
SWIFTF Payment Fee
TRFSAG Transaction Fee - Settled - Agent (Depricated, replaced by AUTFEE)
TRFUAG Transaction Fee - Unsettled - Agent (Depricated, replaced by AUTFEE)
TRMFEE Terminal Fee
Card Type 1 V = Visa, M = MasterCard
Card Number 19 Masked. Right filled with spaces
Sign 1 + or - (plus/minus)
Transaction Amount 14 Left zero filled, 2 decimal places are implied. Example: 00000000001230 = 12.30
Transaction Currency 3 ISO numeric code (e.g. 840 = US dollar)
Transaction Date 10 YYYY-MM-DD
Transaction ID 12 the same as in the financial transaction
Merchant ID 6
Terminal ID 8
Card Usage 1 0 = All card types, 1 = All credit card types, 2 = Visa Electron / Mastercard debit, 3 = Commercial cards
Transaction LifeCycle ID 15 LifeCycle ID Visa format: n 15. MasterCard format: an 13. For online refund this Transaction LCID should be from the refund auth.
Reference Data 50 Assigned by Processor/Merchant in the .otf file