Пример запроса
POST /card/1-1/operations/payout HTTP/1.1
W1-Signature: vcMlcrNzIhrUYVDVoZMVI/qvxQrYyQ1oGSZTAsnW9fKYGBHPi7xxAptRYjdYJeJbdZFX6gF4+Ls+80g/mr2yT1opL05uqECaAPtcaEPHkh2qarhsYWbJaVvD8c3pBwGPqaHSsM1aVQUo/mXbjmT+Cask88OIkiBiXpaoNqxX4lLoGoDq+Of+g4hbTAIjt9rwtFLiAdPmTfNA30Acp4fOWB1abJdWaBB4GEq+cdLsw4Gt5f0JF7b5EeilYqbZKNKVTvQSvSNO6ba5Mi63C4YJqfwPf9/LHRnOiaSixXRaHC2qNRSu4WLd+K2TNwZyy/6qymAYcWkAAYwCkuyM5wPfTA==
Content-Type: application/json; charset=UTF-8
Host: localhost:8080
Content-Length: 502
{
"notification" : {
"url" : "http://localhost:65456/callback",
"version" : 1
},
"externalId" : "ext#51",
"amount" : {
"amount" : 10.55,
"currency" : "USD"
},
"receiver" : {
"paymentMethod" : {
"entity" : {
"ean" : "20191022110"
},
"type" : "REGISTERED_CARD"
},
"name" : "CARD",
"surname" : "HOLDER",
"info" : {
"ip" : "127.0.0.1"
}
},
"merchantParameters" : {
"param1" : "anything you want for callback"
}
}
Пример запроса с токеном
Для выплат можно использовать
-
PAYOUT_TOKEN, он приходит в callback к любой покупке.
-
RECURRING_TOKEN, его нужно "заказать" при покупке. Использование рекурентых платежей регулируется настройками.
POST /card/1-1/operations/payout HTTP/1.1
W1-Signature: GtYYVsAj4f+aW/9SEd2uaLib8tlg4nQ1NXfvtsqtv5+81GhPtolIJfoTWrqdjmsoobc5Z4fUZYRam2QFl1kfkcfF2kcxXeE+B7/G6EnHFgY4JrmypP5DNhSRTRkP9yvJ/gXpZwRAclDrP9r56fo9hJ1OXMHPFJreGSRBjGiVMOqzx5mNZ3cBRJPYk4l+vh/YrpQxpS2a1zRXR3p/H0dhpPrnPwgMzMfxatjzKv7INeqQT5WFJLKKMkTMMsKNt0X1h53EMFKil2bE7EHfDP19kgfIDp5KliRazV3gFz/vICtrTDeriDdJsHKK7DUpNT4fEgXL7RG5Ld79MbIuaxDjrA==
Content-Type: application/json; charset=UTF-8
Host: localhost:8080
Content-Length: 520
{
"notification" : {
"url" : "http://localhost:65456/callback",
"version" : 1
},
"externalId" : "ext#36",
"amount" : {
"amount" : 10.55,
"currency" : "USD"
},
"receiver" : {
"paymentMethod" : {
"entity" : {
"id" : "payoutToken-411111-something-1111"
},
"type" : "PAYOUT_TOKEN"
},
"name" : "IVAN",
"surname" : "IVANOV",
"info" : {
"ip" : "127.0.0.1"
}
},
"merchantParameters" : {
"param1" : "anything you want for callback"
}
}
Пример ответа
HTTP/1.1 200 OK
Date: Fri, 26 Nov 2021 13:08:22 GMT
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 167
{
"operationId" : "1-1-a-363",
"status" : "SUCCEEDED",
"type" : "PAYOUT",
"externalId" : "ext#51",
"params" : { },
"actions" : {
"required" : [ ]
}
}