Skip to main content

SlimPay Help Center

URLs Management

Created:

Updated:

In this article you will find the most frequent questions about URL:

What is a notification URL?

A notification URL proceeds to a server treatment on your side, after a signature or a payment made through the SlimPay tunnel.

The content

A notification contains exactly the same content as a #get-orders API call.

How to retrieve it

The notification is sent from SlimPay in JSON format. You must retrieve the entire body and parse it.

Since PHP does not automatically parse the JSON, you must do it manually, otherwise the notification seems to be 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 client PHP provided 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)

 

What is a return URL?

A return URL redirects users back to the merchant's web page after a signature or a payment transaction on the SlimPay Checkout.

The content

There is no information sent in the return URL. However, with your agreement, we have the ability to activate an option to add the transaction reference in the return URL. In this case, your URL will have this format:

http://YOUR/RETURN/URL?order_reference=id-of-the-transaction

You can then perform a #get-orders call with this ID and retrieve the same information sent in the notification URL.

 

What is the difference between notification URL and return URL?

  • The return URL is the page on which your clients will be at the end of the process or after a cancellation or a failure.
  • The notification URL is a URL to your server that can update your database in the back-end (server to server).

How do I configure the URLs? 

 

Dashboard V2

 

Dashboard V1

(also called Back Office)

API
Notification URL You can configure your URL going to Set ups > APP Management > Modify. You can configure your URL going to Administration > HAPI APP Management > Create.  -- 
Return URL

You can configure your URL going to Set ups > APP Management > Modify.

Only one URL can be configured, whatever the transaction result.

You can configure your URL going to Administration > HAPI APP Management > Create.

Only one URL can be configured, whatever the transaction result.

You can configure the URL putting directly in your request #create-orders with the returnUrl, failureUrl, successUrl, cancelUrl parameters. 

Can you handle different return URLs?

Yes, it is possible. When you create orders, you can directly via API designate one URL in case of order success, one in case of order failure and one in case of order cancellation. The utilization of dynamic URLs does not give the possibility to retrieve the order_reference via the return URL.

Via the Back Office, only one URL can be configured.

 

How do I handle dynamic URLs?

With a #create-orders you can send the return URLs. For more information you can visit this page.

 

 

Was this article helpful?
0 out of 0 found this helpful
Return to top