Webhook Resync API

Overview

The Webhook Resync API provides endpoints created to manage webhook resynchronization and payload extraction for merchant orders. The controller requires authentication through a merchant-provided secret key and leverages various services to perform these operations.

Purpose

  • Webhook Delivery Assurance: Webhooks are crucial for real-time event notifications in payment systems, such as order status changes, payment approvals, or failures. If a webhook fails to deliver or process correctly due to network issues or system downtime, important transaction updates might be missed. This endpoint allows merchants to manually resynchronize a webhook, ensuring that no critical updates are lost.

  • Business Continuity: If a merchant's system fails to capture an important transaction or event update, it can lead to financial losses, poor customer experiences, and operational delays. Resynchronizing the webhook helps prevent these issues by ensuring the system stays up-to-date with the latest transaction events.

  • Compliance and Auditing: Resyncing webhooks can be essential for compliance, especially in cases where transaction data needs to be consistent across systems for auditing purposes. Ensuring that webhooks are delivered and processed helps avoid data discrepancies and maintain accurate records.

Authorization

All API calls require the merchant secret key in the request header for authentication. The secret key is provided through the X-Merchant-Secret header provided by Paytiko.

Resync Webhook Endpoint

POST {CORE_URL_ISSUED_BY_PAYTIKO}/api/webhook-resync?merchantOrderId={orderId*}

This endpoint is used to trigger a resynchronization of the webhook for a specific merchant order. This operation is necessary when the webhook was not delivered or processed correctly, and the merchant wants to resend or resynchronize it with the payment provider.

Headers

Name
Value

Content-Type*

application/json

X-Merchant-Secret*

{MERCHANT_SECRET_KEY_ISSUED_BY_PAYTIKO}

Response

{
    "isSuccess": true
}

Extract Payload Endpoint

GET {CORE_URL_ISSUED_BY_PAYTIKO}/api/webhook-resync/extract-payload?merchantOrderId={orderId*}

This endpoint retrieves the payload associated with a specific merchant order. This is useful for inspecting the details of a transaction that the webhook is tied to, and helps the merchant review transaction information.

Headers

Name
Value

Content-Type*

application/json

X-Merchant-Secret*

{MERCHANT_SECRET_KEY_ISSUED_BY_PAYTIKO}

Response

{
  "isSuccess": true,
  "resultObject": {
    "OrderId": "3aa1e912-6ff3-4925-82dc-66bd7927676c", // Your order identifier.
    "AccountId": "c6aad9e8-4fe6-4895b82-cc1ea66b4aad",
    "AccountDetails": {
      "MerchantId": 20115,
      "CreatedDate": "2022-07-18T10:18:31.67087+00:00",
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "john@doe.com",
      "Currency": "GBP",
      "Country": "GB",
      "Dob": "12/16/1990",
      "City": "London",
      "ZipCode": "5123",
      "Region": "London",
      "Street": "Baker Str. 12",
      "Phone": "+44839958434"
    },
    "TransactionType": "PayIn",
    "TransactionStatus": "Success",
    "Amount": 12.58,
    "Currency": "EUR",
    "TransactionId": 179411,
    "ExternalTransactionId": "63793736354518895200",
    "PaymentProcessor": "World Pay",
    "DeclineReasonText": null,
    "CardType": "Visa",
    "LastCcDigits": "5432",
    "CascadingInfo": {
      "SessionId": "6908d8cf-06e6-4121-9969-3791aa77ace3",
      "AttemptsVector": [
        {
          "PaymentSystem": "Safe Charge",
          "PaymentProcessorId": 50133,
          "PaymentProcessorKey": "ad6335b8-7f52-45d7-81fb-11e5f81bc7f5",
          "DeclineReason": "Acquirer Validation",
          "ExternalTransactionId": "63814313373237072733",
          "InternalPspId": "711000000021055202",
          "TransactionId": 400854,
          "Date": "2023-03-13T14:09:33.2372322+00:00",
          "Status": "Rejected"
        },
        {
          "PaymentSystem": "World Pay",
          "PaymentProcessorId": 50590,
          "PaymentProcessorKey": "1f052a08-7aeb-442c-aeed-b4040898d423",
          "DeclineReason": null,
          "ExternalTransactionId": "63793736354518895200",
          "InternalPspId": "5456650000021055202",
          "TransactionId": 179411,
          "Date": "2023-03-13T14:12:33.2372322+00:00",
          "Status": "Success"
        }
      ]
    },
    "IssueDate": "2023-03-13T14:12:33.2372322+00:00",
    "InternalPspId": "5456650000021055202",
    "MaskedPan": "455636******5432",
    "Signature": "Xrg3DzkEsWlPzTjFFfe1K..7qqtPntyjtc6pCwCuTDY="
  }
}

Last updated

Was this helpful?