Introduction

Webhooks are a crucial tool for receiving real-time updates about payment-related events directly from PortOne's system. The webhook notifies your server about successful payments, failed transactions, refunds, etc, enabling your system to respond appropriately.

Webhooks eliminate the need to constantly poll PortOne for status updates, providing real-time notifications when key payment events occur.

How Webhooks Work

  1. Payment Event Occurs: A payment-related event (such as payment success or failure) occurs in the payment system.
  2. Webhook is Triggered: The payment service sends an HTTP request (typically POST) to your predefined webhook endpoint with details of the event.
  3. Receive and Process: Your server receives the webhook payload, processes the event data, and responds with a confirmation (e.g., 200 OK).
  4. Take Action: Based on the webhook payload, your system can take actions such as updating the payment status, notifying users, or triggering business logic.

Webhook Configuration

  • Create a webhook endpoint on your server with POST method.
  • Register the webhook endpoint on PortOne Merchant portal in Settings > Webhooks section. Refer below for a step by step guide on how to configure a webhook on Port One Merchant portal.


PortOne Webhooks

Currently following webhook types are supported on PortOne

  1. Payment Webhook: Triggered when the payment's status changes. Refer Payment Webhook section for more information.
  2. Refund Webhook: Triggered when the refund's status changes. Refer Refund Webhook section for more information.
  3. Payment Link Webhook: Triggered when the payment link's status changes. Refer Payment Link Webhook section for more information.
  4. Subscription Link Webhook: Triggered when a subscription link's status changes. Refer Subscription Link Webhook section for more information.