Skip to main content

File Specs

Introduction​

The Moyasar PG Transaction Log File (TLF) uses the standard CSV format and includes transactions from all schemes. Each row is one transaction created during the statement day.

  • The first row is a header row containing the column names.
  • Columns appear in the file in the order listed on this page.
  • Empty values are left blank.
  • Date and time values use the ISO 8601 format in UTC, for example 2024-12-07T21:15:03Z.

The file is available in three versions: 1.0, 2.0 and 3.0. Version 3.0 contains the most information and is the recommended version. The Versions column in each table shows which versions include that column.

Data Types and Lengths​

The Type column in each table uses these data types:

TypeFormat
stringUTF-8 text
integerWhole number without separators or decimal point, for example 17166
decimalNumber with a decimal point, for example 123.45
booleantrue or false
datetimeISO 8601 in UTC, YYYY-MM-DDTHH:MM:SSZ, for example 2024-12-07T21:15:03Z

The Length column is the length of the value in characters. A single number is a fixed length, and Up to is a maximum length. Any column can be empty when it doesn't apply to the transaction, so the minimum length of every column is 0.

The following is a description of all columns broken down into multiple segments for ease of understanding.

Basic Data​

ColumnVersionsTypeLengthDescription
idAllstring36Transaction ID within the gateway
order_idAllstring36Order ID within the gateway
typeAllstringUp to 9Transaction type: verify, purchase, authorize, capture, void, refund, extension, reversal
statusAllstringUp to 12Transaction status: initiated, approved, failed, timeout, system_error
amountAllintegerUp to 9Amount in minor currency unit, for example: 1 SAR = 100 Halalah
terminal_idAllstring8Terminal ID
retrieval_referenceAllstring12RRN or Retrieval Reference Number
response_codeAllstringUp to 3Gateway response code
stanAllstring6System Trace Audit Number
auth_codeAllstring6Authorization Code
reverse_reasonAllstringUp to 15For reversal transactions only, possible values: request_timeout, gateway_timeout, response_error, delivery_error
justificationAllstringUp to 15For reauthorization payments only. Possible values: reauthorization, delayed_charges, resubmission, no_show
created_atAlldatetime20Transaction date and time
gateway_referenceAllstringUp to 20SPG's txnReference
auth_resp_codeAllstringUp to 3Issuer response code. Issuer code 85 is reported as 00
receiving_institution_idAllstringUp to 11Issuer Institution ID
forwarding_institution_idAllstringUp to 11Forwarding Institution ID
acquiring_institution_idAllstringUp to 11Acquiring Institution ID
primary_gateway_identifier3.0string4Always MYSR
secondary_gateway_identifier3.0string0Always empty
initiated_by2.0, 3.0stringUp to 23Transaction initiator: CARDHOLDER_OR_ECOMMERCE or MERCHANT
cof_indicator2.0, 3.0booleanUp to 5Credential-on-file indicator: true or false. Empty for transactions without an agreement or justification
terminal_type3.0stringUp to 11One of: INTERNET, MAIL_ORDER, RECURRING, UNSCHEDULED or INSTALMENT

Merchant Data​

ColumnVersionsTypeLengthDescription
merchant_idAllstringUp to 15Merchant ID
merchant_nameAllstringUp to 35The order's statement descriptor if provided, otherwise the merchant name
merchant_arabic_nameAllstringUp to 64Arabic Merchant Name
merchant_category_codeAllstring4Merchant Category Code
merchant_address_13.0stringUp to 35Merchant address line 1
merchant_city2.0, 3.0stringUp to 20Merchant city name, or 001 if the merchant's city code is not a recognized Saudi city code
merchant_region_code3.0string3Merchant region code (3 digits), or 001 if the merchant's city code is not a recognized Saudi city code
merchant_zip_code3.0stringUp to 10Merchant ZIP code
merchant_country_code3.0string3Always SAU

Sub-Merchant Data​

ColumnVersionsTypeLengthDescription
sub_merchant_idAllstringUp to 15Sub-Merchant ID
sub_merchant_nameAllstringUp to 22The order's statement descriptor

Flight Data​

ColumnVersionsTypeLengthDescription
passenger_number_recordAllstring6 to 15PNR or Passenger Number Record

Source Data​

ColumnVersionsTypeLengthDescription
source_typeAllstringUp to 11Source type: card, apple_pay, google_pay or samsung_pay
numberAllstring8 to 19PAN or Primary Account Number (device PAN for wallet payments)
schemeAllstringUp to 10Card network: mada, visa, mastercard or amex
first_digitsAllstring8First 8 digits
last_digitsAllstring4Last 4 digits
yearAllinteger4Expiry year, 4 digits
monthAllinteger1 to 2Expiry month from 1 to 12, not zero-padded
fingerprintAllstring64Source fingerprint

Card Auth Data​

Only present for card sources that were authenticated with 3D Secure.

ColumnVersionsTypeLengthDescription
card_auth_valueAllstringUp to 256CAVV or Authentication Value
card_auth_statusAllstring1Auth Status: Y, A, N, U, R
card_auth_eciAllstring2Electronic Commerce Indicator
card_auth_versionAllstring52.0.0, 2.1.0, 2.2.0 or 2.3.0
ds_transaction_idAllstring36Directory Server Transaction ID (UUID)
acs_transaction_idAllstring36Access Control Server Transaction ID (UUID)
tds_purchase_dateAlldatetime203D Secure purchase date and time

Apple Pay Data​

Only present for apple_pay sources.

ColumnVersionsTypeLengthDescription
apple_pay_cryptogram1.0, 2.0stringUp to 256Authentication Value
apple_pay_eci1.0, 2.0string2Electronic Commerce Indicator
apple_pay_device_identifier1.0, 2.0string12Apple Device Identifier

Device Payment Data​

Only present for apple_pay, google_pay and samsung_pay sources. Replaces the Apple Pay columns in version 3.0.

ColumnVersionsTypeLengthDescription
device_cryptogram3.0stringUp to 256Authentication Value
device_eci3.0string2Electronic Commerce Indicator
device_identifier3.0string12Apple Device Identifier, for Apple Pay only
device_requestor_id3.0string11Token Requestor ID

Agreement Data​

Only present for orders made under an agreement.

ColumnVersionsTypeLengthDescription
agreement_idAllstringUp to 36Agreement ID
agreement_typeAllstringUp to 11One of: unscheduled, recurring, registered or installment
agreement_expiryAlldatetime20Expiry date of the agreement
agreement_max_useAllintegerUp to 3Integer representing maximum use
agreement_current_use3.0integerUp to 3Number of earlier payments made under the agreement (0 for the first payment)
agreement_max_variabilityAllstringUp to 8One of: fixed or variable

Visa Specific Data​

ColumnVersionsTypeLengthDescription
visa_merchant_identifierAllstring8Visa specific request data
visa_merchant_verification_valueAllstring10Visa specific request data
visa_authorization_characteristics_indicatorAllstring1Visa specific request data
visa_market_specific_indicatorAllstring1Visa specific request data

Mastercard Specific Data​

ColumnVersionsTypeLengthDescription
mastercard_assigned_idAllstring6Mastercard specific request data
mastercard_transaction_type_indicatorAllstring3Mastercard specific request data
mastercard_promotion_codeAllstring6Mastercard specific request data
mastercard_transaction_category_codeAllstring1Mastercard specific request data

Response Data​

ColumnVersionsTypeLengthDescription
resp_scheme_trace_idAllstringUp to 29SPG's schemeTraceId
resp_gw_tran_idAllstringUp to 20Scheme Transaction ID (SPG's gwTranId)
resp_merchant_advice_codeAllstring2SPG's merchantAdviceCode
resp_cardholder_billing_amountAlldecimalUp to 13SPG's cardholderBillingAmount, up to 10 digits and 2 decimal places
resp_cardholder_billing_currencyAllstring3SPG's cardholderBillingCurrency
resp_cvv_result_codeAllstring1SPG's cvvResultCode
resp_cvv_network_result_codeAllstring1SPG's cvvNetworkResultCode
resp_avs_response_codeAllstring1SPG's avsResponseCode
resp_avs_network_result_codeAllstring1SPG's avsNetworkResultCode
resp_settlement_date3.0string19SPG's settlementDate, in YYYY-MM-DD HH:MM:SS format
resp_settlement_amount3.0decimalUp to 13SPG's settlementAmount, up to 10 digits and 2 decimal places
resp_settlement_currency3.0string3SPG's settlementCurrency
resp_settlement_conversion_rate3.0string8SPG's settlementConversionRate
resp_settlement_conversion_date3.0string4SPG's conversionDate, in MMDD format

Additional Response Data​

Values from SPG's additionalResponseData.

ColumnVersionsTypeLengthDescription
resp_add_cardholder_nameAllstringUp to 60SPG tokenization value (cardholderName)
resp_add_cof_tokenAllstringUp to 50SPG tokenization value (cofToken)
resp_add_eciAllstringUp to 3ECI returned by the issuer (eci)
resp_add_error_data_elementAllstringUp to 6errorDataElement
resp_add_masked_panAllstring4SPG tokenization value (maskedPan)
resp_add_mastercard_pos_dataAllstringUp to 26Mastercard specific value (mastercardPosData)
resp_add_mastercard_transaction_integrity_classAllstring2Mastercard specific value (mastercardTransactionIntegrityClass)
resp_add_original_amountsAllstring24originalAmounts
resp_add_pan_expiry_dateAllstring4SPG tokenization value (panExpiryDate), in MMYY format
resp_add_reconciliation_dateAllstring6reconciliationDate, in YYMMDD format
resp_add_visa_account_statusAllstring1Visa specific value (visaAccountStatus)
resp_add_visa_authorization_characteristics_indicatorAllstring1Visa specific value (visaAuthorizationCharacteristicsIndicator)
resp_add_visa_commercial_card_type_responseAllstring1Visa specific value (visaCommercialCardTypeResponse)
resp_add_visa_market_specific_indicatorAllstring1Visa specific value (visaMarketSpecificIndicator)
resp_add_visa_product_idAllstring2Visa specific value (visaProductId)
resp_add_visa_spend_qualified_indicatorAllstring1Visa specific value (visaSpendQualifiedIndicator)
resp_add_visa_validation_codeAllstring4Visa specific value (visaValidationCode)