Balad ↔ Bank NXT — Remittance Integration
Technical specification for the file-based payout integration: encrypted transaction files in, plain status files back, all over SFTP.
End-to-end flow
1Overview
Balad and Bank NXT exchange remittance data through flat CSV files over SFTP. The integration is bidirectional.
| Direction | File | Format | Encryption | Description |
|---|---|---|---|---|
| Balad → Bank NXT (inbound) | Transaction file | CSV (UTF-8) | PGP-encrypted | Payout instructions, one batch per file |
| Bank NXT → Balad (outbound) | Status Update file | CSV (UTF-8) | Plain (none) | Lifecycle status of each transaction |
- The inbound transaction file carries PII and account data and is PGP-encrypted.
- The outbound status file contains no sensitive data and is transferred plain (unencrypted).
2Transport & Security
2.1 SFTP
- Transport is SFTP only.
- Authentication: SSH key pair (public keys exchanged out-of-band during onboarding).
- Atomic upload: write to a temporary name, then rename to the final name once the upload completes, so the consumer never reads a partial file.
/inbound/ # files received from the counterparty
/outbound/ # files placed for the counterparty to collect
/archive/ # processed files (optional, per retention policy)
2.2 PGP — inbound transaction file only
- Encrypted with OpenPGP (RFC 4880) using the recipient's public key, signed with the sender's private key.
- Cipher: AES-256; hash: SHA-256 or stronger.
- Encrypted payload filename: cleartext name with
.pgpappended. - The status file (Bank NXT → Balad) is not encrypted.
3File Naming Convention
3.1 Transaction file — Balad → Bank NXT (encrypted)
{BaladReferenceNo}_{YYYYMMDD}_{HHMMSS}.csv (cleartext)
{BaladReferenceNo}_{YYYYMMDD}_{HHMMSS}.csv.pgp (on SFTP)
| Token | Meaning | Example |
|---|---|---|
BaladReferenceNo | Balad batch / transaction reference | BLDREF00001 |
YYYYMMDD | File generation date (UTC) | 20260604 |
HHMMSS | File generation time (UTC, 24h) | 095231 |
Example: BLDREF00001_20260604_095231.csv
3.2 Status Update file — Bank NXT → Balad (plain)
{BaladReferenceNo}_Status_Update.csv
Example: BLDREF00001_Status_Update.csv
4Transaction File (Balad → Bank NXT)
4.1 File-level rules
| Format | CSV (comma , delimited) |
|---|---|
| Encoding | UTF-8 (required — Arabic name fields) |
| Header row | Yes — first line is the column header, exact names below |
| Text qualifier | Double-quote " for any field containing a comma, quote, or newline |
| Decimal separator | Period . (e.g. 2430.65) |
| Date format | dd-MMM-yyyy (UTC) — e.g. 14-FEB-1985 |
| Datetime format | dd-MMM-yyyy hh:mm:ss tt (UTC) — e.g. 18-JUN-2026 11:11:39 AM |
| Empty values | Empty string between delimiters (no NULL literal) |
4.2 Column specification
Columns appear in the exact order below.
| # | Column | Data type / Format | Req. | Description | Lookup |
|---|---|---|---|---|---|
| 1 | BaladReference | String (≤200) | req | Unique Balad transaction reference. Primary key for status matching. | — |
| 2 | TransactionCreatedAt | Datetime dd-MMM-yyyy hh:mm:ss tt (UTC) | req | When the transaction was created at Balad. | — |
| 3 | SenderFullName | String (Latin) | req | Sender full name (English/Latin script). | — |
| 4 | SenderFullNameAr | String (Arabic) | req | Sender full name (Arabic script). | — |
| 5 | SenderNationality | String, ISO 3166-1 alpha-2 (2) | req | Sender nationality as ISO 3166-1 alpha-2 country code (e.g. EG). | — |
| 6 | SenderDOB | Date dd-MMM-yyyy | req | Sender date of birth. | — |
| 7 | ReceiverName | String (Latin) | req | Beneficiary full name (English/Latin script). | — |
| 8 | ReceiverNameAr | String (Arabic) | req | Beneficiary full name (Arabic script). | — |
| 9 | ReceiverContactNumber | String (digits, intl.) | req | Beneficiary contact number, intl. format without + (e.g. 201001234567). | — |
| 10 | TransactionType | Integer | req | Payout method. | Transaction Types |
| 11 | BusinessModel | String | req | Business model (e.g. C2C). | Business Model |
| 12 | PayoutAmount | Decimal (2 dp) | req | Amount to be paid to the beneficiary. | — |
| 13 | PayoutCurrency | String, ISO 4217 (3) | req | Payout currency (e.g. USD). | — |
| 14 | DestinationBank | String code | cond | Beneficiary bank code. Required for bank-account payouts. | Banks |
| 15 | AccountNumber | String | cond | Beneficiary account number or IBAN. Required for bank-account/card payouts. | — |
| 16 | WalletMobileNumber | String (digits) | cond | Beneficiary wallet mobile number. Required for wallet payouts. | — |
| 17 | PurposeOfTransfer | String code | req | Regulatory purpose of transfer. | Purpose |
TransactionType:
1 Cash → bank/account/wallet may be empty ·
2 BankAccount → DestinationBank + AccountNumber required ·
3 Wallet → WalletMobileNumber required ·
4 Card → AccountNumber required.
4.3 Header row (exact)
BaladReference,TransactionCreatedAt,SenderFullName,SenderFullNameAr,SenderNationality,SenderDOB,ReceiverName,ReceiverNameAr,ReceiverContactNumber,TransactionType,BusinessModel,PayoutAmount,PayoutCurrency,DestinationBank,AccountNumber,WalletMobileNumber,PurposeOfTransfer
5Lookup / Reference Data
Agreed enumerations for the coded columns. Kept in sync between both parties; changes are versioned and communicated before use.
5.1 Purpose of Transfer (PurposeOfTransfer)
Codes are 3-digit zero-padded strings.
| Code | Description |
|---|---|
| 002 | TRANSFER OF SAVINGS |
| 003 | TRANSFER TO OWN FOREIGN BANK AC |
| 004 | INVESTMENT |
| 005 | EDUCATIONAL EXPENSES |
| 006 | FOR SCHOOL/BOARDING FEES |
| 007 | HELP FOR NEEDY |
| 008 | GIFT |
| 011 | PAYMENT OF LOANS |
| 012 | PAYMENT OF INSURANCE PREMIUM |
| 013 | FOR MEDICAL TREATMENT |
| 014 | COVER FOR CORRESPONDENT ACCOUNTS |
| 015 | HOTEL RESERVATION |
| 016 | TOURISM |
| 017 | HOUSE RENT |
| 018 | INVESTMENT IN REAL ESTATE |
| 019 | INHERITANCE |
| 020 | OTHERS |
| 021 | Salaries |
5.2 Transaction Types (TransactionType)
| Code | Description |
|---|---|
| 1 | Cash |
| 2 | BankAccount |
| 3 | Wallet |
| 4 | Card |
5.3 Banks (DestinationBank)
37 bank codes — click to expand
| Code | Description |
|---|---|
| BDC | BANQUE DU CAIRE |
| CBE | CENTRAL BANK OF EGYPT CAIRO |
| MISR | BANQUE MISR |
| NBE | NATIONAL BANK OF EGYPT |
| BOA | BANK OF ALEXANDRIA S A E |
| EALB | EGYPTIAN ARAB LAND BANK |
| IDBE | INDUSTRIAL DEVELOPMENT BANK OF EGYPT |
| PDAC | AGRICULTURAL BANK OF EGYPT |
| CIB | COMMERCIAL INTERNATIONAL BANK |
| ENBD | EMIRATES NATIONAL BANK OF DUBAI SAE |
| SCB | SUEZ CANAL BANK |
| ABK | AL AHLI BANK OF KUWAIT - EGYPT S.A.E. |
| AUB | KUWAIT FINANCE HOUSE BANK (EGYPT) S.A.E. |
| ABRK | ALBARAKA BANK EGYPT |
| NBK | NATIONAL BANK OF KUWAIT - EGYPT |
| HSBC | HSBC BANK EGYPT S.A.E |
| UNB | ADCB Bank |
| EGB | EGYPTIAN GULF BANK |
| ADIB | ABU DHABI ISLAMIC BANK - EGYPT |
| UNBKE | THE UNITED BANK |
| MIDB | MISR IRAN DEVELOPMENT BANK |
| BBE | ATTIJARIWAFA BANK EGYPT S.A.E |
| SAIB | SOCIETE ARABE INTERNATIONALE DE |
| CAE | CREDIT AGRICOLE EGYPT |
| QNB | QATAR NATIONAL BANK ALAHLI S.A.E |
| HDB | HOUSING AND DEVELOPMENT BANK |
| ABC | Arab Banking Corporation |
| NBAD | FIRST ABU DHABI BANK |
| CITI | CITIBANK CAIRO |
| ARAB | ARAB BANK PLC |
| MASH | MASHREQ BANK |
| ARIB | ARAB INTERNATIONAL BANK |
| AAIB | ARAB AFRICAN INTERNATIONAL BANK |
| AIB | BANK NXT |
| FAIB | FAISAL ISLAMIC BANK OF EGYPT |
| EDBE | EXPORT DEVELOPMENT BANK OF EGYPT |
| POST | EGPPOST |
5.4 Business Model (BusinessModel)
| Code | Description |
|---|---|
| C2C | Customer-to-Customer |
| B2C | Business-to-Customer |
6Status Update File (Bank NXT → Balad)
Plain (unencrypted) CSV. Multiple rows per BaladReference are expected — one per lifecycle event.
6.1 File-level rules
| Format | CSV (comma , delimited) |
|---|---|
| Encoding | UTF-8 |
| Encryption | None (plain) |
| Header row | Yes — first line is the column header |
| Text qualifier | Double-quote " when needed |
| Datetime format | dd-MMM-yyyy hh:mm:ss tt (UTC) — e.g. 18-JUN-2026 11:11:39 AM |
| One file | Covers one batch |
6.2 Column specification
| # | Column | Data type / Format | Req. | Description |
|---|---|---|---|---|
| 1 | BaladReference | String | req | Must match a BaladReference from the transaction file. |
| 2 | Status | String (enum) | req | Current lifecycle status (owned by Bank NXT — see §7). |
| 3 | StatusTimestamp | Datetime dd-MMM-yyyy hh:mm:ss tt (UTC) | req | When the status was set. |
| 4 | AdditionalInfo | String | opt | Free-text detail / reason for the status. |
Header row (exact):
BaladReference,Status,StatusTimestamp,AdditionalInfo
6.3 Status values
The set of Status values (and rejection reasons) is owned and shared by Bank NXT. They are emitted at each step of Bank NXT's processing workflow — see §7. Bank NXT Processing Workflow.
7Bank NXT Processing Workflow (BPMN)
How Bank NXT processes each batch and the statuses it writes to the status file at every step. Source: Bank NXT – EDE – Balad project – BPMN – workflow – V0.13. Payment instructions are processed in parallel per record.
flowchart TD
Start([Robot listens for new file]) --> A{New master file added?}
A -- No --> Start
A -- Yes --> B[Create batch processing log file]
B --> C[["All records status = Received"]]
C --> P[/Process payment instructions in parallel/]
P --> BM{Business Model = C2C?}
BM -- No --> RJ1[["Rejected — Business model is not C2C"]]
BM -- Yes --> BAL[Check funding account balance]
BAL --> SB{Sufficient balance?}
SB -- No --> RJ2[["Rejected — Insufficient balance"]]
SB -- Yes --> LOCK[Lock funding amount + commission + fees]
LOCK --> COMP[["Check Compliance SAS — status = Under Compliance Review"]]
COMP --> WAIT1[Waiting for compliance response]
WAIT1 --> HIT{Hit?}
HIT -- Yes --> UNL1[Unlock funding amount] --> RJ3[["Rejected — Compliance rejected"]]
HIT -- No --> APP[["status = Compliance approved"]]
APP --> RT{Routing type?}
RT -- On-Us internal transfer --> VAL["Validate bank customer - CIF and sub-account in T24"]
VAL --> V{Valid?}
V -- No --> RJ4[["Rejected — Invalid CIF / receiving account"]]
V -- Yes --> CORE[["status = Sent to core"]]
CORE --> POST1["Post accounting entries and transfer to receiver"]
POST1 --> PD{Posted?}
PD -- Yes --> TR1[["status = Transferred"]]
PD -- No --> UNL2[Unlock funding amount] --> RJ5[["Rejected — Internal transfer not posted"]]
RT -- Third-party bank --> ACH1[["status = Sent to ACH"]]
ACH1 --> POST2["Post accounting entries and send ACH to bank"]
POST2 --> AW[["status = Awaits ACH response"]]
AW --> WAIT2[Waiting for ACH response]
WAIT2 --> TRD{Transferred?}
TRD -- Yes --> TR2[["status = Transferred"]]
TRD -- No --> REV[Reverse accounting entries] --> RJ6[["Rejected — ACH failed"]]
7.1 T24 customer validation (sub-process)
flowchart TD
S([Start]) --> VC[Validate CIF]
VC --> Q1{Valid CIF number?}
Q1 -- No --> R1[["Rejected — Invalid CIF"]]
Q1 -- Yes --> VS["Validate sub-account and match transaction currency"]
VS --> Q2{Valid sub-account?}
Q2 -- No --> R2[["Rejected — Invalid receiving account"]]
Q2 -- Yes --> OK([Valid → continue])
7.2 Statuses & rejection reasons
| Status | When |
|---|---|
Received | All records on initial batch log creation. |
Under Compliance Review | Sent to compliance screening (SAS). |
Compliance approved | Cleared compliance (no hit). |
Sent to core | On-Us internal transfer routed to core. |
Sent to ACH | Third-party bank transfer routed to ACH. |
Awaits ACH response | Waiting on ACH confirmation. |
Transferred | Payout completed (terminal success). |
Rejected | Terminal failure; reason in AdditionalInfo. |
Rejection reasons: Business model is not C2C · Insufficient balance · Compliance rejected · Invalid CIF · Invalid receiving account · Internal transfer not posted · ACH failed.
8Processing & Validation Rules
- Filename — reject files not matching the naming convention (§3).
- PGP — reject inbound files that fail decryption or signature verification.
- Header — column names and order must match exactly (§4.3 / §6.2).
- Encoding — files must be valid UTF-8; reject on decode errors (protects Arabic fields).
- Mandatory fields — reject rows missing any required field.
- Lookup validation — coded columns must exist in the reference tables (§5).
- Conditional fields — enforce the per-
TransactionTyperequirements. - Amount —
PayoutAmount> 0, max 2 decimals; valid ISO 4217 currency. - Datetime — all datetimes in UTC,
dd-MMM-yyyy hh:mm:ss tt(e.g.18-JUN-2026 11:11:39 AM). - Reference uniqueness —
BaladReferenceunique within a batch. - Status matching — every status
BaladReferencemust correspond to a previously sent transaction.
9Open Items / To Confirm
| # | Item |
|---|---|
| 1 | Bank NXT connectivity setup (SFTP host, port, SSH keys, IP allowlisting). |
| 2 | Bank NXT account creation / credentials provisioning. |
| 3 | Shared PGP keys exchanged and a test file validated (decrypt + signature). |
| 4 | SFTP polling cadence / SLA for status returns. |
| 5 | Bank NXT to share the full list of statuses and their meanings. |