Transaction Webhook

The transaction webhook is used to enable real-time notifications or callbacks regarding transaction-related activities.

Transaction.complete: This event is triggered when a transaction is completed from the payment gateway's side.

{
  "entity": "event",
  "user_id": "67a33080b06ceb81ad1a0962",
  "event": "transaction.complete",
  "contains": [
    "transaction",
    "user"
  ],
  "payload": {
    "transaction": {
      "_id": "67a33168b06ceb81ad1a0dbd",
      "status": "COMPLETE",
      "refundStatus": "NOT_INITIATED",
      "orderId": "order_PrywmVklvlzMsW",
      "clientReferenceId": "undefined",
      "amount": 120,
      "currency": "INR",
      "paymentGateway": "RAZORPAY",
      "paymentId": "pay_PryxM9rhzn90Wz",
      "paymentMode": "CARD",
      "createdAt": "2025-02-05T09:37:44.490Z",
      "updatedAt": "2025-02-05T09:37:44.532Z",
      "gatewaySubscriptionId": "sub_PrywkXYU04LWwI",
      "subscriptionDetail": []
    },
    "user": {
      "email": "[email protected]",
      "userId": "67a3307bb06ceb81ad1a0945",
      "externalUserId": "67a3307bb06ceb81ad1a0945",
      "address": {
        "apartment": "",
        "landmark": "",
        "city": "",
        "name": "asdf",
        "area": "asdf",
        "pincode": "1234",
        "state": "adsf",
        "country": "AX"
      },
      "name": "ayush",
      "billingAddress": [
        {
          "name": "asdf",
          "apartment": "",
          "area": "asdf",
          "pincode": "1234",
          "landmark": "",
          "city": "",
          "state": "adsf",
          "country": "AX",
          "_id": "67a3313db06ceb81ad1a0b35"
        }
      ],
      "shippingAddress": [
        {
          "name": "adsf",
          "apartment": "",
          "area": "sadf",
          "pincode": "5346576",
          "landmark": "",
          "city": "",
          "state": "asdd",
          "country": "HT",
          "_id": "67a3313db06ceb81ad1a0b36"
        }
      ],
      "dateOfBirth": null,
      "location": {}
    }
  },
  "client_info": {
    "deviceType": "desktop"
  },
  "created_at": 1738748264
}

Transaction.failed: This event is triggered when a transaction is failed from the payment gateway's side.

{
  "entity": "event",
  "user_id": "65e01719d03692125f1f323f",
  "event": "transaction.failed",
  "contains": [
    "transaction",
    "user"
  ],
  "payload": {
    "transaction": {
      "_id": "65e01723d03692125f1f3277",
      "status": "FAILED",
      "refundStatus": "NOT_INITIATED",
      "orderId": "",
      "amount": 1,
      "currency": "INR",
      "paymentGateway": "RAZORPAY",
      "paymentId": "",
      "paymentMode": "NETBANKING",
      "createdAt": "2024-02-29T05:33:23.365Z",
      "updatedAt": "2024-02-29T05:33:57.710Z",
      "partialAccess": true,
      "sectionsInclude": [
        "batting"
      ],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [
        "cricket"
      ],
      "tagsExclude": []
    },
    "user": {
      "phoneNumber": "8383884833",
      "email": "[email protected]",
      "userId": "65e01719d03692125f1f323f",
      "country": "IN",
      "address": {
        "apartment": "",
        "area": "",
        "pincode": "",
        "landmark": "",
        "city": "",
        "state": "",
        "country": ""
      },
      "name": "dfsxzc dvzxc",
      "city": "new delhi (okhla phase i)",
      "location": {
        "latitude": 28.5223,
        "longitude": 77.2849,
        "postcode": "110001"
      },
      "username": "8383884833"
    }
  },
  "client_info": {
    "userAgent": "axios/0.21.1",
    "country": "India",
    "countryCode": "IN",
    "deviceType": "desktop"
  },
  "created_at": 1709184837
}

Last updated