openapi: 3.2.0 info: title: Modulr Integration Notification API description: Modulr API license: name: © Modulr Finance url: https://www.modulrfinance.com version: '1.0' servers: - url: https://api-sandbox.modulrfinance.com/api-sandbox-token security: - modulo_security: [] tags: - name: Integration Notification paths: /customers/{customerId}/integration-notifications/{notificationId}: get: tags: - Integration Notification summary: Retrieve a specific Webhook Notification Subscription for a Customer using the Notification ID. operationId: getCustomerWebhookNotificationSubscription parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string - name: notificationId in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' security: - HMAC: [] - TOKEN: [] put: tags: - Integration Notification summary: Update a specific Webhook Notification Subscription for a Customer. operationId: editCustomerWebhookNotificationSubscription parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string - name: notificationId in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationRequest' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' security: - HMAC: [] - TOKEN: [] delete: tags: - Integration Notification summary: Delete a Webhook Notification Subscription for a Customer using the Notification ID. operationId: deleteCustomerWebhookNotificationSubscription parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string - name: notificationId in: path required: true style: simple explode: false schema: type: string responses: '204': description: NO CONTENT '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found security: - HMAC: [] - TOKEN: [] /customers/{customerId}/integration-notifications: get: tags: - Integration Notification summary: Retrieve all Webhook Notification Subscriptions for a Customer. operationId: getAllCustomerWebhookNotificationSubscriptions parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string - name: page in: query required: false style: form explode: true schema: type: integer format: int32 default: 0 minimum: 0 - name: size in: query required: false style: form explode: true schema: type: integer format: int32 default: 20 maximum: 500 minimum: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/integrationnotification.PaginatedWebhookNotificationResponse' '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/integrationnotification.PaginatedWebhookNotificationResponse' security: - HMAC: [] - TOKEN: [] post: tags: - Integration Notification summary: Set up a new Webhook Notification Subscription for a Customer. operationId: addCustomerWebhookNotificationSubscription parameters: - name: customerId in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationRequest' required: true responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' security: - HMAC: [] - TOKEN: [] /integration-notification-webhooks/{notificationId}/failures: get: tags: - Integration Notification summary: Retrieve failed Webhook Notifications for a Webhook using the Notification ID. operationId: getFailedWebhookNotifications parameters: - name: notificationId in: path description: Id of notification required: true style: simple explode: false schema: type: string - name: fromDateTime in: query description: Failed since Date. Needs to be urlEncoded value required: true style: form explode: true schema: type: string - name: page in: query required: false style: form explode: true schema: type: integer format: int32 default: 0 minimum: 0 - name: size in: query required: false style: form explode: true schema: type: integer format: int32 default: 20 maximum: 500 minimum: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/integrationnotification.PaginatedWebhookFailureResponse' '400': description: Bad request content: '*/*': schema: type: array items: $ref: '#/components/schemas/integrationnotification.MessageResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/integrationnotification.PaginatedWebhookFailureResponse' security: - HMAC: [] - TOKEN: [] components: schemas: integrationnotification.WebhookNotificationRequest: type: object description: Request object used to create/update a new integration notification. properties: url: type: string description: The URL used for sending the notification. minLength: 1 retry: type: boolean description: Flag indicating whether failed webhooks should be retried. secret: type: string description: Secret that is used in HMAC calculation for webhooks. maxLength: 32 minLength: 32 hmacAlgorithm: type: string description: HMAC signing algorithm used to calculate the webhook signature. enum: - hmac-sha1 - hmac-sha256 - hmac-sha384 - hmac-sha512 type: type: string description: Type of the notification. enum: - PAYOUT - PAYIN - CARD_AUTH - CARD_AUTH_OFFLINE - CARD_STATUS_UPDATE - PAYMENT_COMPLIANCE_STATUS webhookTypeConfiguration: $ref: '#/components/schemas/integrationnotification.WebhookTypeConfiguration' description: Value used to determine whether payin webhooks should be sent or not. required: - hmacAlgorithm - retry - secret - type - url integrationnotification.PaginatedWebhookFailureResponse: type: object properties: content: type: array description: List of failed webhook delivery records items: $ref: '#/components/schemas/integrationnotification.WebhookFailureResponse' size: type: integer format: int32 description: Number of records returned in the current page totalSize: type: integer format: int64 description: Total number of matching failure records page: type: integer format: int32 description: Current page number (0-based) totalPages: type: integer format: int32 description: Total number of pages available integrationnotification.PaginatedWebhookNotificationResponse: type: object properties: content: type: array description: List of Webhook Notification records items: $ref: '#/components/schemas/integrationnotification.WebhookNotificationResponse' size: type: integer format: int32 description: Number of records returned in the current page totalSize: type: integer format: int64 description: Total number of matching failure records page: type: integer format: int32 description: Current page number (0-based) totalPages: type: integer format: int32 description: Total number of pages available integrationnotification.WebhookTypeConfiguration: type: object description: Optional webhook type specific configuration properties: amountThreshold: type: number description: Amount threshold used to determine whether PAYIN webhooks should be sent. minimum: 0 integrationnotification.MessageResponse: type: object properties: field: type: string code: type: string enum: - GENERAL - BUSINESSRULE - MFASTATUS - MFAERROR - MFATIMEOUT - MFADEVICEMM - MFAMESSAGEINVALID - NOTFOUND - DUPLICATE - INVALID - CONNECTION - RETRY - RATELIMIT - PERMISSION - NOTACCEPTABLE - MFAVERIFICATION - TOKENEXPIRED errorCode: type: string message: type: string sourceService: type: string integrationnotification.WebhookNotificationResponse: type: object description: Response object for integration notification operations. Contains all common fields from WebhookNotificationRequestBase, along with the notification ID and type. properties: id: type: string description: Unique Identifier for the notification url: type: string description: The URL used for sending the notification. minLength: 1 retry: type: boolean description: Flag indicating whether failed webhooks should be retried. secret: type: string description: Secret that is used in HMAC calculation for webhooks. maxLength: 32 minLength: 32 hmacAlgorithm: type: string description: HMAC signing algorithm used to calculate the webhook signature. enum: - hmac-sha1 - hmac-sha256 - hmac-sha384 - hmac-sha512 type: type: string description: Type of the notification. enum: - PAYOUT - PAYIN - CARD_AUTH - CARD_AUTH_OFFLINE - CARD_STATUS_UPDATE - PAYMENT_COMPLIANCE_STATUS webhookTypeConfiguration: $ref: '#/components/schemas/integrationnotification.WebhookTypeConfiguration' description: Value used to determine whether payin webhooks should be sent or not. required: - hmacAlgorithm - id - retry - secret - type - url integrationnotification.WebhookFailureResponse: type: object properties: id: type: string description: Notification bid for which the webhook delivery failed failureDateTime: type: string format: date-time description: Failure time. Format is 'yyyy-MM-dd'T'HH:mm:ssZ' where Z is UTC offset. e.g '2017-01-28T01:01:01+0000' data: description: Payload data that was attempted to be sent to the webhook URL required: - data - failureDateTime - id securitySchemes: modulo_security: type: apiKey name: Authorization in: header TOKEN: type: apiKey name: Authorization in: header x-readme: proxy-enabled: false