По переходу операции в конечный статус на адрес, переденный в запросе в поле notification.url
отправляется нотификация.
-
метод: POST
-
в заголовке передается подпись. Правила формирования
-
публичный ключ для проверки подписи:
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs7NA6ot9a53nxGYelM89
o1imFac04hED3sS8cwzFxi2rxUNQXl2tEiWIHzGy2sEFLDfeN2lvEVCONl7pXlDP
fpFPBNPy6zfSRMq32t319MDOkykBRTRE4GDlU+MPm/u/UOGuHSaFLKKKXVZVyk6o
9K+hI9UfVE5FNjF04vWBrgcnwWQ9+hqNE9EhqxELoQdhbcUz3PnBkjWRKlBXnUBo
9HrboTaRUr+YkyTh6Kh/afQHreKXy8yA0arTT4mpeb5PL06g0B9Ejn4m+wHPN8DW
feY8U8QImoaDT5n+ngxMpqIXv2kokPBATlpno3uj9fKcxivqvEbtNrAA5wRM17Bq
WwIDAQAB
-----END PUBLIC KEY-----
Пример уведомления (версия 2)
POST /test/emptycallback HTTP/1.1
W1-Signature: GfS+w4FeDl2sCuRlrfDH68QYH0pIRT/xkEmW82Aiszz/8KaMsKmXIb3o2ZlL96LFVk4zNRwqsdzF1Gpj01mo4wGLbFu8Kx4YcoEOMKPn09e+sRtGqoYJMrTlg3QXeCTNzJ9oMK41pKaRLnFMbO18/ZKpP4S5yzAJWp8fp1bhI8RE+sBqla/4Er3mgowgBcTm62E5hrx+ZDHxvDIZPUfp7TNwNFI9DFdvPt3Mwi1v1dVyH/VbWILg0osnNY4IaVVJU1mlDWfOsTY/PjIb0AFLmTwgAwx/KT4V6EUN7+cUr1d58wTSwNCqSfEXNWsa6jjPtJlcAK7zv7YZ0l2FGeLxAw==
Content-Type: application/json
Host: payment.flexo.systems
Content-Length: 791
{
"id" : "1-6-a-36",
"type" : "REFUND",
"status" : "SUCCEEDED",
"externalId" : "ext#44",
"amounts" : {
"amount" : {
"amount" : 5.0,
"currency" : "USD"
},
"payerAmount" : {
"amount" : 7.5,
"currency" : "USD"
},
"merchantFee" : {
"amount" : 0.0,
"currency" : "USD"
},
"payerFee" : {
"amount" : 2.5,
"currency" : "USD"
},
"settlementAmount" : {
"amount" : -5.0,
"currency" : "USD"
}
},
"registeredMethods" : [ ],
"merchantParameters" : {
"param1" : "anything you want for callback",
"param2" : null,
"param3" : null
},
"transactions" : [ {
"type" : "REFUND",
"status" : "SUCCEEDED",
"maskedPan" : "411111XXXXXX1111",
"rejectReason" : null
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers