Payment Notification

Whenever a payment process is completed, we notify you of the event and whether it was successful or not. GlobalPay will send a POST message to the notification URL you setup in the Merchant Dashboard.

You need to respond with HTTP code 204 (No Content)!

Also it is highly recommended to match the values for notification Amount and Currency with the ones from your database!

In exceptional cases it is possible to receive duplicate notifications and your system should be able to handle such situations. If a duplicate is received with success status it overwrites any previous notification.

If you do not respond to the notifications of type Payment our system will keep sending the notifications until it receives a response. At first you will be notified more often. Once the time passes the notifications from our system will be rare and they will eventually stop (after a period of time defined in our system, currently set to 7 days).

Payment Notification Format

We will notify you about the new status of the payment to the Notification URL you setup in the Merchant Dashboard.

You need to respond with HTTP code 204 (No Content)!

Payment notification format:

Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=



{
  "Payment": {
    "ID": 2427068,
    "SkinID": null,
    "Created": "20160314092716",
    "MerchantTransactionID": "s2ptest_1",
    "Amount": 100,
    "Currency": "EUR",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 2,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "MethodTransactionID": null,
    "TokenLifetime": 1,
    "Capture": null,
    "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=4BF7A868E5B33A34C2206E2E4C4CE62A.2427068"
  }
}

Response:

204 No Content

Payment Notification Security

You will receive a notification whenever a payment process is completed, successful or not. GlobalPay will send a POST message to the Notification URL you initially setup in the Merchant Dashboard.

To ensure that a payment has been securely processed you will need to validate the authorization header using your SiteID and API Key in the same manner you compute the authorization header for a request. For more details, please go to Authentication section.

Also, you will have to whitelist Smart2Pay’s IPs for Test and Live Environment.
Here you will find the complete list of GlobalPay’s Environments and IPs.