WEAF MRA EIS API
Malawi Revenue Authority EIS API Documentation
A REST API for the Malawi Revenue Authority's Electronic Invoicing System (EIS). It handles terminal activation, MRA credentials, tax calculations, invoice numbering and MRA payload formatting, so your POS, ERP or e-commerce system only sends plain JSON over HTTPS.
Tax receipts
Send line items and get back an MRA-fiscalised receipt. The API calculates VAT and builds the invoice summary for you.
Stock
Products, adjustments, informal purchases, transfers and raw material conversion.
Terminals
Activate MRA terminals, sync configuration and recover blocked or expired terminals.
Base URL
https://weafcompany.comEvery endpoint lives under /api/v1 and belongs to one of two families:
| Path | Purpose |
|---|---|
/api/v1/auth/* | Generate, validate and refresh your WEAF API access token. |
/api/v1/{tin}/* | MRA EIS operations for one taxpayer. {tin} is the company's MRA Taxpayer Identification Number, for example 20154457. |
Request shape
MRA operations are POST requests with a JSON body. The access token and the target environment go in the query string. Send the token as a Bearer header as well:
POST /api/v1/{tin}/generate-tax-receipt?deploymentEnvironment=Sandbox&token=YOUR_API_TOKEN
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
Accept: application/json| Parameter | In | Description |
|---|---|---|
deploymentEnvironment | query | Sandbox or Production. Selects which MRA EIS instance the call is routed to. Endpoints that only read WEAF's local records (terminal list, local receipts, local void requests, local stock adjustments) don't take it. |
token | query | Your WEAF API access token. See Authentication. |
โ ๏ธ Sandbox first
Production submits real fiscal documents to MRA under your TIN, and they can't be deleted. Build and test against Sandbox, and only switch once your plan is active and the production configuration has been approved.
Response format
Every response uses the same envelope. returnCode "00" means success. Any other code is an error, and returnMessage says why.
{
"status": {
"returnCode": "00",
"returnMessage": "SUCCESS"
},
"data": { ... }
}Key identifiers
| Identifier | Where it comes from |
|---|---|
tin | The company's MRA TIN, registered on your WEAF account. |
terminalId | Returned when you activate a terminal, and listed by Get configured terminals. Most MRA calls need it. |
siteId | The MRA site (branch or outlet) a terminal belongs to. It's returned with the terminal. |
referenceNo | Your own reference for a transaction. Reusing one on the same terminal is rejected as a duplicate. |
Next steps
Follow the onboarding guide from account creation to your first tax receipt, or test live in Swagger.