SlimPay Help Center

What is the notifyURL?


A notifyURL enables to proceed to a sever treatment on your side, after a signature or a payment with SlimPay tunnel.

What is its content?

A notification contains exactly the same content as a request to #get-orders with the HAPI (attributes list + ressources links)

How can I retrieve it?

The notification is sent by Slimpay in a JSON format. So you have to retrieve the body entirely and then parse this body. As the body does not parse naturally the JSON, you have to do it "by hand" otherwise we can believe that the notification is empty. Two examples, below:

$body = file_get_contents("php://input"); // string of the whole body
$json = json_decode($body, true); // array of the whole body

With the PHP client given by Slimpay :
$body = file_get_contents("php://input"); // string of the whole body
$resource = \HapiClient\Hal\Resource::fromJson($body); // \HapiClient\Hal\Resource Object
$state = $resource->getState(); // array of the state of the resource (all the properties except the _links

Was this article helpful?
0 out of 0 found this helpful