profee-waas-pf-waas-api/async-api/waas-async-api.yaml

122 lines
5.9 KiB
YAML
Raw Normal View History

2022-04-08 10:48:07 +03:00
asyncapi: 2.3.0
info:
2022-04-08 11:52:16 +03:00
title: Profee WAAS Notificatioins API
2022-04-08 11:52:49 +03:00
version: '1.0'
2022-04-08 11:52:16 +03:00
description: The following notifications will be sent to partner system. Please provide us with URLs which will be responsible in every notification.
2022-04-08 10:48:07 +03:00
channels:
2022-04-08 11:50:34 +03:00
card/authorization:
2022-04-08 11:49:26 +03:00
publish:
2022-04-08 10:48:07 +03:00
message:
2022-04-08 11:49:26 +03:00
$ref: '#/components/messages/CardOperationNotificationDto'
2022-08-05 13:23:04 +03:00
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] |
2022-04-08 10:48:07 +03:00
components:
messages:
2022-04-08 11:49:26 +03:00
CardOperationNotificationDto:
2022-04-08 10:48:07 +03:00
payload:
type: object
properties:
2022-04-08 11:49:26 +03:00
cardId:
2022-04-08 10:48:07 +03:00
type: string
2022-04-08 11:49:26 +03:00
description: Card ID
walletId:
2022-04-08 10:48:07 +03:00
type: string
2022-04-08 11:49:26 +03:00
description: Wallet ID
notification:
type: object
description: Notification about card operation authorization
properties:
uuid:
type: string
2022-08-05 13:06:34 +03:00
description: Universally unique identifier, which is set for the payment
2022-04-08 11:49:26 +03:00
status:
type: string
2022-08-05 13:06:34 +03:00
description: Payment status to indicate whether authorization is successful, pending or failed
2022-04-08 11:49:26 +03:00
type:
type: object
2022-08-05 13:06:34 +03:00
description: The detailed transaction type
2022-04-08 11:49:26 +03:00
properties:
code:
type: string
2022-08-05 13:06:34 +03:00
description: The code used to identify the transaction type
2022-04-08 11:49:26 +03:00
direction:
type: string
2022-08-05 13:06:34 +03:00
description: The direction of funds, which can be crediting or withdrawal ("DEBIT" or "CREDIT")
2022-04-08 11:49:26 +03:00
description:
type: string
2022-08-05 13:06:34 +03:00
description: The description provided for the specified transaction type
2022-04-08 11:49:26 +03:00
mcc:
type: number
2022-08-05 13:06:34 +03:00
description: Merchant category code for the operation
2022-04-08 11:49:26 +03:00
authDate:
type: string
format: date
2022-08-05 13:06:34 +03:00
description: Authorization date for the operation
authTime:
2022-04-08 11:49:26 +03:00
type: string
2022-04-08 11:56:07 +03:00
format: time
2022-08-05 13:06:34 +03:00
description: Authorization time for the operation
2022-08-05 13:23:04 +03:00
example: '18:30:15'
2022-04-08 11:49:26 +03:00
postingDate:
type: string
2022-08-05 13:06:34 +03:00
description: Posting date for the operation
2022-04-08 11:49:26 +03:00
authCode:
type: string
2022-08-05 13:06:34 +03:00
description: Authorization code for the operation
2022-04-08 11:49:26 +03:00
rrn:
type: number
2022-08-05 13:06:34 +03:00
description: Retrieval reference number, which is provided by the acquiring bank
2022-04-08 11:49:26 +03:00
merchantId:
type: number
2022-08-05 13:06:34 +03:00
description: The identifier of the merchant
2022-04-08 11:49:26 +03:00
terminalId:
type: number
2022-08-05 13:06:34 +03:00
description: The identifier of the terminal
2022-04-08 11:49:26 +03:00
merchantName:
type: string
2022-08-05 13:06:34 +03:00
description: The name of the merchant
2022-04-08 11:49:26 +03:00
merchantCity:
type: string
2022-08-05 13:06:34 +03:00
description: The city or location of the merchant
example: VISA DIRECT
2022-04-08 11:49:26 +03:00
merchantSum:
type: object
2022-08-05 13:06:34 +03:00
description: The parameters of the payment on the merchant side
2022-04-08 11:49:26 +03:00
properties:
amount:
type: number
2022-08-05 13:06:34 +03:00
description: The amount of the payment on the merchant side, can be null
2022-04-08 11:49:26 +03:00
currency:
type: string
2022-08-05 13:06:34 +03:00
description: The currency on the merchant side, which is represented in alpha codes ISO 4217
2022-04-08 11:49:26 +03:00
cardSum:
type: object
2022-08-05 13:06:34 +03:00
description: The parameters of the payment on the card side
2022-04-08 11:49:26 +03:00
properties:
amount:
type: number
2022-08-05 13:06:34 +03:00
description: The amount of the payment on the card side, can be null
2022-04-08 11:49:26 +03:00
currency:
type: string
2022-08-05 13:06:34 +03:00
description: The currency on the card side, which is represented in alpha codes ISO 4217
2022-04-08 11:49:26 +03:00
authDescription:
type: string
2022-08-05 13:06:34 +03:00
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)