diff --git a/api-references/payments/billpay/prepaid-recharge.json b/api-references/payments/billpay/prepaid-recharge.json new file mode 100644 index 00000000..d4a6841a --- /dev/null +++ b/api-references/payments/billpay/prepaid-recharge.json @@ -0,0 +1,1258 @@ +{ + "info": { + "title": "Prepaid Mobile Recharge", + "x-logo": { + "url": "https://setu-customer-success.s3.ap-south-1.amazonaws.com/icons/setu-logo-dp-on-tp.svg", + "altText": "Prepaid Mobile Recharge" + }, + "version": "1.0.0", + "description": "Process flow for prepaid recharge payments." + }, + "schemes": ["https"], + + "servers": [ + { + "url": "https://prepaid.setu.co", + "description": "Production" + }, + { + "url": "https://prepaid-uat.setu.co", + "description": "UAT" + } + ], + "paths": { + "/mobile-prepaid-recharge/fetch_operator_details": { + "post": { + "tags": ["Fetch"], + "summary": "API to fetch operator details for mobile number", + "consumes": ["application/json"], + "produces": ["application/json"], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success":{ + "type":"boolean", + "example":"true", + "description":"status of API call" + }, + "data": { + "type": "object", + "required": ["mobile_number","current_operator","current_location","previous_operator","previous_location","ported"], + "properties": { + "mobile_number": { + "type": "string", + "example": "7066573354", + "description": "Input mobile number" + }, + "current_operator": { + "type": "string", + "example": "jio", + "description": "Valid Network provider `jio` `airtel` `vi` `bsnl` `mtnl` " + }, + "current_location": { + "type": "string", + "example": "Maharashtra", + "description":"Operator Circle , valid values are : `Kolkata `,` Mumbai `,` Delhi `,` Chennai `,` Maharashtra `,` Gujarat `,` Andhra Pradesh `,` Karnataka `,` Tamil Nadu `,` Kerala `,` Punjab `,` Haryana `,` Uttar Pradesh (East) `,` Uttar Pradesh (West) `,` Madhya Pradesh `,` Rajasthan `,` West Bengal & AN Island `,` Orissa `,` Himachal Pradesh `,` Bihar & Jharkhand `,` Assam `,` NorthEast `,` J&K `,` Uttaranchal `,` All `,` IND`" + + }, + "previous_operator": { + "type": "string", + "example": "jio", + "description": "Previous Network provider `jio` `airtel` `vi` `bsnl` `mtnl`. Incase of it is never ported `None` " + }, + "previous_location": { + "type": "string", + "example": "Maharashtra", + "description":"Previous Operator Circle if any , valid values are : `Kolkata `,` Mumbai `,` Delhi `,` Chennai `,` Maharashtra `,` Gujarat `,` Andhra Pradesh `,` Karnataka `,` Tamil Nadu `,` Kerala `,` Punjab `,` Haryana `,` Uttar Pradesh (East) `,` Uttar Pradesh (West) `,` Madhya Pradesh `,` Rajasthan `,` West Bengal & AN Island `,` Orissa `,` Himachal Pradesh `,` Bihar & Jharkhand `,` Assam `,` NorthEast `,` J&K `,` Uttaranchal `,` All `,` IND`" + + }, + "ported": { + "type": "boolean", + "example": "true", + "description": "Parameter indicating if mobile number was ported previously" + } + + }, + + "description": "Details for listing mobile number details required for fetching plans and recharge" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response" + }, + "400": { + "description": "Invalid Product Instance ID", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "210" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Sun, 13 Oct 2024 20:13:17 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "10a5b1c5-9941-4551-b76a-35be8697c59d" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR007" + }, + "failureReason": { + "type": "string", + "example": "invalid-params" + }, + "message": { + "type": "string", + "example": "Mobile number should be 10 digit" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "f44e8a89-2bfe-457b-87f6-f829c373761c" + } + } + }, + "examples": { + "400": { + "value": { + "error": { + "code": "ERR009", + "failureReason": "invalid-instance-id", + "message": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974ea" + }, + "success": false, + "trace_id": "10a5b1c5-9941-4551-b76a-35be8697c59d" + } + } + } + } + } + }, + "422": { + "description": "422", + "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" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR011" + }, + "failureReason": { + "type": "string", + "example": "input-params-missing" + }, + "message": { + "type": "string", + "example": "Missing required parameters: customer.billParameters.0.name" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" + } + } + }, + "examples": { + "422": { + "value": { + "error": { + "code": "ERR011", + "failureReason": "input-params-missing", + "message": "Missing required parameters: customer.billParameters.0.name" + }, + "success": false, + "trace_id": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" + } + } + } + } + } + }, + "500": { + "description": "500", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "183" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Sun, 13 Oct 2024 20:18:38 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "98ade67b-89d8-4b55-80c8-6e41d25d3442" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR999" + }, + "failureReason": { + "type": "string", + "example": "upstream-connectivity-error" + }, + "message": { + "type": "string", + "example": "Upstream API Connectivity Error" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "98ade67b-89d8-4b55-80c8-6e41d25d3442" + } + } + }, + "examples": { + "500": { + "value": { + "error": { + "code": "ERR999", + "failureReason": "upstream-connectivity-error", + "message": "Upstream API Connectivity Error" + }, + "success": false, + "trace_id": "98ade67b-89d8-4b55-80c8-6e41d25d3442" + } + } + } + } + } + } + } + , + "parameters": [ + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + }, + + { + "in": "body", + "name": "body", + "schema": { + "type": "object", + "required": [ + "customer", + "mobile" + ], + "properties": { + "mobile": { + "type": "string", + "example": "9192990013", + "description": "The login mobile number of the initiating recharge" + }, + "customer": { + "type": "object", + "required":["billParameters"], + "properties": { + "billParameters": { + "type": "array", + "items": { + "type": "object", + "required":["name","value"], + "properties": { + "name": { + "type": "string", + "example": "Mobile Number", + "description": "The display name of the parameter." + }, + "value": { + "type": "string", + "example": "7066573353", + "description": "The value of the customer mobile number whose details are being fetched." + } + } + }, + "description": "Parameters for fetching Operator and Location details for mobile number." + } + }, + "description": "The details needed for fetching operator details." + } + } + } + } + ] + } + }, + "/mobile-prepaid-recharge/fetch_plans":{ + "post": { + "tags": ["Fetch"], + "summary": "API to fetch prepaid plans for a mobile number", + "consumes": ["application/json"], + "produces": ["application/json"], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success": { + "type": "boolean", + "example": "true", + "description": "Status of API call" + }, + "data": { + "type": "object", + "properties": { + "plans": { + "type": "array", + "items": { + "type": "object", + "properties": { + "plan_id": { + "type": "string", + "example": "plan123", + "description": "Unique identifier for the prepaid plan" + }, + "name": { + "type": "string", + "example": "Unlimited Talktime", + "description": "Name of the prepaid plan" + }, + "price": { + "type": "number", + "example": 199, + "description": "Price of the plan in INR" + }, + "validity": { + "type": "string", + "example": "28 days", + "description": "Validity period of the plan" + }, + "description": { + "type": "string", + "example": "Unlimited calls with 1.5GB/day", + "description": "Details of the plan benefits" + } + } + }, + "description": "List of available prepaid plans" + } + }, + "description": "Details for listing available plans for the mobile number" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response" + }, + "400": { + "description": "400 / 400 / 400 / Fetch Plans", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "211" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Mon, 14 Oct 2024 03:47:13 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "18cc0c0d-2fa7-4c44-92bd-d15523a7e366" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR007" + }, + "failureReason": { + "type": "string", + "example": "invalid-params" + }, + "message": { + "type": "string", + "example": "Invalid operator name viax" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "cb7f237d-2b6e-49da-b471-327848df324a" + } + } + }, + "examples": { + "400": { + "value": { + "error": { + "code": "ERR007", + "failureReason": "invalid-params", + "message": "Mobile number should be numeric" + }, + "success": false, + "trace_id": "3b4feff1-76bb-4443-a398-9000f9f424b7" + } + }, + "Fetch Plans": { + "value": { + "error": { + "code": "ERR009", + "failureReason": "invalid-instance-id", + "message": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974eaa" + }, + "success": false, + "trace_id": "18cc0c0d-2fa7-4c44-92bd-d15523a7e366" + } + } + } + } + } + }, + "500": { + "description": "Fetch Plans", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "183" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Mon, 14 Oct 2024 03:43:02 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR999" + }, + "failureReason": { + "type": "string", + "example": "upstream-connectivity-error" + }, + "message": { + "type": "string", + "example": "Upstream API Connectivity Error" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" + } + } + }, + "examples": { + "Fetch Plans": { + "value": { + "error": { + "code": "ERR999", + "failureReason": "upstream-connectivity-error", + "message": "Upstream API Connectivity Error" + }, + "success": false, + "trace_id": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + }, + { + "in": "body", + "name": "body", + "schema": { + "type": "object", + "required": ["customer", "mobile"], + "properties": { + "mobile": { + "type": "string", + "example": "7566628882", + "description": "The login mobile number of the initiating recharge" + }, + "customer": { + "type": "object", + "required":["billParameters"], + "properties": { + "billParameters": { + "type": "array", + "items": { + "type": "object", + "required":["name","value"], + "properties": { + "name": { + "type": "string", + "example": "Mobile Number", + "description": "The display name of the parameter." + }, + "value": { + "type": "string", + "example": "7066573353", + "description": "The value of the customer mobile number or related info like Operator and Location." + } + } + }, + "description": "Parameters for fetching prepaid plans, including Mobile Number, Operator, and Location." + } + }, + "description": "The details needed for fetching prepaid plans." + } + } + } + } + ] + } + }, + "/mobile-prepaid-recharge/recharge/request":{ + "post": { + "tags": ["Recharge"], + "summary": "API to initiate a prepaid recharge request for a mobile number", + "consumes": ["application/json"], + "produces": ["application/json"], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success": { + "type": "boolean", + "example": "true", + "description": "Status of API call" + }, + "data": { + "type": "object", + "properties": { + "transactionId": { + "type": "string", + "example": "TXN12345", + "description": "Unique identifier for the recharge transaction" + }, + "status": { + "type": "string", + "example": "SUCCESS", + "description": "Status of the recharge request (e.g., SUCCESS, PENDING, FAILED)" + }, + "operatorResponse": { + "type": "string", + "example": "Recharge successful", + "description": "Message returned by the operator for this request" + } + }, + "description": "Details of the recharge transaction" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response" + }, + "422": { + "description": "422", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "269" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Mon, 14 Oct 2024 04:21:24 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "ac14888e-d56d-46e1-83cc-a408c87d32d0" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR011" + }, + "failureReason": { + "type": "string", + "example": "input-params-invalid" + }, + "message": { + "type": "string", + "example": "Value error, allowed payment modes : ['Internet Banking', 'UPI', 'Debit Card', 'Credit Card', 'Wallet']: paymentDetails.mode" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "ac14888e-d56d-46e1-83cc-a408c87d32d0" + } + } + }, + "examples": { + "422": { + "value": { + "error": { + "code": "ERR011", + "failureReason": "input-params-invalid", + "message": "Value error, allowed payment modes : ['Internet Banking', 'UPI', 'Debit Card', 'Credit Card', 'Wallet']: paymentDetails.mode" + }, + "success": false, + "trace_id": "ac14888e-d56d-46e1-83cc-a408c87d32d0" + } + } + } + } + } + }, + "500": { + "description": "500 / 500 / 400", + "headers": { + "content-length": { + "schema": { + "type": "string", + "example": "183" + } + }, + "date": { + "schema": { + "type": "string", + "example": "Mon, 14 Oct 2024 04:22:39 GMT" + } + }, + "server": { + "schema": { + "type": "string", + "example": "uvicorn" + } + }, + "x-trace-id": { + "schema": { + "type": "string", + "example": "45c7e24c-68c2-46ab-84fc-fb2b7fe5b02b" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "ERR009" + }, + "failureReason": { + "type": "string", + "example": "invalid-instance-id" + }, + "message": { + "type": "string", + "example": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974eaa" + } + } + }, + "success": { + "type": "boolean", + "example": false + }, + "trace_id": { + "type": "string", + "example": "8ed9fff1-19fb-4ce5-8072-22b02a314d1f" + } + } + }, + "examples": { + "400": { + "value": { + "error": { + "code": "ERR999", + "failureReason": "upstream-connectivity-error", + "message": "Upstream API Connectivity Error" + }, + "success": false, + "trace_id": "45c7e24c-68c2-46ab-84fc-fb2b7fe5b02b" + } + }, + "500": { + "value": { + "error": { + "code": "ERR005", + "failureReason": "duplicate-payment-ref-id", + "message": "Duplicate Payment Reference ID : TEST6291DD4004750702202402" + }, + "success": false, + "trace_id": "3d7bfc34-0f80-43c2-b103-38633bb74f8b" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + }, + { + "in": "body", + "name": "body", + "schema": { + "type": "object", + "required": ["customer", "paymentDetails"], + "properties": { + "customer": { + "type": "object", + "required":["billParameters","mobile"], + "properties": { + "billParameters": { + "type": "array", + "items": { + "type": "object", + "required":["name","value"], + "properties": { + "name": { + "type": "string", + "example": "Mobile Number", + "description": "The display name of the parameter." + }, + "value": { + "type": "string", + "example": "7066573353", + "description": "The value of the customer mobile number or related info like Operator and Location." + } + } + }, + "description": "Parameters for the recharge request, including Mobile Number, Operator, and Location." + }, + "mobile": { + "type": "string", + "example": "6291400475", + "description": "The mobile number initiating the recharge" + } + }, + "description": "Details needed for identifying the customer and the recharge request" + }, + "paymentDetails": { + "type": "object", + "required":["amount","mode","paymentRefId","paymentParams","timestamp"], + "properties": { + "amount": { + "type": "number", + "example": 2900, + "description": "Recharge amount in paise (e.g., 2900 paise = 29 INR)" + }, + "mode": { + "type": "string", + "example": "Internet Banking", + "description": "The payment mode used for the recharge" + }, + "paymentParams": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Additional payment parameters in case any" + }, + "paymentRefId": { + "type": "string", + "example": "TEST6291DD4004750702202402", + "description": "Reference ID for the payment transaction" + }, + "timestamp": { + "type": "string", + "example": "2024-02-07T13:54:00+05:30", + "description": "Timestamp of when the payment was initiated" + } + }, + "description": "Details of the payment for the recharge" + }, + "refId": { + "type": "string", + "example": "REFIDTEST6291DD4004750702202402", + "description": "Unique reference ID for the recharge request" + } + } + } + } + ] + } + }, + "/mobile-prepaid-recharge/recharge/status": { + "post": { + "tags": ["Recharge"], + "summary": "API to check the status of a prepaid recharge transaction", + "consumes": ["application/json"], + "produces": ["application/json"], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success": { + "type": "boolean", + "example": "true", + "description": "Status of the API call" + }, + "data": { + "type": "object", + "properties": { + "paymentRefId": { + "type": "string", + "example": "TEST62XD4XX04750702202402", + "description": "Reference ID for the payment transaction" + }, + "status": { + "type": "string", + "example": "SUCCESS", + "description": "Status of the recharge request (e.g., SUCCESS, PENDING, FAILED)" + }, + "operatorResponse": { + "type": "string", + "example": "Transaction completed successfully", + "description": "Message returned by the operator for this request" + } + }, + "description": "Details of the recharge transaction status" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response indicating the status of the recharge transaction" + } + + }, + "parameters": [ + + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + }, + { + "in": "body", + "name": "body", + "schema": { + "type": "object", + "required": ["paymentRefId"], + "properties": { + "paymentRefId": { + "type": "string", + "example": "TEST62XD4XX04750702202402", + "description": "Reference ID for the payment transaction whose status is being queried" + } + } + } + } + ] + } + }, + "/mobile-prepaid-recharge/wallet/balance": { + "get": { + "tags": ["Wallet"], + "summary": "API to fetch the balance of the wallet", + "produces": ["application/json"], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Status of the API call" + }, + "data": { + "type": "object", + "properties": { + "balance": { + "type": "number", + "example": 1500.75, + "description": "Current wallet balance available" + }, + "currency": { + "type": "string", + "example": "INR", + "description": "Currency of the wallet balance" + } + }, + "description": "Details of the wallet balance" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response containing the wallet balance details" + } + }, + "parameters": [ + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + } + ] + } + }, + "/mobile-prepaid-recharge/transaction": { + "get": { + "tags": ["Transaction"], + "summary": "API to fetch transaction details", + "produces": ["application/json"], + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "type": "integer", + "example": 1, + "description": "Maximum number of transactions to return" + }, + { + "in": "query", + "name": "page_number", + "required": false, + "type": "integer", + "example": 18, + "description": "Page number of the result" + }, + { + "in": "query", + "name": "operator", + "required": false, + "type": "string", + "example": "Jio", + "description": "Operator name to filter transactions" + }, + { + "in": "query", + "name": "start_date", + "required": false, + "type": "string", + "format": "date", + "example": "2024-10-07", + "description": "Start date for transaction history in YYYY-MM-DD format" + }, + { + "in": "query", + "name": "end_date", + "required": false, + "type": "string", + "format": "date", + "example": "2024-10-09", + "description": "End date for transaction history in YYYY-MM-DD format" + }, + { + "in": "header", + "name": "X-PRODUCT-INSTANCE-ID", + "required": true, + "type": "string", + "description": "This is provided by Setu and it represents a product instance for business in their system." + }, + { + "in": "header", + "name": "Authorization", + "required": true, + "type": "string", + "description": "Bearer token for authorization." + } + ], + "responses": { + "200": { + "schema": { + "type": "object", + "required": ["success", "data", "trace_id"], + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Status of the API call" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "transaction_id": { + "type": "string", + "example": "TXN123456789", + "description": "Unique identifier for the transaction" + }, + "mobile_number": { + "type": "string", + "example": "7066573353", + "description": "Mobile number involved in the transaction" + }, + "operator": { + "type": "string", + "example": "Jio", + "description": "Operator name" + }, + "amount": { + "type": "number", + "example": 2900, + "description": "Transaction amount" + }, + "status": { + "type": "string", + "example": "SUCCESS", + "description": "Status of the transaction" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "example": "2024-10-07T13:54:00+05:30", + "description": "Timestamp of when the transaction occurred" + } + } + }, + "description": "List of transaction details" + }, + "traceId": { + "type": "string", + "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", + "description": "Identifier associated with this response for debug purposes" + } + } + }, + "description": "Response containing the list of transactions" + } + } + } + } + }, + + "swagger": "2.0", + "definitions": {} +} \ No newline at end of file diff --git a/api-references/payments/prepaid-recharge.json b/api-references/payments/prepaid-recharge.json deleted file mode 100644 index eddf1d58..00000000 --- a/api-references/payments/prepaid-recharge.json +++ /dev/null @@ -1,1237 +0,0 @@ -{ - "info": { - "title": "Prepaid Mobile Recharge", - "x-logo": { - "url": "https://setu-customer-success.s3.ap-south-1.amazonaws.com/icons/setu-logo-dp-on-tp.svg", - "altText": "Prepaid Mobile Recharge" - }, - "version": "1.0.0", - "description": "Process flow for prepaid recharge payments." - }, - "schemes": ["https"], - - "servers": [ - { - "url": "https://prepaid.setu.co", - "description": "Production" - }, - { - "url": "https://prepaid-uat.setu.co", - "description": "UAT" - } - ], - "paths": { - "/fetch-operator-details": { - "post": { - "tags": ["Fetch"], - "summary": "API to fetch operator details for mobile number", - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "Boolean", - "example": "true", - "description": "status of API call" - }, - "data": { - "type": "object", - "required": [ - "mobile_number", - "current_operator", - "current_location", - "previous_operator", - "previous_location", - "ported" - ], - "properties": { - "mobile_number": { - "type": "string", - "example": "7066573354", - "description": "Input mobile number" - }, - "current_operator": { - "type": "string", - "example": "jio", - "description": "Valid Network provider `jio` `airtel` `vi` `bsnl` `mtnl` " - }, - "current_location": { - "type": "string", - "example": "Maharashtra", - "description": "Operator Circle , valid values are : `Kolkata `,` Mumbai `,` Delhi `,` Chennai `,` Maharashtra `,` Gujarat `,` Andhra Pradesh `,` Karnataka `,` Tamil Nadu `,` Kerala `,` Punjab `,` Haryana `,` Uttar Pradesh (East) `,` Uttar Pradesh (West) `,` Madhya Pradesh `,` Rajasthan `,` West Bengal & AN Island `,` Orissa `,` Himachal Pradesh `,` Bihar & Jharkhand `,` Assam `,` NorthEast `,` J&K `,` Uttaranchal `,` All `,` IND`" - }, - "previous_operator": { - "type": "string", - "example": "jio", - "description": "Previous Network provider `jio` `airtel` `vi` `bsnl` `mtnl`. Incase of it is never ported `None` " - }, - "previous_location": { - "type": "string", - "example": "Maharashtra", - "description": "Previous Operator Circle if any , valid values are : `Kolkata `,` Mumbai `,` Delhi `,` Chennai `,` Maharashtra `,` Gujarat `,` Andhra Pradesh `,` Karnataka `,` Tamil Nadu `,` Kerala `,` Punjab `,` Haryana `,` Uttar Pradesh (East) `,` Uttar Pradesh (West) `,` Madhya Pradesh `,` Rajasthan `,` West Bengal & AN Island `,` Orissa `,` Himachal Pradesh `,` Bihar & Jharkhand `,` Assam `,` NorthEast `,` J&K `,` Uttaranchal `,` All `,` IND`" - }, - "ported": { - "type": "Boolean", - "example": "true", - "description": "Parameter indicating if mobile number was ported previously" - } - }, - - "description": "Details for listing mobile number details required for fetching plans and recharge" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response" - }, - "400": { - "description": "Invalid Product Instance ID", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "210" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Sun, 13 Oct 2024 20:13:17 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "10a5b1c5-9941-4551-b76a-35be8697c59d" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR007" - }, - "failureReason": { - "type": "string", - "example": "invalid-params" - }, - "message": { - "type": "string", - "example": "Mobile number should be 10 digit" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "f44e8a89-2bfe-457b-87f6-f829c373761c" - } - } - }, - "examples": { - "400": { - "value": { - "error": { - "code": "ERR009", - "failureReason": "invalid-instance-id", - "message": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974ea" - }, - "success": false, - "trace_id": "10a5b1c5-9941-4551-b76a-35be8697c59d" - } - } - } - } - } - }, - "422": { - "description": "Invalid Request", - "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" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR011" - }, - "failureReason": { - "type": "string", - "example": "input-params-missing" - }, - "message": { - "type": "string", - "example": "Missing required parameters: customer.billParameters.0.name" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" - } - } - }, - "examples": { - "422": { - "value": { - "error": { - "code": "ERR011", - "failureReason": "input-params-missing", - "message": "Missing required parameters: customer.billParameters.0.name" - }, - "success": false, - "trace_id": "3b0e103e-4fa8-403f-a6c9-b9dd62b82de7" - } - } - } - } - } - }, - "500": { - "description": "Upstream Connectivity Error", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "183" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Sun, 13 Oct 2024 20:18:38 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "98ade67b-89d8-4b55-80c8-6e41d25d3442" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR999" - }, - "failureReason": { - "type": "string", - "example": "upstream-connectivity-error" - }, - "message": { - "type": "string", - "example": "Upstream API Connectivity Error" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "98ade67b-89d8-4b55-80c8-6e41d25d3442" - } - } - }, - "examples": { - "500": { - "value": { - "error": { - "code": "ERR999", - "failureReason": "upstream-connectivity-error", - "message": "Upstream API Connectivity Error" - }, - "success": false, - "trace_id": "98ade67b-89d8-4b55-80c8-6e41d25d3442" - } - } - } - } - } - } - }, - "parameters": [ - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "schema": { "type": "string" }, - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "required": true, - "type": "string", - "description": "Bearer token for authorization." - }, - - { - "in": "body", - "name": "body", - "schema": { - "type": "object", - "required": ["customer", "mobile"], - "properties": { - "mobile": { - "type": "string", - "example": "9192990013", - "description": "The login mobile number of the initiating recharge" - }, - "customer": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "Mobile Number", - "description": "The display name of the parameter." - }, - "value": { - "type": "string", - "example": "7066573353", - "description": "The value of the customer mobile number whose details are being fetched. " - } - } - }, - "description": "The params for details for the mobile number." - } - } - } - } - ] - } - }, - "/fetch-plans": { - "post": { - "tags": ["Fetch"], - "summary": "API to fetch prepaid plans for a mobile number", - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "Boolean", - "example": "true", - "description": "Status of API call" - }, - "data": { - "type": "object", - "properties": { - "plans": { - "type": "array", - "items": { - "type": "object", - "properties": { - "plan_id": { - "type": "string", - "example": "plan123", - "description": "Unique identifier for the prepaid plan" - }, - "name": { - "type": "string", - "example": "Unlimited Talktime", - "description": "Name of the prepaid plan" - }, - "price": { - "type": "number", - "example": 199, - "description": "Price of the plan in INR" - }, - "validity": { - "type": "string", - "example": "28 days", - "description": "Validity period of the plan" - }, - "description": { - "type": "string", - "example": "Unlimited calls with 1.5GB/day", - "description": "Details of the plan benefits" - } - } - }, - "description": "List of available prepaid plans" - } - }, - "description": "Details for listing available plans for the mobile number" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response" - }, - "400": { - "description": "Invalid Request", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "211" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Mon, 14 Oct 2024 03:47:13 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "18cc0c0d-2fa7-4c44-92bd-d15523a7e366" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR007" - }, - "failureReason": { - "type": "string", - "example": "invalid-params" - }, - "message": { - "type": "string", - "example": "Invalid operator name viax" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "cb7f237d-2b6e-49da-b471-327848df324a" - } - } - }, - "examples": { - "Invalid param": { - "value": { - "error": { - "code": "ERR007", - "failureReason": "invalid-params", - "message": "Mobile number should be numeric" - }, - "success": false, - "trace_id": "3b4feff1-76bb-4443-a398-9000f9f424b7" - } - }, - "Invalid ID": { - "value": { - "error": { - "code": "ERR009", - "failureReason": "invalid-instance-id", - "message": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974eaa" - }, - "success": false, - "trace_id": "18cc0c0d-2fa7-4c44-92bd-d15523a7e366" - } - } - } - } - } - }, - "500": { - "description": "Upstream API Connectivity Error", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "183" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Mon, 14 Oct 2024 03:43:02 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR999" - }, - "failureReason": { - "type": "string", - "example": "upstream-connectivity-error" - }, - "message": { - "type": "string", - "example": "Upstream API Connectivity Error" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" - } - } - }, - "examples": { - "Fetch Plans": { - "value": { - "error": { - "code": "ERR999", - "failureReason": "upstream-connectivity-error", - "message": "Upstream API Connectivity Error" - }, - "success": false, - "trace_id": "e40f8f47-7bf7-4a8b-922e-193bb3c0e32c" - } - } - } - } - } - } - }, - "parameters": [ - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "schema": { "type": "string" }, - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "required": true, - "type": "string", - "description": "Bearer token for authorization." - }, - { - "in": "body", - "name": "body", - "schema": { - "type": "object", - "required": ["customer", "mobile"], - "properties": { - "mobile": { - "type": "string", - "example": "7566628882", - "description": "The login mobile number of the initiating recharge" - }, - "customer": { - "type": "object", - "properties": { - "billParameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "Mobile Number", - "description": "The display name of the parameter." - }, - "value": { - "type": "string", - "example": "7066573353", - "description": "The value of the customer mobile number or related info like Operator and Location." - } - } - }, - "description": "Parameters for fetching prepaid plans, including Mobile Number, Operator, and Location." - } - }, - "description": "The details needed for fetching prepaid plans." - } - } - } - } - ] - } - }, - "/recharge/request": { - "post": { - "tags": ["Recharge"], - "summary": "API to initiate a prepaid recharge request for a mobile number", - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "Boolean", - "example": "true", - "description": "Status of API call" - }, - "data": { - "type": "object", - "properties": { - "transactionId": { - "type": "string", - "example": "TXN12345", - "description": "Unique identifier for the recharge transaction" - }, - "status": { - "type": "string", - "example": "SUCCESS", - "description": "Status of the recharge request (e.g., SUCCESS, PENDING, FAILED)" - }, - "operatorResponse": { - "type": "string", - "example": "Recharge successful", - "description": "Message returned by the operator for this request" - } - }, - "description": "Details of the recharge transaction" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response" - }, - "422": { - "description": "Invalid Request", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "269" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Mon, 14 Oct 2024 04:21:24 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "ac14888e-d56d-46e1-83cc-a408c87d32d0" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR011" - }, - "failureReason": { - "type": "string", - "example": "input-params-invalid" - }, - "message": { - "type": "string", - "example": "Value error, allowed payment modes : ['Internet Banking', 'UPI', 'Debit Card', 'Credit Card', 'Wallet']: paymentDetails.mode" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "ac14888e-d56d-46e1-83cc-a408c87d32d0" - } - } - }, - "examples": { - "422": { - "value": { - "error": { - "code": "ERR011", - "failureReason": "input-params-invalid", - "message": "Value error, allowed payment modes : ['Internet Banking', 'UPI', 'Debit Card', 'Credit Card', 'Wallet']: paymentDetails.mode" - }, - "success": false, - "trace_id": "ac14888e-d56d-46e1-83cc-a408c87d32d0" - } - } - } - } - } - }, - "500": { - "description": "Upstream API Connectivity Error", - "headers": { - "content-length": { - "schema": { - "type": "string", - "example": "183" - } - }, - "date": { - "schema": { - "type": "string", - "example": "Mon, 14 Oct 2024 04:22:39 GMT" - } - }, - "server": { - "schema": { - "type": "string", - "example": "uvicorn" - } - }, - "x-trace-id": { - "schema": { - "type": "string", - "example": "45c7e24c-68c2-46ab-84fc-fb2b7fe5b02b" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "code": { - "type": "string", - "example": "ERR009" - }, - "failureReason": { - "type": "string", - "example": "invalid-instance-id" - }, - "message": { - "type": "string", - "example": "Invalid Product Instance ID: 91b09564-c250-4823-a262-7464c171974eaa" - } - } - }, - "success": { - "type": "boolean", - "example": false - }, - "trace_id": { - "type": "string", - "example": "8ed9fff1-19fb-4ce5-8072-22b02a314d1f" - } - } - }, - "examples": { - "400": { - "value": { - "error": { - "code": "ERR999", - "failureReason": "upstream-connectivity-error", - "message": "Upstream API Connectivity Error" - }, - "success": false, - "trace_id": "45c7e24c-68c2-46ab-84fc-fb2b7fe5b02b" - } - }, - "500": { - "value": { - "error": { - "code": "ERR005", - "failureReason": "duplicate-payment-ref-id", - "message": "Duplicate Payment Reference ID : TEST6291DD4004750702202402" - }, - "success": false, - "trace_id": "3d7bfc34-0f80-43c2-b103-38633bb74f8b" - } - } - } - } - } - } - }, - "parameters": [ - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "schema": { "type": "string" }, - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "required": true, - "type": "string", - "description": "Bearer token for authorization." - }, - { - "in": "body", - "name": "body", - "schema": { - "type": "object", - "required": ["customer", "paymentDetails", "refId"], - "properties": { - "customer": { - "type": "object", - "properties": { - "billParameters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "Mobile Number", - "description": "The display name of the parameter." - }, - "value": { - "type": "string", - "example": "7066573353", - "description": "The value of the customer mobile number or related info like Operator and Location." - } - } - }, - "description": "Parameters for the recharge request, including Mobile Number, Operator, and Location." - }, - "mobile": { - "type": "string", - "example": "6291400475", - "description": "The mobile number initiating the recharge" - } - }, - "description": "Details needed for identifying the customer and the recharge request" - }, - "paymentDetails": { - "type": "object", - "properties": { - "amount": { - "type": "number", - "example": 2900, - "description": "Recharge amount in paise (e.g., 2900 paise = 29 INR)" - }, - "mode": { - "type": "string", - "example": "Internet Banking", - "description": "The payment mode used for the recharge" - }, - "paymentParams": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Optional additional payment parameters" - }, - "paymentRefId": { - "type": "string", - "example": "TEST6291DD4004750702202402", - "description": "Reference ID for the payment transaction" - }, - "timestamp": { - "type": "string", - "example": "2024-02-07T13:54:00+05:30", - "description": "Timestamp of when the payment was initiated" - } - }, - "description": "Details of the payment for the recharge" - }, - "refId": { - "type": "string", - "example": "REFIDTEST6291DD4004750702202402", - "description": "Unique reference ID for the recharge request" - } - } - } - } - ] - } - }, - "/recharge/status": { - "post": { - "tags": ["Recharge"], - "summary": "API to check the status of a prepaid recharge transaction", - "consumes": ["application/json"], - "produces": ["application/json"], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "boolean", - "example": "true", - "description": "Status of the API call" - }, - "data": { - "type": "object", - "properties": { - "paymentRefId": { - "type": "string", - "example": "TEST62XD4XX04750702202402", - "description": "Reference ID for the payment transaction" - }, - "status": { - "type": "string", - "example": "SUCCESS", - "description": "Status of the recharge request (e.g., SUCCESS, PENDING, FAILED)" - }, - "operatorResponse": { - "type": "string", - "example": "Transaction completed successfully", - "description": "Message returned by the operator for this request" - } - }, - "description": "Details of the recharge transaction status" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response indicating the status of the recharge transaction" - } - }, - "parameters": [ - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "schema": { "type": "string" }, - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "required": true, - "type": "string", - "description": "Bearer token for authorization." - }, - { - "in": "body", - "name": "body", - "schema": { - "type": "object", - "required": ["paymentRefId"], - "properties": { - "paymentRefId": { - "type": "string", - "example": "TEST62XD4XX04750702202402", - "description": "Reference ID for the payment transaction whose status is being queried" - } - } - } - } - ] - } - }, - "/wallet/balance": { - "get": { - "tags": ["Wallet"], - "summary": "API to fetch the balance of the wallet", - "produces": ["application/json"], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Status of the API call" - }, - "data": { - "type": "object", - "properties": { - "balance": { - "type": "number", - "example": 1500.75, - "description": "Current wallet balance available" - }, - "currency": { - "type": "string", - "example": "INR", - "description": "Currency of the wallet balance" - } - }, - "description": "Details of the wallet balance" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response containing the wallet balance details" - } - }, - "parameters": [ - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "schema": { "type": "string" }, - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "schema": { "type": "string" }, - "description": "Bearer token for authorization." - } - ] - } - }, - "/transaction": { - "get": { - "tags": ["Transaction"], - "summary": "API to fetch transaction details", - "produces": ["application/json"], - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "type": "integer", - "example": 1, - "description": "Maximum number of transactions to return" - }, - { - "in": "query", - "name": "page_number", - "required": false, - "type": "integer", - "example": 18, - "description": "Page number of the result" - }, - { - "in": "query", - "name": "operator", - "required": false, - "type": "string", - "example": "Jio", - "description": "Operator name to filter transactions" - }, - { - "in": "query", - "name": "start_date", - "required": false, - "type": "string", - "format": "date", - "example": "2024-10-07", - "description": "Start date for transaction history in YYYY-MM-DD format" - }, - { - "in": "query", - "name": "end_date", - "required": false, - "type": "string", - "format": "date", - "example": "2024-10-09", - "description": "End date for transaction history in YYYY-MM-DD format" - }, - { - "in": "header", - "name": "X-PRODUCT-INSTANCE-ID", - "required": true, - "type": "string", - "description": "A unique identifier provided by Setu which represent a specific business product instance within their system" - }, - { - "in": "header", - "name": "Authorization", - "required": true, - "type": "string", - "description": "Bearer token for authorization." - } - ], - "responses": { - "200": { - "schema": { - "type": "object", - "required": ["success", "data", "trace_id"], - "properties": { - "success": { - "type": "boolean", - "example": true, - "description": "Status of the API call" - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "transaction_id": { - "type": "string", - "example": "TXN123456789", - "description": "Unique identifier for the transaction" - }, - "mobile_number": { - "type": "string", - "example": "7066573353", - "description": "Mobile number involved in the transaction" - }, - "operator": { - "type": "string", - "example": "Jio", - "description": "Operator name" - }, - "amount": { - "type": "number", - "example": 2900, - "description": "Transaction amount" - }, - "status": { - "type": "string", - "example": "SUCCESS", - "description": "Status of the transaction" - }, - "timestamp": { - "type": "string", - "format": "date-time", - "example": "2024-10-07T13:54:00+05:30", - "description": "Timestamp of when the transaction occurred" - } - } - }, - "description": "List of transaction details" - }, - "traceId": { - "type": "string", - "example": "dMXpKMx4TBKsu8ro1559WeYZS21Og5", - "description": "Identifier associated with this response for debug purposes" - } - } - }, - "description": "Response containing the list of transactions" - } - } - } - } - }, - - "swagger": "2.0", - "definitions": {} -} diff --git a/content/endpoints.json b/content/endpoints.json index d5199d6a..65b1ef9a 100644 --- a/content/endpoints.json +++ b/content/endpoints.json @@ -38,12 +38,6 @@ "path": "umap", "order": 7, "visible_in_sidebar": true - }, - { - "name": "Prepaid Recharge", - "path": "prepaid-recharge", - "order": 8, - "visible_in_sidebar": true } ] }, diff --git a/content/payments/prepaid-recharge/api-reference.mdx b/content/payments/billpay/prepaid-recharge/api-reference.mdx similarity index 100% rename from content/payments/prepaid-recharge/api-reference.mdx rename to content/payments/billpay/prepaid-recharge/api-reference.mdx diff --git a/content/payments/billpay/prepaid-recharge/quickstart.mdx b/content/payments/billpay/prepaid-recharge/quickstart.mdx new file mode 100644 index 00000000..2360c22e --- /dev/null +++ b/content/payments/billpay/prepaid-recharge/quickstart.mdx @@ -0,0 +1,63 @@ +--- +sidebar_title: Quickstart +page_title: Mobile Prepaid Recharge quickstart +order: 1 +visible_in_sidebar: true +--- + +## Overview + +##### What is prepaid recharge? +Prepaid recharge is the process of adding credit or balance to a prepaid mobile phone account. This allows users to continue using mobile services such as calls, text messages, and data without a fixed monthly contract. + +##### Who are the operators? +Operators are the mobile network service providers that offer prepaid services to their customers. Our API supports recharges for major operators in India. + +###### The API follows a simple, intuitive flow: + +- For plan fetching : +** Input mobile number → Validate → Retrieve plans → Display information** + +- For recharges : + ** Initiate recharge → Process payment → Confirm transaction → instant top-ups across multiple mobile operators ** + + + + + + + + + +
+ + + + +**Fetch API** : The Fetch API simplifies the process of validating mobile numbers and identifying associated operators and circles. By integrating this API, partners can seamlessly verify customer mobile numbers and fetch the relevant operator-specific plans, streamlining the recharge process. + +**Recharge API** : The Recharge API facilitates real-time prepaid recharges for customers. Partners can seamlessly process top-ups across multiple mobile operators as long as the merchant has sufficient balance in their pre-funded account. This API ensures instant and efficient recharge execution. + +**Check Balance API** : The Check Balance API enables partners to fetch the current balance information of their Recharge API account. This ensures partners can monitor their account balance in real-time and maintain sufficient funds for processing transactions. + +### Authentication: +The API uses authentication mechanisms that allow access only to authorized partners. Each partner is provided with: +- **Access Keys**: Specific to each partner for secure authentication. +Reach out to sales@setu.co to get your keys. + + +### Contact & Support: +For any issues or inquiries regarding the integration, contact support at **support@setu.co**. + + + + \ No newline at end of file diff --git a/content/payments/prepaid-recharge/quickstart.mdx b/content/payments/prepaid-recharge/quickstart.mdx deleted file mode 100644 index afcbc658..00000000 --- a/content/payments/prepaid-recharge/quickstart.mdx +++ /dev/null @@ -1,42 +0,0 @@ ---- -sidebar_title: Quickstart -page_title: Mobile Prepaid Recharge quickstart -order: 1 -visible_in_sidebar: true ---- - -## Overview - -##### What is prepaid recharge? -Prepaid recharge is the process of adding credit or balance to a prepaid mobile phone account. This allows users to continue using mobile services such as calls, text messages, and data without a fixed monthly contract. - - -##### Who are the operators? -Operators are the mobile network service providers that offer prepaid services to their customers. Our API supports recharges for all major operators in India. - -##### Benefits of using our API -- Seamless integration: Easily incorporate prepaid recharge functionality into your website or application. -- We provide best margins on all service providers -- Wide coverage: Support for multiple operators across various regions. -- Real-time transactions: Instant recharge processing and confirmation. -- Secure: Industry-standard security measures to protect sensitive data. -- Scalable: Designed to handle high volumes of transactions. - -### Authentication: -The API uses authentication mechanisms that allow access only to authorized partners. Each partner is provided with: -- **Access Keys**: Specific to each partner for secure authentication. -Reach out to sales@setu.co to get your keys. - - -### Contact & Support: -For any issues or inquiries regarding the integration, contact support at **support@setu.co**. - - - - \ No newline at end of file