> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymentoptions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Sample Response

> Explore sample webhook notifications from the Payment Options Gateway, including transaction status, payment details, merchant information, and gateway response codes across supported payment methods.

## Overview

The Payment Options Gateway sends webhook notifications to the merchant's configured `webhook_url` when transaction events occur.

These notifications provide transaction status, payment details, merchant information, and gateway response codes, allowing merchants to monitor payment outcomes and update their systems accordingly.

Webhook notifications may be generated for different payment methods and transaction types, including purchases, captures, refunds, and other supported payment operations.

## Key Points

> [!NOTE]
>
> **Webhook Notification**
>
> * Webhook notifications are sent to the `webhook_url` configured in the payment request.
> * The `success` field indicates whether the reported transaction event was successful.
> * The `gateway_response` object provides the gateway response code, type, and message.
> * The `payment_details` object contains payment-related information, which may vary depending on the payment method.
> * The `merchant_details` and `transaction_details` objects provide merchant and transaction identification information.
>
> **Transaction Verification**
>
> * A payment initiation response does not necessarily indicate that the transaction has been completed.
> * Merchants should validate webhook notifications and verify the transaction status before updating their payment records.
> * Webhook fields and values may vary depending on the payment method, transaction type, and processing outcome.

## Sample Webhook Response

The following example illustrates a successful payment notification using PayNow. The response structure and payment-specific fields may differ for other transaction types and payment methods.

```json theme={null}
{
  "is_live": false,
  "success": true,
  "status_code": 200,
  "risk-details": {},
  "payment_details": {
    "card": {
      "name": "",
      "number": "",
      "exp_year": "",
      "exp_month": ""
    },
    "amount": 200,
    "scheme": "",
    "currency": "SGD",
    "auth_code": null,
    "response_code": 0,
    "payment_method": "",
    "additional_data": {
      "payment_data_source": {
        "type": "paynow"
      }
    }
  },
  "gateway_response": {
    "code": "INFO0000",
    "type": "INFO",
    "message": "Payment Successful.",
    "version": "1"
  },
  "merchant_details": {
    "mid": "SG00003085",
    "legal_name": "Merchant Name Pte. Ltd.",
    "device_details": {
      "visited_ip": "",
      "customer_ip": "",
      "merchant_ip": ""
    },
    "billing_details": {
      "billing_address": {
        "city": "Minatoku",
        "email": "customer@example.com",
        "phone": "767676767",
        "state": "Tokyoto",
        "country": "JP",
        "address1": "Chiyoda1-1",
        "postal_code": "1000001",
        "phone_number": "767676767"
      },
      "shipping_address": {
        "city": "Minatoku",
        "email": "customer@example.com",
        "phone": "08012341234",
        "state": "Tokyoto",
        "country": "JP",
        "address1": "Chiyoda1-1",
        "postal_code": "1000001",
        "phone_number": "08012341234"
      }
    },
    "merchant_txn_ref": "TEST00989012878787878787878787"
  },
  "transaction_type": "CAPTURE",
  "transaction_details": {
    "id": "54ba5a90-fdb6-4bed-8af1-9df9e033dec4",
    "ref": 353409,
    "notes": "",
    "timestamp": "2026-10-19T05:13:45.000Z",
    "merchant_txn_ref": "TEST00989012878787878787878787",
    "stored_payment_method_id": "******"
  }
}
```

## Response Attributes

| **Attribute** | **Description** |
| :- | :- |
| `is_live` | Indicates whether the transaction was processed in the production environment. |
| `success` | Indicates whether the reported transaction event was successful. |
| `status_code` | Status code included in the webhook payload. |
| `risk-details` | Contains risk-related information associated with the transaction. |
| `payment_details` | Contains payment amount, currency, and payment method information. |
| `payment_details.card` | Contains card-related information when applicable. |
| `payment_details.amount` | Transaction amount. |
| `payment_details.currency` | Transaction processing currency. |
| `payment_details.response_code` | Payment response code returned in the notification. |
| `payment_details.additional_data` | Contains additional payment-related information, when available. |
| `payment_details.additional_data.payment_data_source.type` | Identifies the payment method used, such as `paynow`. |
| `gateway_response` | Contains gateway response details. |
| `gateway_response.code` | Gateway response code, e.g. `INFO0000`. |
| `gateway_response.type` | Gateway response classification. |
| `gateway_response.message` | Gateway response message, e.g. `Payment Successful.` |
| `merchant_details` | Contains merchant identification and customer information. |
| `merchant_details.mid` | Merchant ID (DASMID). |
| `merchant_details.legal_name` | Registered legal name of the merchant. |
| `merchant_details.device_details` | Contains device and IP address information, when available. |
| `merchant_details.billing_details` | Contains customer billing and shipping address information. |
| `merchant_details.merchant_txn_ref` | Merchant transaction reference ID. |
| `transaction_type` | Transaction operation type, e.g. `CAPTURE`. |
| `transaction_details` | Contains transaction identifiers and processing information. |
| `transaction_details.id` | Unique gateway transaction ID. |
| `transaction_details.ref` | Gateway transaction reference number. |
| `transaction_details.timestamp` | Transaction timestamp in UTC. |
| `transaction_details.merchant_txn_ref` | Merchant transaction reference ID. |
| `transaction_details.stored_payment_method_id` | Stored payment method identifier, when applicable. |

> [!NOTE]
>
> The example above represents a successful payment notification in the development environment using PayNow.
>
> Webhook fields and values may vary depending on the payment method, transaction type, and processing outcome.
>
> Merchants should validate incoming webhook notifications, confirm the transaction status, and handle duplicate notifications safely before fulfilling orders.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.