Skip to content

Reconciliation Statement

File Transfer

File Generation Time

Generate D-1 day reconciliation file at 01:00:00 AM (GMT+3) on D day

File Acquisition


Server Information

  • Sandbox environment server address: sandbox.sgate.sa

File Acquisition Rules

  • Get a list of files:
shell
curl "ftp://{USER}:{PASSWORD}@sandbox.sgate.sa/" -v --ssl --list-only
  • Download reconciliation file
shell
curl "ftp://{USER}:{PASSWORD}@sandbox.sgate.sa/{YYYYMMDD}/GCCRECO_{MERCHANR_ID}_{YYYYMMDD}_{SESSION_ID}.csv" -v --ssl -o "GCCRECO_{MERCHANR_ID}_{YYYYMMDD}_{SESSION_ID}.csv"
  1. {USER}: Merchant reconciles FTP account in SGate system
  2. {PASSWORD}: The merchant reconciles the FTP account password in the SGate system
  3. {MERCHANR_ID}: Merchant’s merchant number in the SGate system
  4. {YYYYMMDD}: Transaction date: D-1, format: yyyy-MM-dd, example: 2023-08-21
  5. {SESSION_ID}: Reconciliation session number, the value is 01-09. If there is no reconciliation for multiple sessions, the default value is 01

Basic File Information

File Format And Encoding Method

  • The file uses the standard CSV format, using half-width commas , as delimiters. Empty columns will also indicate their existence. Each line ends with a newline character \n
  • The file is encoded using UTF-8

File Name

Reconciliation file name: GCCRECO_{MERCHANR_ID}_{YYYYMMDD}_{SESSION_ID}

  • {MERCHANR_ID}: Merchant’s merchant ID in the SGate system
  • {YYYYMMDD}: Transaction date: D-1, format: yyyy-MM-dd, example: 2023-08-21
  • {SESSION_ID}: Reconciliation session number, the value is 01-09. If there is no reconciliation for multiple sessions, the default value is 01

Type Of Data

Serial numberTypeMeaning
1T (Text)Text field, can use letters and Chinese, etc., can be empty
2N (Numeric)Numeric field, cannot be empty

Document Content

Document Details Record

The details of the reconciliation file are recorded as the transaction information details of all transactions in the final state on T-1 of the corresponding merchant.

Serial numberField nameField descriptionTypeMeaning
1Merchant_IDMerchant IDTMerchant’s merchant ID in SGate
2Order_IDOrder numberTThe order number of the order in SGate
3Merchant_Order_IDMerchant order numberTThe order number of the order in the merchant
4Order_Create_TimeOrder creation timeTOrder creation time: yyyy-MM-dd HH:mm:ss(z)
For example: 2023-01-23 13:33:28(GMT+3)
6Order_Complete_TimeOrder completion timeTOrder completion time: yyyy-MM-dd HH:mm:ss(z)
For example: 2023-01-23 13:33:28(GMT+3)
8AmountOrder amountNTotal order amount
9CurrencyCurrency of order amountTCurrency corresponding to total order amount
10Trans_TypeTransaction typeTOrder transaction type
11Order_StatusOrder statusTOrder status
12Ori_Order_IDOriginal transaction order numberTThe order number of the original transaction of this order in SGate
13Ori_Order_AmountOriginal transaction payment amountNThe amount of the original transaction for this order
14Ori_Order_CurrencyOriginal transaction payment currencyTOriginal transaction currency of this order

Appendix

Order Status

Order StatusMeaning
STransaction successful
FTransaction failed
PTransaction processing

Order Transaction Type

Transaction typeMeaning
PPayment Transaction
RRefund Transaction
CChargeback Transaction