Notifications (Webhooks)
Events
VR pay secure webhooks will be fired on the following events:
Transaction | Status |
---|---|
Order placed | Waiting |
Successful payment processed | Confirmed |
Payment aborted by customer | Cancelled |
Payment declined | Declined |
Pre-authorization successful | Authorized |
Payment (partial-) refunded by merchant | Refunded / partially-refunded |
Chargeback by card holder | Chargeback |
Technical error | Error |
Subscription
- On successful payment of a subscription payment
- On failed payment of a subscription payment
- On cancelled subscription
- On noticed subscription
For one successful payment, you will get two webhook requests.
Configuration
The configuration for webhooks can be found at Settings > API.
There must be an accessible URL / IP address where the data should be sent to.
You can choose which content type you want to use:
- "Normal (PHP-Post)" means application/x-www-form-urlencoded and is best used for PHP-applications
- "JSON" means application/json and is best used for all different applications
How to use
For an integration into a web shop you will create a VR pay secure Gateway. After the transaction has been performed, you will get a notification request to your server. You can identify the transaction by paymentLinkId or referenceId in Invoice object.
Data
The data will be either sent in JSON format or as HTTP POST form-data.
Depending on the information you want to track in your system, please go to the object specification:
Examples
Currently we only have one example written in PHP:
<?php
/**
* The data of the POST request
* @var array $transaction
*/
$transaction = !empty($_POST['transaction']) ? $_POST['transaction'] : array();
if (!empty($transaction)) {
$invoice = $transaction['invoice'];
$customFields = $invoice['custom_fields'];
$contact = $transaction['contact'];
}
Updated 7 months ago