kra-etims-sdk 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kra-etims-sdk
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for KRA eTIMS OSCU API
5
5
  Author: Emmanuel Bartile
6
6
  License: MIT
@@ -191,7 +191,8 @@ flowchart TD
191
191
  Before integration, you **MUST** complete these prerequisites:
192
192
 
193
193
  ### 1. Device Registration (MANDATORY)
194
- - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://sbx.kra.go.ke)
194
+ - Register OSCU device via [eTIMS Taxpayer Production Portal](https://etims.kra.go.ke)
195
+ - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://etims-sbx.kra.go.ke)
195
196
  - Obtain **approved device serial number** (`dvcSrlNo`)
196
197
  - ⚠️ **Dynamic/unregistered device serials fail with `resultCd: 901`** ("It is not valid device")
197
198
 
@@ -201,7 +202,7 @@ Before integration, you **MUST** complete these prerequisites:
201
202
  response = etims.select_init_osdc_info({
202
203
  "tin": config.oscu["tin"],
203
204
  "bhfId": config.oscu["bhf_id"],
204
- "dvcSrlNo": "dvcv1130", # KRA-approved serial
205
+ "dvcSrlNo": config.oscu["device_serial"], # KRA-approved serial
205
206
  })
206
207
 
207
208
  # 2. Extract cmcKey (sandbox returns at root level)
@@ -304,14 +305,14 @@ config = KraEtimsConfig(
304
305
  },
305
306
 
306
307
  api={
307
- "sandbox": {"base_url": "https://sbx.kra.go.ke/etims-oscu/api/v1".strip()},
308
- "production": {"base_url": "https://api.developer.go.ke/etims-oscu/api/v1".strip()}
308
+ "sandbox": {"base_url": "https://etims-api-sbx.kra.go.ke/etims-api".strip()},
309
+ "production": {"base_url": "https://etims-api.kra.go.ke/etims-api".strip()}
309
310
  },
310
311
 
311
312
  oscu={
312
313
  "tin": os.environ["KRA_TIN"],
313
- "bhf_id": os.environ["KRA_BHF_ID"],
314
- "cmc_key": "", # Set AFTER initialization
314
+ "bhf_id": os.environ["KRA_BHF_ID"],
315
+ "cmc_key": os.environ["CMC_KEY"] # Set AFTER initialization
315
316
  },
316
317
 
317
318
  endpoints={
@@ -355,7 +356,7 @@ config = KraEtimsConfig(
355
356
  ```
356
357
 
357
358
  > 💡 **Production URL Note**:
358
- > Production base URL is `https://api.developer.go.ke/etims-oscu/api/v1` (NOT `kra.go.ke`)
359
+ > Production base URL is `https://etims-api.kra.go.ke/etims-api` (NOT `https://etims-api-sbx.kra.go.ke/etims-api`)
359
360
 
360
361
  ---
361
362
 
@@ -719,7 +720,7 @@ KRA mandates successful completion of automated tests before verification:
719
720
  3. Deploy directly to production environment
720
721
  4. No SLA execution required
721
722
 
722
- > 💡 **Production URL**: `https://api.developer.go.ke/etims-oscu/api/v1`
723
+ > 💡 **Production URL**: `https://etims-api.kra.go.ke/etims-api`
723
724
  > ⚠️ **Never use sandbox credentials in production** – KRA monitors environment separation strictly
724
725
 
725
726
  ---
@@ -168,7 +168,8 @@ flowchart TD
168
168
  Before integration, you **MUST** complete these prerequisites:
169
169
 
170
170
  ### 1. Device Registration (MANDATORY)
171
- - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://sbx.kra.go.ke)
171
+ - Register OSCU device via [eTIMS Taxpayer Production Portal](https://etims.kra.go.ke)
172
+ - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://etims-sbx.kra.go.ke)
172
173
  - Obtain **approved device serial number** (`dvcSrlNo`)
173
174
  - ⚠️ **Dynamic/unregistered device serials fail with `resultCd: 901`** ("It is not valid device")
174
175
 
@@ -178,7 +179,7 @@ Before integration, you **MUST** complete these prerequisites:
178
179
  response = etims.select_init_osdc_info({
179
180
  "tin": config.oscu["tin"],
180
181
  "bhfId": config.oscu["bhf_id"],
181
- "dvcSrlNo": "dvcv1130", # KRA-approved serial
182
+ "dvcSrlNo": config.oscu["device_serial"], # KRA-approved serial
182
183
  })
183
184
 
184
185
  # 2. Extract cmcKey (sandbox returns at root level)
@@ -281,14 +282,14 @@ config = KraEtimsConfig(
281
282
  },
282
283
 
283
284
  api={
284
- "sandbox": {"base_url": "https://sbx.kra.go.ke/etims-oscu/api/v1".strip()},
285
- "production": {"base_url": "https://api.developer.go.ke/etims-oscu/api/v1".strip()}
285
+ "sandbox": {"base_url": "https://etims-api-sbx.kra.go.ke/etims-api".strip()},
286
+ "production": {"base_url": "https://etims-api.kra.go.ke/etims-api".strip()}
286
287
  },
287
288
 
288
289
  oscu={
289
290
  "tin": os.environ["KRA_TIN"],
290
- "bhf_id": os.environ["KRA_BHF_ID"],
291
- "cmc_key": "", # Set AFTER initialization
291
+ "bhf_id": os.environ["KRA_BHF_ID"],
292
+ "cmc_key": os.environ["CMC_KEY"] # Set AFTER initialization
292
293
  },
293
294
 
294
295
  endpoints={
@@ -332,7 +333,7 @@ config = KraEtimsConfig(
332
333
  ```
333
334
 
334
335
  > 💡 **Production URL Note**:
335
- > Production base URL is `https://api.developer.go.ke/etims-oscu/api/v1` (NOT `kra.go.ke`)
336
+ > Production base URL is `https://etims-api.kra.go.ke/etims-api` (NOT `https://etims-api-sbx.kra.go.ke/etims-api`)
336
337
 
337
338
  ---
338
339
 
@@ -696,7 +697,7 @@ KRA mandates successful completion of automated tests before verification:
696
697
  3. Deploy directly to production environment
697
698
  4. No SLA execution required
698
699
 
699
- > 💡 **Production URL**: `https://api.developer.go.ke/etims-oscu/api/v1`
700
+ > 💡 **Production URL**: `https://etims-api.kra.go.ke/etims-api`
700
701
  > ⚠️ **Never use sandbox credentials in production** – KRA monitors environment separation strictly
701
702
 
702
703
  ---
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kra-etims-sdk
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for KRA eTIMS OSCU API
5
5
  Author: Emmanuel Bartile
6
6
  License: MIT
@@ -191,7 +191,8 @@ flowchart TD
191
191
  Before integration, you **MUST** complete these prerequisites:
192
192
 
193
193
  ### 1. Device Registration (MANDATORY)
194
- - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://sbx.kra.go.ke)
194
+ - Register OSCU device via [eTIMS Taxpayer Production Portal](https://etims.kra.go.ke)
195
+ - Register OSCU device via [eTIMS Taxpayer Sandbox Portal](https://etims-sbx.kra.go.ke)
195
196
  - Obtain **approved device serial number** (`dvcSrlNo`)
196
197
  - ⚠️ **Dynamic/unregistered device serials fail with `resultCd: 901`** ("It is not valid device")
197
198
 
@@ -201,7 +202,7 @@ Before integration, you **MUST** complete these prerequisites:
201
202
  response = etims.select_init_osdc_info({
202
203
  "tin": config.oscu["tin"],
203
204
  "bhfId": config.oscu["bhf_id"],
204
- "dvcSrlNo": "dvcv1130", # KRA-approved serial
205
+ "dvcSrlNo": config.oscu["device_serial"], # KRA-approved serial
205
206
  })
206
207
 
207
208
  # 2. Extract cmcKey (sandbox returns at root level)
@@ -304,14 +305,14 @@ config = KraEtimsConfig(
304
305
  },
305
306
 
306
307
  api={
307
- "sandbox": {"base_url": "https://sbx.kra.go.ke/etims-oscu/api/v1".strip()},
308
- "production": {"base_url": "https://api.developer.go.ke/etims-oscu/api/v1".strip()}
308
+ "sandbox": {"base_url": "https://etims-api-sbx.kra.go.ke/etims-api".strip()},
309
+ "production": {"base_url": "https://etims-api.kra.go.ke/etims-api".strip()}
309
310
  },
310
311
 
311
312
  oscu={
312
313
  "tin": os.environ["KRA_TIN"],
313
- "bhf_id": os.environ["KRA_BHF_ID"],
314
- "cmc_key": "", # Set AFTER initialization
314
+ "bhf_id": os.environ["KRA_BHF_ID"],
315
+ "cmc_key": os.environ["CMC_KEY"] # Set AFTER initialization
315
316
  },
316
317
 
317
318
  endpoints={
@@ -355,7 +356,7 @@ config = KraEtimsConfig(
355
356
  ```
356
357
 
357
358
  > 💡 **Production URL Note**:
358
- > Production base URL is `https://api.developer.go.ke/etims-oscu/api/v1` (NOT `kra.go.ke`)
359
+ > Production base URL is `https://etims-api.kra.go.ke/etims-api` (NOT `https://etims-api-sbx.kra.go.ke/etims-api`)
359
360
 
360
361
  ---
361
362
 
@@ -719,7 +720,7 @@ KRA mandates successful completion of automated tests before verification:
719
720
  3. Deploy directly to production environment
720
721
  4. No SLA execution required
721
722
 
722
- > 💡 **Production URL**: `https://api.developer.go.ke/etims-oscu/api/v1`
723
+ > 💡 **Production URL**: `https://etims-api.kra.go.ke/etims-api`
723
724
  > ⚠️ **Never use sandbox credentials in production** – KRA monitors environment separation strictly
724
725
 
725
726
  ---
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kra-etims-sdk"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Python SDK for KRA eTIMS OSCU API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes