From 2172203872150022c8f07f65207ffc5824c74056 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 27 May 2025 14:08:54 +0530 Subject: [PATCH 01/10] Fix authorization header example values --- .../billpay/mobile-prepaid-recharge.json | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index c2e30949..7e80f067 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -523,14 +523,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { "in": "body", @@ -889,14 +891,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { "in": "body", @@ -1360,14 +1364,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { "in": "body", @@ -1599,14 +1605,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { "in": "body", @@ -1688,14 +1696,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ] } @@ -1757,14 +1767,16 @@ "name": "X-PRODUCT-INSTANCE-ID", "required": true, "type": "string", - "description": "Unique identifier provided by Setu that represents your product instance." + "description": "Unique identifier provided by Setu that represents your product instance.", + "example": "b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f" }, { "in": "header", "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API." + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ], "responses": { From fa0db0a5fe007c1c05caec8b6b2a5ebc454ac0b6 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 27 May 2025 14:32:53 +0530 Subject: [PATCH 02/10] Fix mobile number description in response --- api-references/payments/billpay/mobile-prepaid-recharge.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index 7e80f067..b2582bf2 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -247,7 +247,7 @@ "mobile_number": { "type": "string", "example": "7066573354", - "description": "Input mobile number" + "description": "The 10-digit mobile number whose operator details were fetched." }, "current_operator": { "type": "string", From 61dcd5ba42ad506d4ecfe381858dc2c6d75dc30c Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 27 May 2025 15:50:46 +0530 Subject: [PATCH 03/10] Fix bill parameters example --- .../billpay/mobile-prepaid-recharge.json | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index b2582bf2..df20042b 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -630,7 +630,7 @@ }, "value": { "type": "string", - "description": "The value for the parameter. For 'Mobile Number': 10-digit number. For 'Operator': lowercase operator name (e.g., 'jio', 'airtel', 'vi', 'bsnl', 'mtnl'). For 'Location': exact circle name." + "description": "The value for the parameter. For 'Mobile Number': 10-digit number. For 'Operator': lowercase operator name (e.g., `jio`, `airtel`, `vi`, `bsnl`, `mtnl`). For 'Location': exact circle name." } } }, @@ -685,8 +685,8 @@ }, "amount": { "type": "number", - "example": 199, - "description": "Price of the plan in paise" + "example": 19900, + "description": "Price of the plan in paise (1/100 of a rupee). For example, 19900 paise = 199 INR." }, "validity": { "type": "string", @@ -1070,7 +1070,7 @@ }, "mode": { "type": "string", - "description": "The payment mode used for the recharge. Must be one of: 'Internet Banking', 'UPI', 'Debit Card', 'Credit Card', or 'Wallet'.", + "description": "The payment mode used for the recharge. **Accepted values:**\n- `Internet Banking`\n- `UPI`\n- `Debit Card`\n- `Credit Card`\n- `Wallet`\n\nThe value must match exactly as shown above (case-sensitive).", "example": "Internet Banking" }, "paymentParams": { @@ -1413,7 +1413,21 @@ } } }, - "description": "Parameters for the recharge request, including Mobile Number, Operator, and Location." + "description": "Parameters for the recharge request, including Mobile Number, Operator, and Location.", + "example": [ + { + "name": "Mobile Number", + "value": "7066573353" + }, + { + "name": "Operator", + "value": "jio" + }, + { + "name": "Location", + "value": "Maharashtra" + } + ] }, "mobile": { "type": "string", From 62bc3e3de3a22cdfcb4c40b98e72f8cc5aed3884 Mon Sep 17 00:00:00 2001 From: Arppp <115523920+Arppp@users.noreply.github.com> Date: Fri, 30 May 2025 13:10:09 +0000 Subject: [PATCH 04/10] updated AUTH --- .../billpay/mobile-prepaid-recharge.json | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index df20042b..cd067508 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -21,14 +21,17 @@ "url": "https://prepaid-uat.setu.co", "description": "UAT" } + ], "paths": { "/v1/users/login": { + "servers": [ + { + "url":"https://accountservice.setu.co" + } + ], "post": { - "tags": [ - "Authentication" - ], - "summary": "API to authenticate and get access token", + "summary": "Token API", "description": "Use this endpoint to obtain a Bearer token required for all other API calls.", "consumes": [ "application/json" @@ -247,7 +250,7 @@ "mobile_number": { "type": "string", "example": "7066573354", - "description": "The 10-digit mobile number whose operator details were fetched." + "description": "The 10-digit mobile number for which the operator details are retrieved." }, "current_operator": { "type": "string", @@ -531,7 +534,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { @@ -899,7 +902,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { @@ -1145,7 +1148,7 @@ "service_type": { "type": "string", "example": "M", - "description": "Service type (e.g., Mobile)" + "description": "Represents the service type. Always set to 'M' for Mobile." }, "is_postpaid": { "type": "boolean", @@ -1372,7 +1375,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { @@ -1449,7 +1452,7 @@ "properties": { "amount": { "type": "number", - "example": 2900, + "example": 1900, "description": "Recharge amount in paise (1/100 of a rupee). Must be a positive integer value representing the amount in paise." }, "mode": { @@ -1512,7 +1515,7 @@ "properties": { "paymentRefId": { "type": "string", - "description": "Reference ID for the payment transaction whose status is being queried. This must match the paymentRefId used in the original recharge request." + "description": "Reference ID for the payment transaction whose status is being queried. This is the same paymentRefId used in the original recharge request." } } } @@ -1563,7 +1566,7 @@ "service_type": { "type": "string", "example": "M", - "description": "Service type (e.g., Mobile)" + "description": "Represents the service type. Always set to 'M' for Mobile." }, "is_postpaid": { "type": "boolean", @@ -1627,7 +1630,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, { @@ -1718,7 +1721,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ] @@ -1789,7 +1792,7 @@ "name": "Authorization", "required": true, "type": "string", - "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is obtained from the login API.", + "description": "Bearer token for authorization. Format: 'Bearer {token}' where {token} is access token recieved from token API.", "example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } ], From f1586bdc3e3becac5d861cfebdbf3e69a8fd8f4f Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Mon, 7 Jul 2025 22:30:50 +0530 Subject: [PATCH 05/10] Add possible status values --- api-references/payments/billpay/mobile-prepaid-recharge.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index cd067508..7d179370 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -1840,8 +1840,8 @@ }, "status": { "type": "string", - "example": "SUCCESS", - "description": "Status of the transaction" + "example": "Successful", + "description": "Status of the transaction. Possible values: `Successful`, `Processing`, `Failure`, `Reversed`." }, "timestamp": { "type": "string", From 1ce0f21c6f6cf348bbf67ccffba78e28dc513444 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 8 Jul 2025 00:28:37 +0530 Subject: [PATCH 06/10] Add 422 and 500 responses in transactions API --- .../billpay/mobile-prepaid-recharge.json | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index 7d179370..dd4c592b 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -1863,6 +1863,68 @@ } }, "description": "Response containing the list of transactions" + }, + "422": { + "description": "Invalid Request Parameters", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "properties": { + "code": { "type": "string", "example": "ERR009" }, + "message": { "type": "string", "example": "Invalid Product Instance ID: 71f05a38-7cb6-4907-b7cb-7521c28824d9" }, + "failureReason": { "type": "string", "example": "invalid-instance-id" } + } + }, + "trace_id": { "type": "string", "example": "d1m02ecd7qsdk10rlkn0" } + } + }, + "example": { + "success": false, + "error": { + "code": "ERR009", + "message": "Invalid Product Instance ID: 71f05a38-7cb6-4907-b7cb-7521c28824d9", + "failureReason": "invalid-instance-id" + }, + "trace_id": "d1m02ecd7qsdk10rlkn0" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "properties": { + "code": { "type": "string", "example": "ERR100" }, + "message": { "type": "string", "example": "Internal Server Error" }, + "failureReason": { "type": "string", "example": "internal-server-error" } + } + }, + "trace_id": { "type": "string", "example": "d1m02ecd7qsdk10rlkn0" } + } + }, + "example": { + "success": false, + "error": { + "code": "ERR100", + "message": "Internal Server Error", + "failureReason": "internal-server-error" + }, + "trace_id": "d1m02ecd7qsdk10rlkn0" + } + } + } } } } From 0c20697d80ce9ce6969729fce56e035e3e38760e Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 8 Jul 2025 00:37:07 +0530 Subject: [PATCH 07/10] Add 422 and 500 in wallet balance API --- .../billpay/mobile-prepaid-recharge.json | 64 ++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index dd4c592b..35e7ef32 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -943,7 +943,7 @@ "value": { "type": "string", "example": "7066573353", - "description": "The value of the customer mobile number or related info like Operator and Location." + "description": "The value of the customer mobile number whose details are being fetched." } } }, @@ -1705,6 +1705,68 @@ } }, "description": "Response containing the wallet balance details" + }, + "422": { + "description": "Balance API is not available in UAT environment", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "properties": { + "code": { "type": "string", "example": "ERR012" }, + "message": { "type": "string", "example": "Balance API is not available in UAT environment" }, + "failureReason": { "type": "string", "example": "balance-api-unavailable-in-uat" } + } + }, + "trace_id": { "type": "string", "example": "d1m1j6kd7qs2b5gbln8g" } + } + }, + "example": { + "success": false, + "error": { + "code": "ERR012", + "message": "Balance API is not available in UAT environment", + "failureReason": "balance-api-unavailable-in-uat" + }, + "trace_id": "d1m1j6kd7qs2b5gbln8g" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "properties": { + "code": { "type": "string", "example": "ERR100" }, + "message": { "type": "string", "example": "Internal Server Error" }, + "failureReason": { "type": "string", "example": "internal-server-error" } + } + }, + "trace_id": { "type": "string", "example": "d1m1hvsd7qsdk10rll2g" } + } + }, + "example": { + "success": false, + "error": { + "code": "ERR100", + "message": "Internal Server Error", + "failureReason": "internal-server-error" + }, + "trace_id": "d1m1hvsd7qsdk10rll2g" + } + } + } } }, "parameters": [ From 69b5b4deaabec30d38f13644eb3683b417267d59 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 8 Jul 2025 00:51:05 +0530 Subject: [PATCH 08/10] Fix error response object in wallet balance API --- .../billpay/mobile-prepaid-recharge.json | 117 ++++++++---------- 1 file changed, 53 insertions(+), 64 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index 35e7ef32..827c7ca2 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -368,75 +368,47 @@ } }, "422": { - "description": "Invalid Request Parameters", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "204" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Sun, 13 Oct 2024 20:28:16 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" - } - } - }, + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", + "required": ["success", "error", "trace_id"], "properties": { + "success": { "type": "boolean", "example": false }, "error": { "type": "object", + "required": ["code", "message", "failureReason"], "properties": { - "code": { - "type": "string", - "example": "ERR011" - }, - "failureReason": { - "type": "string", - "example": "input-params-missing" - }, - "message": { - "type": "string", - "example": "Missing required parameters: customer.billParameters.0.name" - } + "code": { "type": "string", "example": "ERR009" }, + "message": { "type": "string", "example": "Invalid Product Instance ID: " }, + "failureReason": { "type": "string", "example": "invalid-instance-id" } } }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" - } + "trace_id": { "type": "string", "example": "d1m1kslcjsji7vn3b5vg" } } }, "examples": { - "422": { + "invalid-instance-id": { "value": { + "success": false, "error": { - "code": "ERR011", - "failureReason": "input-params-missing", - "message": "Missing required parameters: customer.billParameters.0.name" + "code": "ERR009", + "message": "Invalid Product Instance ID: ", + "failureReason": "invalid-instance-id" }, + "trace_id": "d1m1kslcjsji7vn3b5vg" + } + }, + "balance-api-unavailable-in-uat": { + "value": { "success": false, - "trace_id": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" + "error": { + "code": "ERR012", + "message": "Balance API is not available in UAT environment", + "failureReason": "balance-api-unavailable-in-uat" + }, + "trace_id": "d1m1j6kd7qs2b5gbln8g" } } } @@ -1707,32 +1679,49 @@ "description": "Response containing the wallet balance details" }, "422": { - "description": "Balance API is not available in UAT environment", + "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", + "required": ["success", "error", "trace_id"], "properties": { "success": { "type": "boolean", "example": false }, "error": { "type": "object", + "required": ["code", "message", "failureReason"], "properties": { - "code": { "type": "string", "example": "ERR012" }, - "message": { "type": "string", "example": "Balance API is not available in UAT environment" }, - "failureReason": { "type": "string", "example": "balance-api-unavailable-in-uat" } + "code": { "type": "string", "example": "ERR009" }, + "message": { "type": "string", "example": "Invalid Product Instance ID: " }, + "failureReason": { "type": "string", "example": "invalid-instance-id" } } }, - "trace_id": { "type": "string", "example": "d1m1j6kd7qs2b5gbln8g" } + "trace_id": { "type": "string", "example": "d1m1kslcjsji7vn3b5vg" } } }, - "example": { - "success": false, - "error": { - "code": "ERR012", - "message": "Balance API is not available in UAT environment", - "failureReason": "balance-api-unavailable-in-uat" + "examples": { + "invalid-instance-id": { + "value": { + "success": false, + "error": { + "code": "ERR009", + "message": "Invalid Product Instance ID: ", + "failureReason": "invalid-instance-id" + }, + "trace_id": "d1m1kslcjsji7vn3b5vg" + } }, - "trace_id": "d1m1j6kd7qs2b5gbln8g" + "balance-api-unavailable-in-uat": { + "value": { + "success": false, + "error": { + "code": "ERR012", + "message": "Balance API is not available in UAT environment", + "failureReason": "balance-api-unavailable-in-uat" + }, + "trace_id": "d1m1j6kd7qs2b5gbln8g" + } + } } } } From 75eb0f12c918cdb8593ff4af2931c2dcd3111d24 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 8 Jul 2025 01:05:04 +0530 Subject: [PATCH 09/10] Add 422 and 500 responses in recharge status API --- .../billpay/mobile-prepaid-recharge.json | 105 +++++++++++++++++- 1 file changed, 100 insertions(+), 5 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index 827c7ca2..d17fb98c 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -394,7 +394,7 @@ "success": false, "error": { "code": "ERR009", - "message": "Invalid Product Instance ID: ", + "message": "Invalid Product Instance ID: b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f", "failureReason": "invalid-instance-id" }, "trace_id": "d1m1kslcjsji7vn3b5vg" @@ -1586,6 +1586,98 @@ } }, "description": "Ok" + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "error", "trace_id"], + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "required": ["code", "message", "failureReason"], + "properties": { + "code": { "type": "string", "example": "ERR009" }, + "message": { "type": "string", "example": "Invalid Product Instance ID: " }, + "failureReason": { "type": "string", "example": "invalid-instance-id" } + } + }, + "trace_id": { "type": "string", "example": "d1m1kslcjsji7vn3b5vg" } + } + }, + "examples": { + "invalid-instance-id": { + "value": { + "success": false, + "error": { + "code": "ERR009", + "message": "Invalid Product Instance ID: b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f", + "failureReason": "invalid-instance-id" + }, + "trace_id": "d1m1kslcjsji7vn3b5vg" + } + }, + "invalid-txn-ref-id": { + "value": { + "success": false, + "error": { + "code": "ERR003", + "message": "Invalid Transaction Reference ID : TEST6291DD4X0475X70C2S2402", + "failureReason": "invalid-txn-ref-id" + }, + "trace_id": "d1m1shsd7qs2b5gblnag" + } + }, + "input-params-invalid": { + "value": { + "success": false, + "error": { + "code": "ERR011", + "message": "Value error, Invalid input: 'paymentRefId' should be alphanumeric: paymentRefId", + "failureReason": "input-params-invalid" + }, + "trace_id": "d1m1uisd7qs2b5gblndg" + } + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": ["success", "error", "trace_id"], + "properties": { + "success": { "type": "boolean", "example": false }, + "error": { + "type": "object", + "required": ["code", "message", "failureReason"], + "properties": { + "code": { "type": "string", "example": "ERR100" }, + "message": { "type": "string", "example": "Internal Server Error" }, + "failureReason": { "type": "string", "example": "internal-server-error" } + } + }, + "trace_id": { "type": "string", "example": "d1m1us4d7qs2b5gblne0" } + } + }, + "example": { + "success": false, + "error": { + "code": "ERR100", + "message": "Internal Server Error", + "failureReason": "internal-server-error" + }, + "trace_id": "d1m1us4d7qs2b5gblne0" + } + } + } } }, "parameters": [ @@ -1705,7 +1797,7 @@ "success": false, "error": { "code": "ERR009", - "message": "Invalid Product Instance ID: ", + "message": "Invalid Product Instance ID: b7e2c9a1-5d4f-4c8e-9f3a-2a1b6c7d8e9f", "failureReason": "invalid-instance-id" }, "trace_id": "d1m1kslcjsji7vn3b5vg" @@ -1732,17 +1824,19 @@ "application/json": { "schema": { "type": "object", + "required": ["success", "error", "trace_id"], "properties": { "success": { "type": "boolean", "example": false }, "error": { "type": "object", + "required": ["code", "message", "failureReason"], "properties": { "code": { "type": "string", "example": "ERR100" }, "message": { "type": "string", "example": "Internal Server Error" }, "failureReason": { "type": "string", "example": "internal-server-error" } } }, - "trace_id": { "type": "string", "example": "d1m1hvsd7qsdk10rll2g" } + "trace_id": { "type": "string", "example": "d1m1us4d7qs2b5gblne0" } } }, "example": { @@ -1752,7 +1846,7 @@ "message": "Internal Server Error", "failureReason": "internal-server-error" }, - "trace_id": "d1m1hvsd7qsdk10rll2g" + "trace_id": "d1m1us4d7qs2b5gblne0" } } } @@ -1944,7 +2038,8 @@ "trace_id": "d1m02ecd7qsdk10rlkn0" } } - } + }, + "description": "Invalid Request Parameters" }, "500": { "description": "Internal Server Error", From 119f6552e4253f988c2a1c9ca4ff14995443fa00 Mon Sep 17 00:00:00 2001 From: Pragati Verma Date: Tue, 8 Jul 2025 01:14:53 +0530 Subject: [PATCH 10/10] Add 500 response example in recharge status API --- .../billpay/mobile-prepaid-recharge.json | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/api-references/payments/billpay/mobile-prepaid-recharge.json b/api-references/payments/billpay/mobile-prepaid-recharge.json index d17fb98c..e3ef2c90 100644 --- a/api-references/payments/billpay/mobile-prepaid-recharge.json +++ b/api-references/payments/billpay/mobile-prepaid-recharge.json @@ -1667,14 +1667,29 @@ "trace_id": { "type": "string", "example": "d1m1us4d7qs2b5gblne0" } } }, - "example": { - "success": false, - "error": { - "code": "ERR100", - "message": "Internal Server Error", - "failureReason": "internal-server-error" + "examples": { + "internal-server-error": { + "value": { + "success": false, + "error": { + "code": "ERR100", + "message": "Internal Server Error", + "failureReason": "internal-server-error" + }, + "trace_id": "d1m1us4d7qs2b5gblne0" + } }, - "trace_id": "d1m1us4d7qs2b5gblne0" + "upstream-connectivity-error": { + "value": { + "success": false, + "error": { + "code": "ERR999", + "message": "Upstream API Connectivity Error", + "failureReason": "upstream-connectivity-error" + }, + "trace_id": "d1m1us4d7qs2b5gblne0" + } + } } } }