Пример запроса
POST /card/1-1/operations/payout HTTP/1.1
W1-Signature: czK2kHwRyLIIgP5dpfzrJxCYixCm0appKfRbWfyPGcX0c8vYOkSL+++XwdRyQ0KkIwa8Em7v0LqavXEY5/EugvfBxPRCVvbx1rd9y8Vj6NlB4RsCxVAN8d9LE67Ie1DM+veXsgxOPqsUTsAaGKX9yemB/IXatBvyNC30ui4vWg/C8G1xUQWJ5OdlXHZYdHgSHftFcNuoUASLXL7ZKGLr4WgH1Df8hZKzhHCQJObK6a2vZEQ6dkE1JNoYaZCJFVExsngDEQVbJOEmatPdt6s8GbQHkzbeYnhHtdcmUS348cZOeIy/G3GlODmhzYIepg214bywhjJm9i4Sm0qYZvzMqQ==
Content-Type: application/json
Host: payment.flexo.systems
Content-Length: 608
{
"notification" : {
"url" : "http://127.0.0.1:8080/test/callback/default/",
"version" : 1
},
"externalId" : "ext#20",
"amount" : {
"amount" : 10.55,
"currency" : "USD"
},
"receiver" : {
"paymentMethod" : {
"entity" : {
"pan" : "4111111111111111",
"expMonth" : 5,
"expYear" : 2030
},
"type" : "NO_CVV_CARD"
},
"name" : "IVAN",
"surname" : "IVANOV",
"info" : {
"ip" : "127.0.0.1"
}
},
"merchantParameters" : {
"param1" : "anything you want for callback",
"param2" : null,
"param3" : null
}
}
Пример запроса с токеном
Для выплат можно использовать
-
PAYOUT_TOKEN, он приходит в callback к любой покупке.
-
RECURRING_TOKEN, его нужно "заказать" при покупке. Использование рекурентых платежей регулируется настройками.
POST /card/1-1/operations/payout HTTP/1.1
W1-Signature: pRWnMF87EyARqvNkflCAzM3MDDcY4BTG0l1H2RZEfWLbASydwdkJyqDJwJjNRKA/Oao+ChrNx4nw+n+FtecwzClIrLcMWqdQQ0m5iPgb/q2mLtOvyywSvqkWvd7l9aSDrKE5xiPFvAdbykfoNZvztA/fVfPIH8jF3/7wrvkOmZ8+E+BvzDcc1R7NreJkAO6Wl7JeooeNzc70H6nTznWf+wHlqzIWO53VMCzIK5o1NuZbj88dWQwbQjof9yqe8lsB4ajXobskNRb6WoSchEuwfD2/3L5IcFdeclI4Y0gvrW1QsTnSd2pVhZ968VupydZ54QceepUBaeSoSlced3/l7g==
Content-Type: application/json
Host: payment.flexo.systems
Content-Length: 575
{
"notification" : {
"url" : "http://127.0.0.1:8080/test/callback/default/",
"version" : 1
},
"externalId" : "ext#27",
"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",
"param2" : null,
"param3" : null
}
}
Пример ответа
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 166
{
"operationId" : "1-1-a-17",
"status" : "SUCCEEDED",
"type" : "PAYOUT",
"externalId" : "ext#20",
"params" : { },
"actions" : {
"required" : [ ]
}
}