swagger: '2.0' info: description: |- To facilitate the capability for consumers to make a payment or refund to service providers. version: v1.0 title: Taxation contact: name: MADAPI Development Team url: 'https://developers.mtn.com/contact' email: developer-support@mtn.com schemes: - https host: api.mtn.com basePath: /v1 consumes: - application/json produces: - application/json securityDefinitions: OAuth2: type: oauth2 flow: application tokenUrl: 'https://api.mtn.com/v1/oauth/access_token' security: - OAuth2: [] paths: /taxation/{accountHolderId}/reserve: post: tags: - get eLevy financial resource information description: "Provides the taxable amount for any transaction." summary: Return the taxable amount for a payment transaction operationId: eLevy consumes: - application/json produces: - application/json parameters: - name: accountHolderId in: path type: string required: true - name: transactionId in: header type: string - name: requestBody in: body required: true schema: $ref: '#/definitions/eLevyRequest' responses: 200: description: "Success" schema: $ref: "#/definitions/ReserveResponse" 400: description: "Bad Request" schema: $ref: "#/definitions/Error" 500: description: "Internal Server Error" schema: $ref: "#/definitions/Error" definitions: eLevyRequest: description: Get Financial Resource Information Request. type: object properties: resource: type: string description: Sender's information example: 'fri:233543562410@elevy.gra/SP' receiverAccountNumber: type: string description: receiver's MSISDN example: '666666@momopay/ALIAS' receiverInstitutionId: type: string description: receivers ID example: '1' senderAccountNumber: type: string description: MSISDN of the sender example: "233244125127" senderIssuerId: type: string description: senders MSISDN example: "233244125125" transferAmount: type: string description: Amount being transferred for which the taxable amount is required example: "159.50" ReserveResponse: type: object properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. 0000 is for a success. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '0000' extension: type: object description: Used for sending any additional information to service provider. example: statusMessage: type: string description: transaction amount taxableAmount: type: string description: 'The taxable amount for the transaction' example: 159.5 eLevyId: type: string description: 'unique ID from GRA/backend system' example: 1234 serverTimestamp: type: string description: 'Timestamp from server.' currency: type: string description: 'currency' transactionId: type: string description: 'A unique ID for the clients transaction.' Error: type: object required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '1000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client supportMessage: type: string description: Internal message meant for consumers of the API to troubleshoot the error (could possible include the back-end system error code in the message if it would be useful) transactionId: type: string description: This is the same transactionId that is sent in the request example: cdfa7bc3-cbcd-473b-a743-4fc90dcc91e4 timestamp: type: string format: date-time description: Timestamp that the error occurred example: '2021-07-21T17:32:28Z' sequenceNo: type: string description: A unique id for tracing all requests example: 12345 path: type: string description: The path that caused the error example: /subscribers/27831234567 method: type: string description: The HTTP method type that was used example: Post