Callback & Notifications

Overview

Once the order has been placed and payment has been confirmed, you will be notified by ifthenpay via the usual channels, i.e. by push notification, if you have our app installed and have this option activated, by email, or you can check directly in our backoffice.

If you wish to be notified by callback, you must first ask ifthenpay to activate your callback (webhook).

In simpler terms: The callback URL is like a template. When a payment happens, the template is filled in with real information about that payment, and then the information is sent to your website.

ifthenpay offers free technical support to all customers through the following channels:



« go to index

 

Explanation

The following is an explanation of what a callback is and its purpose.

Callback example URL
http://www.yoursite.com/callback.php?key=[ANTI_PHISHING_KEY]&orderId=[ORDER_ID]&amount=[AMOUNT]&requestId=[REQUEST_ID]&payment_datetime=[PAYMENT_DATETIME]


URL Breakdown:

The Square Brackets []:

What Happens During a Callback:

  1. Customer Completes Purchase: When a customer finishes buying something on your website, the payment gateway processes the transaction.
  2. Gateway Sends Request: The payment gateway sends a request to the URL you provided.
  3. Placeholders are Replaced: The gateway replaces the placeholders in the URL with the specific details of the transaction.
  4. Your Server Receives Data: Your server receives the request and processes the data, updating your database, sending emails, or performing other actions.

Why use a callback URL?

Common Use Cases:

 

Multibanco


Callback example URL
https://www.yoursite.com/callback.php?key=[ANTI_PHISHING_KEY]&orderId=[ORDER_ID]&amount=[AMOUNT]&requestId=[REQUEST_ID]&entity=[entity]&reference=[REFERENCE]&payment_datetime=[PAYMENT_DATETIME]

The description of the replacements is as follows:



Example of a Callback URL triggered after payment confirmation
https://www.yoursite.com/callback.php?key=my_anti_phishing_key&orderId=order-1234&amount=1234.56&requestId=5Qd8gtWLAEUJ6n0lkS5g&entity=99999&reference=123456789&payment_datetime=28-10-2021 10:55:21
 

MB WAY


Callback example URL
https://www.yoursite.com/callback.php?key=[ANTI_PHISHING_KEY]&orderId=[ORDER_ID]&amount=[AMOUNT]&requestId=[REQUEST_ID]&payment_datetime=[PAYMENT_DATETIME]

The description of the replacements is as follows:



Example of a Callback URL triggered after payment confirmation
https://www.yoursite.com/callback.php?key=your_anti_phishing_key&orderId=1887&amount=33.61&requestId=i2szvoUfPYBMWdSxqO3n&payment_datetime=03-01-2024 15:15:16
 

Payshop


Callback example URL
https://www.yoursite.com/callback.php?anti_phishing_key=[ANTI_PHISHING_KEY]&order_id=[ORDER_ID]&reference=[REFERENCE]&amount=[AMOUNT]&payment_datetime=[PAYMENT_DATETIME]

The description of the replacements is as follows:



Example of a Callback URL triggered after payment confirmation
https://www.yoursite.com/callback.php?anti_phishing_key=my_anti_phishing_key&order_id=12345&reference=1021600051424&amount=5.00&payment_datetime=28-10-2021 10:55:21
 

PAY BY LINK & PINPAY


Callback example URL
https://www.yoursite.com/callback.php?key=[ANTI_PHISHING_KEY]&id=[ID]&amount=[AMOUNT]&payment_datetime=[PAYMENT_DATETIME]&payment_method=[PAYMENT_METHOD]

The description of the replacements is as follows:



Example of a Callback URL triggered after payment confirmation
https://www.yoursite.com/callback.php?key=my_anti_phishing_key&id=1234&amount=21.50&payment_datetime=28-10-2021 10:55:21&payment_method=CCARD