По переходу операции в конечный статус на адрес, переденный в запросе в поле 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: sSSc74reUVz5rx5I1VvNuOL4diDOAPiCjHNlz6D54yikgf7XIJ/q+aHWPlB32dh2/9t1h4+8FBbyo0+KgfPNKviGNClBFzD8ZqUo5LrG32KBS70DiFbP5AmGH/rtDxNqdoowVWLE/tjsCC4PdbVaXkTnO2xtKRVnHnD+vKvJX/EuvhaPolX94ZNo9WZVUlTTilAERXbge7KTKwgesQBL4Vxb2o5CtHqeBPPXnBtgFA5skgX1/dNeYl7mMbrF2eJBSjQHVI88N63dVVP9+Zg6mqAM2W9QNDhg2Kz6HzAavSC7Gii6fVj224q9DIw5z46pMIKwRHQE8AkqHAvCFnYPaQ==
Content-Type: application/json
Host: payment.flexo.systems
Content-Length: 791
{
"id" : "1-6-a-35",
"type" : "REFUND",
"status" : "SUCCEEDED",
"externalId" : "ext#43",
"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
Привер уведомления (версия 3)
POST /test/emptycallback HTTP/1.1
W1-Signature: rBMipSU8p+GVxUxXziJzm3Fk1tx4r+5Llt+NZpn31AdvFXT5kQnZVy6E4oPti/EeqHgm2W3JSPFEyw/3fSzBsl/NHV7fsRTEy4kWzX/5/pPyQ6E2DFJQgLC/1tb/Oyw6VxW8879NI0HMoK9NoufbuhSabU88t152KRuFycGhxYvF9/AuAY3dAvpKxATGwmd8TYbfd3Y948hd5OWaFe7B7SvAje24lcdsCjJVfuWXnhJtlO8wnIMoFw5dc6RIqACKPbcdIztSHrZ6blb9dIeDc78avSJ84bqT3W3XRqHEIjTTgMkVjavkol8zQt8nuK1/fDlqjojEJsMHBlmPJjlOJQ==
Content-Type: application/json
Host: payment.flexo.systems
Content-Length: 914
{
"id" : "1-1-a-20",
"type" : "PURCHASE",
"status" : "SUCCEEDED",
"externalId" : "ext#25",
"chargedAmounts" : {
"amount" : {
"amount" : 10.57,
"currency" : "USD"
},
"payerAmount" : {
"amount" : 10.57,
"currency" : "USD"
},
"merchantFee" : {
"amount" : 0.0,
"currency" : "USD"
},
"payerFee" : {
"amount" : 0.0,
"currency" : "USD"
},
"settlementAmount" : {
"amount" : 10.57,
"currency" : "USD"
}
},
"registeredMethods" : [ {
"entity" : {
"id" : "payoutToken-411111-something-1111"
},
"type" : "PAYOUT_TOKEN"
} ],
"merchantParameters" : {
"param1" : "anything you want for callback",
"param2" : null,
"param3" : null
},
"transactions" : [ {
"type" : "PURCHASE",
"status" : "SUCCEEDED",
"maskedPan" : "411111XXXXXX1111",
"rejectReason" : null
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers