Unknown macro: {hivestonebreadcrumb}
Page tree
Skip to end of metadata
Go to start of metadata

Interceptors are HTTPS endpoints with the extra functionality of returning a response. The host of the interceptor then consumes the response and incorporates it in the request flow. 

{ "swagger": "2.0", "info": { "version": "", "contact": {} }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "api/v1/ifi/{ifiID}/resource_products/{resourceProductID}/interceptors/{interceptorID}": { "get": { "tags": [ "Interceptor APIs" ], "description": "This endpoint allows you to retrieve the details of a particular interceptor using the interceptorID.", "operationId": "getInterceptor", "parameters": [ { "name": "ifiID", "in": "path", "description": "ID of the on-boarded organization.", "required": true, "type": "string" }, { "name": "resourceProductID", "in": "path", "description": "Resource product identifier on which an interceptor is configured.", "required": true, "type": "string" }, { "name": "interceptorID", "in": "path", "description": "Unique ID of an interceptor.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Returns the interceptor details for the specified interceptorID.", "schema": { "$ref": "#/definitions/interceptor" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Unauthorized" } }, "404": { "description": "Interceptor does not exist.", "schema": { "$ref": "#/definitions/NotFound" } } }, "summary": "Retrieve an interceptor by an Interceptor ID" }, "patch": { "tags": [ "Interceptor APIs" ], "description": "This endpoint allows you to update the details of a particular interceptor using the interceptorID.", "operationId": "updateInterceptor", "parameters": [ { "name": "ifiID", "in": "path", "description": "ID of the on-boarded organization.", "required": true, "type": "string" }, { "name": "resourceProductID", "in": "path", "description": "Resource product identifier on which an interceptor is configured.", "required": true, "type": "string" }, { "name": "interceptorID", "in": "path", "description": "Unique ID of an interceptor.", "required": true, "type": "string" }, { "in": "body", "name": "updateInterceptor", "description": "Specify status as ACTIVE or INACTIVE or DELETED", "required": true, "schema": { "$ref": "#/definitions/updateInterceptorRequest" } } ], "responses": { "200": { "description": "Returns the updated interceptor details for the specified interceptorID.", "schema": { "$ref": "#/definitions/interceptor" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Unauthorized" } } }, "summary": "Update an interceptor by an Interceptor ID" } }, "api/v1/ifi/{ifiID}/resource_products/{resourceProductID}/interceptors": { "get": { "tags": [ "Interceptor APIs", ], "description": "This endpoint allows you to retrieve all interceptors for a specific Resource product ID.", "operationId": "listInterceptor", "parameters": [ { "name": "ifiID", "in": "path", "description": "ID of the on-boarded organization.", "required": true, "type": "string" }, { "name": "resourceProductID", "in": "path", "description": "Resource product identifier on which interceptors are configured.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Returns all interceptors configured for a specified resourceProductID.", "schema": { "$ref": "#/definitions/listInterceptor" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Unauthorized" } } }, "summary": "List all interceptors for a resource product" }, "post": { "tags": [ "Interceptor APIs" ], "description": "This endpoint allows you to add an interceptor for a specific Resource product ID.", "operationId": "addInterceptor", "parameters": [ { "name": "ifiID", "in": "path", "description": "ID of the on-boarded organization", "required": true, "type": "string" }, { "name": "resourceProductID", "in": "path", "description": "Resource product identifier on which an interceptor is to be configured.", "required": true, "type": "string" }, { "in": "body", "name": "addInterceptor", "description": "<ul><li>Supported <code>actionName</code>: PAYMENT_REQUESTED or PAYMENT_AUTHORIZATION_RECEIVED.</li> <li>Specify an <code>endpoint</code> for the callback.</li></ul>", "required": true, "schema": { "$ref": "#/definitions/addInterceptorRequest" } } ], "responses": { "200": { "description": "Returns the interceptor details.", "schema": { "$ref": "#/definitions/interceptor" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Unauthorized" } } }, "summary": "Add an interceptor for a resource product" } }, "api/v1/ifi/{ifiID}/resources/{resourceID}/payments/{paymentID}/resume": { "post": { "tags": [ "Interceptor APIs" ], "description": "This endpoint allows you to resume an intercepted payment. Fusion system waits for the interceptor to respond, and based on the response, the payment event is triggered. The allowed response timeout is configured as 5000ms. Specify the <code>actionName</code> as configured and pass the callback <code>response</code> as PASS_THROUGH or FAIL against a <code>paymentRequestId</code>.", "operationId": "resumeInterceptedPayment ", "parameters": [ { "name": "ifiID", "in": "path", "description": "ID of the on-boarded organization.", "required": true, "type": "string" }, { "name": "resourceID", "in": "path", "description": "Resource ID mapped to the resource product.", "required": true, "type": "string" }, { "name": "paymentID", "in": "path", "description": "Payment ID mapped to the resource.", "required": true, "type": "string" }, { "in": "body", "name": "resumeInterceptedPayment", "description": "<ul><li>Supported <code>actionName</code>: PAYMENT_REQUESTED or PAYMENT_AUTHORIZATION_RECEIVED.</li><li>allowed <code>response</code>: PASS_THROUGH or FAIL.</li><li>Specify the <code>paymentRequestId</code> of the payment request.</ul>", "required": true, "schema": { "$ref": "#/definitions/resumeInterceptedPayment" } } ], "responses": { "204": { "description": "Empty Payload" }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Unauthorized" } } }, "summary": "Resume an intercepted payment" } }, }, "definitions": { "Interceptor": { "type": "object", "properties": { "actionName": { "type": "string", "enum": [ "PAYMENT_REQUESTED", "PAYMENT_AUTHORIZATION_RECEIVED", "PAYMENT_REVERSAL_REQUESTED" ] }, "connectionConfig": { "$ref": "#/definitions/ConnectionConfig" }, "createdAt": { "type": "string", "format": "date-time" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "id": { "type": "string" }, "ifi": { "type": "integer", "format": "int64" }, "modifiedAt": { "type": "string", "format": "date-time" }, "resourceProductId": { "type": "string" }, "status": { "type": "string", "enum": [ "ACTIVE", "INACTIVE", "DELETED" ] } }, "title": "Interceptor" }, "ListInterceptorResponse": { "type": "object", "properties": { "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "interceptors": { "type": "array", "items": { "$ref": "#/definitions/Interceptor" } } }, "title": "ListInterceptorResponse" }, "Unauthorized": { "type": "object", "properties": { "code": { "type": "string", "example": "UNAUTHORIZED" }, "message": { "type": "string", "example": "Unauthorized" } } }, "NotFound": { "type": "object", "properties": { "code": { "type": "string", "example": "NOT_FOUND" }, "message": { "type": "string", "example": "Not found" } } }, "ConnectionConfig": { "type": "object", "properties": { "endpoint": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } } }, "title": "ConnectionConfig" }, "addInterceptorRequest": { "type": "object", "required": [ "actionName", "connectionConfig" ], "properties": { "actionName": { "type": "string", "enum": [ "PAYMENT_REQUESTED", "PAYMENT_AUTHORIZATION_RECEIVED" ] }, "connectionConfig": { "description": "Connection configuration", "type": "object", "properties": { "endpoint": { "type": "string", "example": "https://127.0.0.1" }, "headers": { "description": "Request Headers", "type": "object" } } } } }, "updateInterceptorRequest": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "ACTIVE", "INACTIVE", "DELETED" ] }, "connectionConfig": { "description": "Connection configuration", "type": "object", "properties": { "endpoint": { "type": "string", "example": "https://127.0.0.1" }, "headers": { "description": "Request Headers", "type": "object" } } } } }, "resumeInterceptedPayment": { "type": "object", "properties": { "paymentRequestId": { "description": "Payment Request Id", "type": "string" }, "actionName": { "type": "string", "enum": [ "PAYMENT_REQUESTED", "PAYMENT_AUTHORIZATION_RECEIVED" ] }, "response": { "type": "string", "enum": [ "PASS_THROUGH", "FAILED" ] } } }, "listInterceptor": { "type": "array", "items": { "$ref": "#/definitions/interceptor" } }, "interceptor": { "type": "object", "properties": { "id": { "description": "Interceptor ID", "type": "string" }, "resourceProductId": { "description": "Resource product ID", "type": "string" }, "actionName": { "type": "string", "enum": [ "PAYMENT_REQUESTED", "PAYMENT_AUTHORIZATION_RECEIVED" ] }, "createdAt": { "type": "string", "format": "date-time" }, "modifiedAt": { "type": "string", "format": "date-time" }, "status": { "type": "string", "enum": [ "ACTIVE", "INACTIVE", "DELETED" ] }, "connectionConfig": { "description": "Connection configuration", "type": "object", "properties": { "endpoint": { "type": "string", "example": "https://127.0.0.1" }, "headers": { "description": "Request Headers", "type": "object" } } } } } }, }

Related APIs:

Need Help?

Contact us at fusion-support@zeta.tech or call us on 080-6690 5995.