Developer
DocsDeveloperPlatformTicket
  • Overview
  • Guides
    • Accept Payment
      • Payment Types
        • Pre Authorization
        • Tokenization
        • Subscription
      • Build Your Gateway
    • Webhook
      • Transaction
      • Subscription
      • Payout
    • Embedding
      • iFrame
      • Modal Window
      • Mobile Apps
      • Integration Parameter
  • General Information
    • Payment Method
      • Static QR Code
    • Payment Provider
    • Objects
      • Metadata
      • Invoice
      • Contact
  • Testing
  • Plugin Development
  • More Documentations
  • Merchant
  • API Reference
Powered by GitBook
On this page
  • Configuration
  • Retry on failure
  • Timeout
  • How to use
  • Data
  • Examples
  1. Guides

Webhook

PreviousBuild Your GatewayNextTransaction

Last updated 3 months ago

Webhooks can be configured in the settings of your Payrexx merchant account. Find this in the navigation under "Webhooks".

Webhooks are fired whenever the status of a transaction or subscription changes.

Configuration

  • Submit an accessible URL / IP address where you receive and process the data

  • Decide whether webhooks should be retried in case of an error at the processing server

  • Choose between two content types

    • Normal (PHP-Post): application/x-www-form-urlencoded

    • JSON: application/json and is best used for all different applications

Retry on failure

When activated, the Payrexx software tries to send the webhook 10 times until a successful response is received.

These attempts will be fired at the following intervals:

  1. ASAP (max. 1 - 1.5 minutes after the first synchronous attempt)

  2. 15 minutes after the last attempt

  3. 1 hour after the last attempt

  4. 2 hours after the last attempt

  5. 4 hours after the last attempt

  6. 24 hours after the last attempt

  7. 24 hours after the last attempt

  8. 24 hours after the last attempt

  9. 24 hours after the last attempt

  10. 24 hours after the last attempt

Timeout

The server needs to send a response within 20 seconds. Otherwise, the request times out. The log shows HTTP status 0 and response body "Operation timed out after 20000 milliseconds with 0 bytes received".

How to use

Data

Depending on the information you want to track in your system, please go to the object specification:

  • Subscription

Examples

Currently, we only have an 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'];
}

For an integration into a webshop, you will create a . 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 .

The data will be either sent in or as .

Download full PHP example with a corresponding MySQL database:

Payrexx Gateway
Invoice object
JSON format
HTTP POST form-data
Transaction
click here to download