asyncapi: 2.3.0 info: title: Profee WAAS Notificatioins API version: '1.0' description: The following notifications will be sent to partner system. Please provide us with URLs which will be responsible in every notification. channels: card/authorization: publish: message: $ref: '#/components/messages/CardOperationNotificationDto' name: Card operation notification description: | WaaS partners receive notifications upon any attempt to make a card operation. These notifications are supposed to inform the customer on the operation status and the remaining balance, or they can state the reason for denial. These notifications have to be sent by the partner. The partner may choose an appropriate way to convey this information, be it an SMS or a push notification. Our service provides the parameters of the message, but not the message itself, so the partners may create their own customized templates. A partner may structure the messages according to the following templates: |Notification type|Conditions for the notification|Notification structure| |-----------------|-------------------------------|----------------------| |Load money |status = 2, type/code = 1 |Card [$cardId] has been loaded [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | |Purchase |status = 2, type/code = 0 |Card [$cardId]. Purchase [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | |Denial of operation |status = 0, type/code IN {0,1} |Card [$cardId]. Transaction [$merchant/amount] [$merchant/currency] refused by Card Issuer at [$merchantName]. [$authDate] [$authTime] | |Cancellation of payments for goods and services |status = 1, type/code = 3 |Card [$cardId]. Transaction cancelled [$merchant/amount] [$merchant/currency] [$merchantName]. Balance [$otb] [$card/currency]. [$authDate] [$authTime] | payment/notification: publish: message: $ref: '#/components/messages/PaymentCompletedNotificationDto' name: Payment completed notification description: | WaaS partner will receive notification when payment in Profee system get final status. If block "state" is SUCCESSFUL payment considered successful. Otherwise, block "errors" will contain error code and human readable message, describing error reason. components: messages: CardOperationNotificationDto: payload: type: object properties: cardId: type: string description: Card ID walletId: type: string description: Wallet ID notification: type: object description: Notification about card operation authorization properties: uuid: type: string description: Universally unique identifier, which is set for the payment status: type: string description: Payment status to indicate whether authorization is successful, pending or failed type: type: object description: The detailed transaction type properties: code: type: string description: The code used to identify the transaction type direction: type: string description: The direction of funds, which can be crediting or withdrawal ("DEBIT" or "CREDIT") description: type: string description: The description provided for the specified transaction type mcc: type: number description: Merchant category code for the operation authDate: type: string format: date description: Authorization date for the operation authTime: type: string format: time description: Authorization time for the operation example: '18:30:15' postingDate: type: string description: Posting date for the operation authCode: type: string description: Authorization code for the operation rrn: type: number description: Retrieval reference number, which is provided by the acquiring bank merchantId: type: number description: The identifier of the merchant terminalId: type: number description: The identifier of the terminal merchantName: type: string description: The name of the merchant merchantCity: type: string description: The city or location of the merchant example: VISA DIRECT merchantSum: type: object description: The parameters of the payment on the merchant side properties: amount: type: number description: The amount of the payment on the merchant side, can be null currency: type: string description: The currency on the merchant side, which is represented in alpha codes ISO 4217 cardSum: type: object description: The parameters of the payment on the card side properties: amount: type: number description: The amount of the payment on the card side, can be null currency: type: string description: The currency on the card side, which is represented in alpha codes ISO 4217 authDescription: type: string description: A description to elaborate on the status of the operation example: Approved by Issuer otb: type: number description: Card balance after the transaction (with authorization) PaymentCompletedNotificationDto: payload: type: object properties: paymentId: type: string description: Payment ID walletId: type: string description: Wallet ID state: type: string description: State of payment processing. Can be SUCCESSFUL or FAILED example: SUCCESSFUL error: type: object description: If payment FAILED contains error details properties: code: type: string description: The error code description: type: string description: The error description