collection-api-refacil-mcp 1.0.5 → 1.0.7

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.
package/README.md CHANGED
@@ -270,12 +270,6 @@ Each request must include the correct headers. Tokens have time-based expiration
270
270
  - You must include both `x-secret-id` and `Authorization: Bearer` headers to request it.
271
271
 
272
272
 
273
- ### 📥 Request Body Parameters
274
-
275
- | Field | Type | Required | Description |
276
- | --- | --- | --- | --- |
277
- | `service` | string | ✅ | Service path for which the OTT is requested (e.g. `/collection/submit-payment`). Min. 1 character, max. 256 characters. |
278
-
279
273
  ### 🔐 **Endpoints that require One-Time Token**
280
274
 
281
275
  | HTTP Method | Endpoint URL | Description |
@@ -299,12 +293,12 @@ This endpoint handles financial transactions and collections. It processes payme
299
293
 
300
294
  | Field | Type | Required | Description |
301
295
  | --- | --- | --- | --- |
302
- | `reference` | Integer | ✅ | Unique transaction reference number. Min. 1 digit, max. 50 digits. |
303
- | `agreementId` | Integer | ✅ | ID of the agreement (company) that is making the payment. Only authorized values (e.g. 18252, 18253). |
304
- | `amount` | Integer | ✅ | Amount to be charged, in COP (Colombian Pesos). Min. 1, max. per agreement. |
305
- | `date` | String | ✅ | Transaction date in format `YYYY-MM-DD` (10 characters). |
306
- | `time` | String | ✅ | Transaction time in format `HH:mm` (24-hour clock, Bogotá time zone). 5 characters. |
307
- | `ip` | String | ✅ | IP address of the client. Min. 7 characters (IPv4), max. 45 (IPv6). |
296
+ | `reference` | Integer | ✅ | The reference for the transaction. Min. 1 character, max. 50 characters. |
297
+ | `agreementId` | Integer | ✅ | ID of the agreement (company) that is making the payment |
298
+ | `amount` | Integer | ✅ | Amount to be charged, in COP (Colombian Pesos) |
299
+ | `date` | String | ✅ | Transaction date in format `YYYY-MM-DD` |
300
+ | `time` | String | ✅ | Transaction time in format `HH:mm` (24-hour clock, Bogotá time zone) |
301
+ | `ip` | String | ✅ | IP address of the client |
308
302
 
309
303
  ---
310
304
 
@@ -330,23 +324,23 @@ This endpoint handles financial transactions and collections. It processes payme
330
324
  | amount | number | Campo del body: amount |
331
325
  | date | string | Campo del body: date |
332
326
  | time | string | Campo del body: time |
327
+ | ip | string | Campo del body: ip |
333
328
 
334
329
  ### `auth_validate`
335
330
 
336
- ## 📝Recommendations
331
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
332
+
333
+ ## 📝 Recommendations
337
334
 
338
335
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
339
-
340
336
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
341
-
342
337
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
343
-
344
338
 
345
- ## 🔐Authorization
339
+ ## 🔐 Authorization
346
340
 
347
341
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
348
342
 
349
- **Token Format:**
343
+ **Token format:**
350
344
 
351
345
  `Authorization: Token {generate_token_value}`
352
346
 
@@ -354,6 +348,42 @@ To establish a secure connection with our clients' APIs, we will generate and pr
354
348
 
355
349
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
356
350
 
351
+ ## ❗ Error handling
352
+
353
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
354
+
355
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
356
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
357
+
358
+ ## 🧱 Error response structure
359
+
360
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
361
+
362
+ ### Option A — Minimum structure (recommended for all endpoints)
363
+
364
+ Return a JSON body with at least:
365
+
366
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
367
+ - `message` (string): Human-readable message describing the error.
368
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
369
+
370
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
371
+
372
+ For transactional operations, use this structure:
373
+
374
+ - `message` (string): Message describing the error.
375
+ - `reference` (string): Reference associated with the operation.
376
+ - `amount` (number): Amount (0 in case of error).
377
+ - `code` (string): Business status code (e.g. `003`, `004`).
378
+ - `user_code` (string): User code when applicable.
379
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
380
+
381
+ ### Authentication errors (401/403)
382
+
383
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
384
+
385
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
386
+
357
387
  This endpoint allows you to validate a JWT token by sending an HTTP POST request to {{base_url}}/auth/validate.
358
388
 
359
389
  **Base URL:**
@@ -391,20 +421,19 @@ To establish a secure connection with our clients' APIs, we will generate and pr
391
421
 
392
422
  ### `ping`
393
423
 
394
- ## 📝Recommendations
424
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
425
+
426
+ ## 📝 Recommendations
395
427
 
396
428
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
397
-
398
429
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
399
-
400
430
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
401
-
402
431
 
403
- ## 🔐Authorization
432
+ ## 🔐 Authorization
404
433
 
405
434
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
406
435
 
407
- **Token Format:**
436
+ **Token format:**
408
437
 
409
438
  `Authorization: Token {generate_token_value}`
410
439
 
@@ -412,6 +441,42 @@ To establish a secure connection with our clients' APIs, we will generate and pr
412
441
 
413
442
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
414
443
 
444
+ ## ❗ Error handling
445
+
446
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
447
+
448
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
449
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
450
+
451
+ ## 🧱 Error response structure
452
+
453
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
454
+
455
+ ### Option A — Minimum structure (recommended for all endpoints)
456
+
457
+ Return a JSON body with at least:
458
+
459
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
460
+ - `message` (string): Human-readable message describing the error.
461
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
462
+
463
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
464
+
465
+ For transactional operations, use this structure:
466
+
467
+ - `message` (string): Message describing the error.
468
+ - `reference` (string): Reference associated with the operation.
469
+ - `amount` (number): Amount (0 in case of error).
470
+ - `code` (string): Business status code (e.g. `003`, `004`).
471
+ - `user_code` (string): User code when applicable.
472
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
473
+
474
+ ### Authentication errors (401/403)
475
+
476
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
477
+
478
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
479
+
415
480
  This endpoint sends an HTTP GET request to {{customer.domain.com}}/ping/ in order to check the availability of the server.
416
481
 
417
482
  ### Benefits 🩺
@@ -433,20 +498,19 @@ The request does not contain a request body.
433
498
 
434
499
  ### `querybill`
435
500
 
436
- ## 📝Recommendations
501
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
502
+
503
+ ## 📝 Recommendations
437
504
 
438
505
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
439
-
440
506
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
441
-
442
507
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
443
-
444
508
 
445
- ## 🔐Authorization
509
+ ## 🔐 Authorization
446
510
 
447
511
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
448
512
 
449
- **Token Format:**
513
+ **Token format:**
450
514
 
451
515
  `Authorization: Token {generate_token_value}`
452
516
 
@@ -454,6 +518,42 @@ To establish a secure connection with our clients' APIs, we will generate and pr
454
518
 
455
519
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
456
520
 
521
+ ## ❗ Error handling
522
+
523
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
524
+
525
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
526
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
527
+
528
+ ## 🧱 Error response structure
529
+
530
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
531
+
532
+ ### Option A — Minimum structure (recommended for all endpoints)
533
+
534
+ Return a JSON body with at least:
535
+
536
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
537
+ - `message` (string): Human-readable message describing the error.
538
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
539
+
540
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
541
+
542
+ For transactional operations, use this structure:
543
+
544
+ - `message` (string): Message describing the error.
545
+ - `reference` (string): Reference associated with the operation.
546
+ - `amount` (number): Amount (0 in case of error).
547
+ - `code` (string): Business status code (e.g. `003`, `004`).
548
+ - `user_code` (string): User code when applicable.
549
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
550
+
551
+ ### Authentication errors (401/403)
552
+
553
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
554
+
555
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
556
+
457
557
  This endpoint allows you to query a bill by sending an HTTP POST request to `{{customer.domain.com}}/queryBill/`.
458
558
 
459
559
  ### Benefits 🔎
@@ -471,17 +571,17 @@ To establish a secure connection with our clients' APIs, we will generate and pr
471
571
 
472
572
  | Field | Type | Required | Description |
473
573
  | --- | --- | --- | --- |
474
- | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier). Min. 1 character, max. 50 characters. |
475
- | `reference` | string | ✅ | Invoice or agreement reference to query. Min. 1 character, max. 50 characters. |
476
- | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` (10 characters). |
477
- | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone). 8 characters. |
574
+ | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier) |
575
+ | `reference` | string | ✅ | ID of the agreement (company) that is making the payment |
576
+ | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` |
577
+ | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone) |
478
578
 
479
579
  ### **📤 Response body parameters**
480
580
 
481
581
  | **Field** | **Type** | **Description** |
482
582
  | --- | --- | --- |
483
583
  | `message` | string | A message related to the query. |
484
- | `reference` | string | The reference of the bill. |
584
+ | `reference` | string | The reference of the bill. Must be unique per transaction; once a payment has been made with a given reference, that reference cannot be reused. |
485
585
  | `amount` | number | The amount of the bill. |
486
586
  | `code` | string | The code related to the bill. |
487
587
  | `user_code` | string | The user code related to the bill. |
@@ -510,20 +610,19 @@ When `paymentOrder` is present in the response, it contains the following struct
510
610
 
511
611
  ### `submittransaction`
512
612
 
513
- ## 📝Recommendations
613
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
614
+
615
+ ## 📝 Recommendations
514
616
 
515
617
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
516
-
517
618
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
518
-
519
619
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
520
-
521
620
 
522
- ## 🔐Authorization
621
+ ## 🔐 Authorization
523
622
 
524
623
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
525
624
 
526
- **Token Format:**
625
+ **Token format:**
527
626
 
528
627
  `Authorization: Token {generate_token_value}`
529
628
 
@@ -531,13 +630,52 @@ To establish a secure connection with our clients' APIs, we will generate and pr
531
630
 
532
631
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
533
632
 
633
+ ## ❗ Error handling
634
+
635
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
636
+
637
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
638
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
639
+
640
+ ## 🧱 Error response structure
641
+
642
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
643
+
644
+ ### Option A — Minimum structure (recommended for all endpoints)
645
+
646
+ Return a JSON body with at least:
647
+
648
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
649
+ - `message` (string): Human-readable message describing the error.
650
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
651
+
652
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
653
+
654
+ For transactional operations, use this structure:
655
+
656
+ - `message` (string): Message describing the error.
657
+ - `reference` (string): Reference associated with the operation.
658
+ - `amount` (number): Amount (0 in case of error).
659
+ - `code` (string): Business status code (e.g. `003`, `004`).
660
+ - `user_code` (string): User code when applicable.
661
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
662
+
663
+ ### Authentication errors (401/403)
664
+
665
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
666
+
667
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
668
+
534
669
  This API endpoint allows you to submit a transaction via an HTTP POST request to {{customer.domain.com}}/submitTransaction/.
535
670
 
536
671
  ### Benefits 💳
537
672
 
538
673
  - **Transactional idempotency**: `transactionId` avoids double charges on retries/timeouts.
674
+
539
675
  - **Eventual consistency**: queues + webhook confirmations reduce manual reconciliation.
676
+
540
677
  - **Operational scalability**: async processing absorbs traffic spikes.
678
+
541
679
  - **Multiple payment items**: support for partial payments or multiple concepts within a single transaction via `paymentOrderItems`.
542
680
 
543
681
 
@@ -547,13 +685,13 @@ To establish a secure connection with our clients' APIs, we will generate and pr
547
685
 
548
686
  | **Field** | **Type** | **Required** | **Description** |
549
687
  | --- | --- | --- | --- |
550
- | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier). Min. 1 character, max. 50 characters. |
551
- | `transactionId` | string | ✅ | The transaction ID. Min. 1 character, max. 50 characters. |
688
+ | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier) |
689
+ | `transactionId` | string | ✅ | The transaction ID. |
552
690
  | `reference` | string | ✅ | The reference for the transaction. Min. 1 character, max. 50 characters. |
553
- | `amount` | number | ✅ | The amount of the transaction. Max. per agreement. |
554
- | `paymentOrderItems` | array | ❌ | Array of payment order items (max. 10 items). Each item: `id` (number, required), `description` (string, required, min. 1 max. 50 characters), `amount` (number, required). |
555
- | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` (10 characters). |
556
- | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone). 8 characters. |
691
+ | `amount` | number | ✅ | The amount of the transaction. |
692
+ | `paymentOrderItems` | array | ❌ | Array of payment order items representing individual payment values within a reference with multiple values. Maximum 10 items. Each item must contain: `id` (number, required), `description` (string, required, max 50 characters), and `amount` (number, required). |
693
+ | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` |
694
+ | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone) |
557
695
 
558
696
  #### 📋 PaymentOrderItems Structure
559
697
 
@@ -562,7 +700,7 @@ When using `paymentOrderItems`, each element in the array must have the followin
562
700
  | **Field** | **Type** | **Required** | **Description** |
563
701
  | --- | --- | --- | --- |
564
702
  | `id` | number | ✅ | Unique numeric identifier for the payment value |
565
- | `description` | string | ✅ | Description of the payment value. Min. 1 character, max. 50 characters. |
703
+ | `description` | string | ✅ | Description of the payment value (maximum 50 characters) |
566
704
  | `amount` | number | ✅ | Numeric value to be paid |
567
705
 
568
706
  **Note**: When `paymentOrderItems` is provided, it allows processing multiple payment concepts or partial payments within a single transaction. The main `amount` field should match the sum of all `amount` values in `paymentOrderItems`.
@@ -592,20 +730,19 @@ When using `paymentOrderItems`, each element in the array must have the followin
592
730
 
593
731
  ### `rollbacktransaction`
594
732
 
595
- ## 📝Recommendations
733
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
734
+
735
+ ## 📝 Recommendations
596
736
 
597
737
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
598
-
599
738
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
600
-
601
739
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
602
-
603
740
 
604
- ## 🔐Authorization
741
+ ## 🔐 Authorization
605
742
 
606
743
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
607
744
 
608
- **Token Format:**
745
+ **Token format:**
609
746
 
610
747
  `Authorization: Token {generate_token_value}`
611
748
 
@@ -613,6 +750,42 @@ To establish a secure connection with our clients' APIs, we will generate and pr
613
750
 
614
751
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
615
752
 
753
+ ## ❗ Error handling
754
+
755
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
756
+
757
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
758
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
759
+
760
+ ## 🧱 Error response structure
761
+
762
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
763
+
764
+ ### Option A — Minimum structure (recommended for all endpoints)
765
+
766
+ Return a JSON body with at least:
767
+
768
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
769
+ - `message` (string): Human-readable message describing the error.
770
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
771
+
772
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
773
+
774
+ For transactional operations, use this structure:
775
+
776
+ - `message` (string): Message describing the error.
777
+ - `reference` (string): Reference associated with the operation.
778
+ - `amount` (number): Amount (0 in case of error).
779
+ - `code` (string): Business status code (e.g. `003`, `004`).
780
+ - `user_code` (string): User code when applicable.
781
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
782
+
783
+ ### Authentication errors (401/403)
784
+
785
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
786
+
787
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
788
+
616
789
  This API endpoint allows you to submit a transaction via an HTTP POST request to {{customer.domain.com}}/rollbackTransaction/.
617
790
 
618
791
  ### Benefits 🔁
@@ -628,13 +801,13 @@ To establish a secure connection with our clients' APIs, we will generate and pr
628
801
 
629
802
  | Field | Type | **Required** | **Description** |
630
803
  | --- | --- | --- | --- |
631
- | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier). Min. 1 character, max. 50 characters. |
632
- | `transactionId` | string | ✅ | The transaction ID. Min. 1 character, max. 50 characters. |
633
- | `reference` | string | ✅ | The reference for the transaction. Min. 1 character, max. 50 characters. |
634
- | `amount` | number | ✅ | The amount of the transaction. Max. per agreement. |
635
- | `paymentOrderItems` | array | ❌ | Array of payment order items (max. 10 items). Each item: `id` (number, required), `description` (string, required, min. 1 max. 50 characters), `amount` (number, required). |
636
- | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` (10 characters). |
637
- | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone). 8 characters. |
804
+ | `codCustomer` | string | ✅ | The customer code. (Is a constant that identifies us with the supplier) |
805
+ | `transactionId` | string | ✅ | The transaction ID. |
806
+ | `reference` | string | ✅ | The reference for the transaction. |
807
+ | `amount` | number | ✅ | The amount of the transaction. |
808
+ | `paymentOrderItems` | array | ❌ | Array of payment order items representing individual payment values within a reference with multiple values. Maximum 10 items. Each item must contain: `id` (number, required), `description` (string, required, max 50 characters), and `amount` (number, required). |
809
+ | `date` | string | ✅ | Transaction date in format `YYYY-MM-DD` |
810
+ | `time` | string | ✅ | Transaction time in format `HH:mm:ss` (24-hour clock, Bogotá time zone) |
638
811
 
639
812
  #### 📋 PaymentOrderItems Structure
640
813
 
@@ -643,7 +816,7 @@ When using `paymentOrderItems`, each element in the array must have the followin
643
816
  | **Field** | **Type** | **Required** | **Description** |
644
817
  | --- | --- | --- | --- |
645
818
  | `id` | number | ✅ | Unique numeric identifier for the payment value |
646
- | `description` | string | ✅ | Description of the payment value. Min. 1 character, max. 50 characters. |
819
+ | `description` | string | ✅ | Description of the payment value (maximum 50 characters) |
647
820
  | `amount` | number | ✅ | Numeric value to be paid |
648
821
 
649
822
  **Note**: When `paymentOrderItems` is provided, it allows rollback of transactions with multiple payment concepts. The main `amount` field should match the sum of all `amount` values in `paymentOrderItems`.
@@ -673,20 +846,19 @@ When using `paymentOrderItems`, each element in the array must have the followin
673
846
 
674
847
  ### `webhook`
675
848
 
676
- ## 📝Recommendations
849
+ Collection of Own Network services. Integrators expose these endpoints so the platform can query bills, submit payments, and receive notifications in a consistent way.
850
+
851
+ ## 📝 Recommendations
677
852
 
678
853
  - Establish a dedicated **QA environment** to perform thorough testing before production deployment.
679
-
680
854
  - Set a minimum timeout of **60 milliseconds** for API requests to handle longer processes reliably.
681
-
682
855
  - Provide clear and **standardized error mapping**, detailing error codes, messages, and causes for better troubleshooting.
683
-
684
856
 
685
- ## 🔐Authorization
857
+ ## 🔐 Authorization
686
858
 
687
859
  To establish a secure connection with our clients' APIs, we will generate and provide you with an authorization token. This token will allow us to authenticate with the API that our clients build.
688
860
 
689
- **Token Format:**
861
+ **Token format:**
690
862
 
691
863
  `Authorization: Token {generate_token_value}`
692
864
 
@@ -694,6 +866,42 @@ To establish a secure connection with our clients' APIs, we will generate and pr
694
866
 
695
867
  `Authorization: Token eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9**`
696
868
 
869
+ ## ❗ Error handling
870
+
871
+ All errors must return an HTTP status code in the **4xx or 5xx family** (i.e. **400 or above**). Do not return 2xx codes when the operation has failed.
872
+
873
+ - **4xx (client errors)**: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, etc.
874
+ - **5xx (server errors)**: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, etc.
875
+
876
+ ## 🧱 Error response structure
877
+
878
+ There is no single mandatory error schema across all endpoints. One of the following patterns is recommended depending on the endpoint type.
879
+
880
+ ### Option A — Minimum structure (recommended for all endpoints)
881
+
882
+ Return a JSON body with at least:
883
+
884
+ - `statusCode` (number): HTTP status code of the response (must match the HTTP status).
885
+ - `message` (string): Human-readable message describing the error.
886
+ - `errorCode` (string, optional): Internal error code for integration/support (e.g. `auth.invalid`, `billing.not_found`).
887
+
888
+ ### Option B — Transactional endpoints (`queryBill`, `submitTransaction`, `rollbackTransaction`)
889
+
890
+ For transactional operations, use this structure:
891
+
892
+ - `message` (string): Message describing the error.
893
+ - `reference` (string): Reference associated with the operation.
894
+ - `amount` (number): Amount (0 in case of error).
895
+ - `code` (string): Business status code (e.g. `003`, `004`).
896
+ - `user_code` (string): User code when applicable.
897
+ - `additional_data` (array): List of `{ "label", "value" }` objects with additional information.
898
+
899
+ ### Authentication errors (401/403)
900
+
901
+ Some examples only return `detail` (string) or a combination of `message`, `error`, and `statusCode`. When possible, align these responses with Option A for consistency.
902
+
903
+ In all cases, the error body must be JSON and must provide enough information for the integrator to identify the failure, correct the data, or decide whether to retry.
904
+
697
905
  This endpoint allows you to receive transaction notifications processed by the payment system. The merchant must implement this endpoint to receive transaction status updates.
698
906
 
699
907
  ### Benefits 🔔
@@ -712,12 +920,12 @@ To establish a secure connection with our clients' APIs, we will generate and pr
712
920
  | realAmount | number | ✅ | Real transaction amount (without costs) |
713
921
  | amount | number | ✅ | Total transaction amount (including costs) |
714
922
  | cost | string | ✅ | Total transaction cost |
715
- | referenceId | string | ✅ | Unique transaction identifier. Min. 1 character, max. 50 characters. |
716
- | customerReference | string | ✅ | Customer reference provided during the transaction. Min. 1 character, max. 50 characters. |
717
- | updatedAt | string | ✅ | Date and time of last update. Format "YYYY-MM-DD HH:mm:ss" (19 characters). |
718
- | status | number | ✅ | Transaction status ID: 1 Pending, 2 Approved, 3 Failed (values 1-3). |
719
- | sign | string | ✅ | Security signature to validate message integrity. Min. 1 character, max. 64 characters (HMAC-SHA1 hex). |
720
- | paymentOrderItems | array | ❌ | Array of payment order items (max. 10 items). Each item: `id` (number), `description` (min. 1 max. 50 characters), `amount` (number). |
923
+ | referenceId | string | ✅ | Unique transaction identifier |
924
+ | customerReference | string | ✅ | Customer reference provided during the transaction |
925
+ | updatedAt | string | ✅ | Date and time of last update (format: "YYYY-MM-DD HH:mm:ss") |
926
+ | status | number | ✅ | Transaction status ID : 1 Pending , 2 Approved ,3 Failed |
927
+ | sign | string | ✅ | Security signature to validate message integrity |
928
+ | paymentOrderItems | array | ❌ | Array of payment order items that were processed. This field is optional and will only be present when the transaction included multiple payment concepts. Each item contains: `id` (number, required), `description` (string, required), and `amount` (number, required). |
721
929
 
722
930
  #### 📋 PaymentOrderItems Structure
723
931
 
@@ -726,7 +934,7 @@ When `paymentOrderItems` is present in the webhook payload, it indicates that th
726
934
  | **Field** | **Type** | **Required** | **Description** |
727
935
  | --- | --- | --- | --- |
728
936
  | `id` | number | ✅ | Unique numeric identifier for the payment value |
729
- | `description` | string | ✅ | Description of the payment value. Min. 1 character, max. 50 characters. |
937
+ | `description` | string | ✅ | Description of the payment value |
730
938
  | `amount` | number | ✅ | Numeric value that was paid |
731
939
 
732
940
  **Note**: When `paymentOrderItems` is present, the `amount` field represents the total sum of all items. Verify that the sum of `paymentOrderItems[].amount` equals the total `amount`.
package/dist/core/auth.js CHANGED
@@ -128,8 +128,16 @@ export const authManager = new SecretIdAuthManager(appConfig.secretId, authUrl,
128
128
  // En STDIO mode: siempre usa el secretId del .env
129
129
  // IMPORTANTE: Para authType 'secretId', se incluyen tanto Authorization como x-secret-id
130
130
  export async function getAuthHeaders(secretId) {
131
- const targetSecretId = secretId || appConfig.secretId;
132
- const token = await authManager.getValidToken(secretId);
131
+ // Ignorar completamente el secretId de argumentos: la autenticación SIEMPRE viene de appConfig.
132
+ // También protegemos contra valores vacíos o placeholders como {{secretId}}.
133
+ const baseSecretId = appConfig.secretId && appConfig.secretId.trim() !== '' && appConfig.secretId.trim() !== '{{secretId}}'
134
+ ? appConfig.secretId
135
+ : undefined;
136
+ if (!baseSecretId) {
137
+ throw new Error('SecretId no está configurado en el MCP (appConfig.secretId). Configúralo antes de usar herramientas protegidas.');
138
+ }
139
+ const targetSecretId = baseSecretId;
140
+ const token = await authManager.getValidToken(targetSecretId);
133
141
  return {
134
142
  'Authorization': `Bearer ${token}`,
135
143
  'x-secret-id': targetSecretId,
@@ -1 +1 @@
1
- {"version":3,"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