Merchant Webhooks

Preczn supports 3 webhook event subscriptions for merchant related events:

  • Created
  • Updated
  • Deleted

Each of these events has their own format based on the data that is available at the time of the update.

Merchant.Created

Merchant.created events are intended to notify when a merchant has been created. The information shared is limited to the merchant's ID, name, enable status ('active'), whether it's a test merchant, and details about who and when the merchant was created.

{
  "id": "what_test_6knw5fhtys9egrxtd6bt0txjhj",
  "webhookId": "wh_test_57vn6accfv9hrb5kqehv3k47tx",
  "eventType": "merchant.created",
  "data": {
    "merchantId": "mid_test_wsqgngrn99gptndb1h2s70dzj",
    "active": false,
    "merchantName": "Documentation Corp",
    "modifiedOn": "2024-01-29T20:01:12Z",
    "modifiedBy": "API Key: Default",
    "isTestMode": true
  }
}

Merchant.Updated

When a merchant is updated, Preczn sends the entirety of the merchant body in the data portion of merchant.updated events.

โš ๏ธ

Note:

The merchant object should match the same fields as those available in the GET Merchant API request. This should include all fields returned by the Merchant, Owners, Bank, and Connection objects associated with the parent merchant object.

Please be aware that webhooks are constructed separate from the Merchant API and can occasionally have slight differences; should you ever notice a difference between the Merchant API and the webhook, please contact support.

*The example below is of Jan 29 2024. New fields may be returned at time of review.

{
  "id": "what_test_4tbkqf1new9avsxe6mz85a5kfy",
  "webhookId": "wh_test_57vn6accfv9hrb5kqehv3k47tx",
  "eventType": "merchant.updated",
  "data": {
    "id": "mid_test_wsqgngrn99gptndb1h2s70dzj",
    "active": false,
    "plan": "",
    "name": "Documentation Corp",
    "legalName": "Documentation Corp LLC",
    "address": {
      "address": "Random Street 1",
      "address2": "Random Street 2",
      "city": "San Francisco",
      "region": "CA",
      "postal": "12345",
      "country": "USA"
    },
    "email": "[email protected]",
    "phone": "18175698900",
    "tin": "****6789",
    "tinType": "ein",
    "website": "https://www.domain.com",
    "mailingAddress": {
      "address": "Mailing Address 1",
      "address2": "Mailing Address 2",
      "city": "San Francisco",
      "region": "CA",
      "postal": "93000",
      "country": "USA"
    },
    "billingContact": {
      "address": "Billing Address 1",
      "address2": "Billing Address 2",
      "city": "San Francisco",
      "region": "CA",
      "postal": "93000",
      "country": "USA",
      "firstName": "Jack",
      "lastName": "Harbor",
      "email": "[email protected]",
      "phone": "18175698900"
    },
    "businessType": "corp",
    "publicCompany": false,
    "isBusinessAddress": true,
    "industry": "7371",
    "stateIncorporated": "CA",
    "countryIncorporated": "USA",
    "dateEstablished": "1990-10-22",
    "customerServicePhone": "18175698900",
    "productServiceDescription": "Api Product service description",
    "mcc": "7372",
    "annualSaleVolume": 20000,
    "averageTicket": 3000,
    "shipToDays": 7,
    "owners": [
      {
        "firstName": "John",
        "middleName": "",
        "lastName": "Doe",
        "email": "[email protected]",
        "phone": "13133204043",
        "address": {
          "address": "Owner Address 1",
          "address2": "Owner Address 2",
          "city": "Vancouver",
          "region": "BC",
          "postal": "A1A1A1",
          "country": "CAN"
        },
        "id": "midOwn_test_5n13b89qj89w2bckk53p50sk7h",
        "businessTitle": "CEO",
        "citizenshipCountry": "CAN",
        "dob": "1986****",
        "ssn": "********",
        "ownershipPercent": 100,
        "type": "Owner",
        "politicallyExposed": false,
        "primaryRepresentative": true,
        "driversLicenseNumber": "****6789",
        "driversLicenseState": "BC",
        "driversLicenseExpiration": "2006-01-01",
        "significantResponsibility": false,
        "connectionID": {}
      }
    ],
    "banking": [
      {
        "id": "midBank_test_33892pgvpg9nr9tnkx448vek5c",
        "accountName": "First Regional Bank",
        "accountType": "personalChecking",
        "routing": "****3004",
        "account": "****6667",
        "primaryAccount": true,
        "nameOnAccount": "Merchant Name LLC",
        "connectionID": {}
      }
    ],
    "connections": [
      {
        "id": "midCon_test_2sga5q5zxd8qnsha0zvqdg0vyh",
        "status": "Requirements",
        "processor": "StripeConnect",
        "missingRequiredData": [
          "connectionspecificRequirements.tosDate",
          "connectionspecificRequirements.tosIp"
        ]
      },
      {
        "id": "midCon_test_3cv1q7vm6k8gftc8hyb3hrq6zq",
        "status": "Unconfigured",
        "processor": "AffiniPay"
      },
      {
        "id": "midCon_test_5a10pwbnk48g9thr2qy2xh33p4",
        "status": "Requirements",
        "processor": "Greensky"
      },
      {
        "id": "midCon_test_6k9k4fh3ta8y6bp3bt113ze44q",
        "status": "Ready",
        "processor": "Payrix",
        "missingRequiredData": [],
        "connectionspecificRequirements": {
          "tosDate": "2023-12-12",
          "tosIp": "73.33.94.202",
          "tosVersion": "12345",
          "signingContact": {}
        },
        "actionDescription": "Sample Message",
        "actionRequired": true,
        "actionDescriptionReviewed": false
      },
      {
        "id": "midCon_test_2y2e6bar6d92avz507wgzez3qn",
        "status": "Unconfigured",
        "processor": "NelNet"
      }
    ]
  }
}

Merchant Deleted

Merchant.deleted events are triggered when a merchant record is deleted, either through API request or by a user in the dashboard.

Merchant.deleted events provide similar data to Merchant.created, including the merchant's ID, name, whether it's a test merchant, and details about who and when the merchant was created.

{
  "id": "what_test_57yhfep4hp89zrcbdavgy5wq20",
  "webhookId": "wh_test_57vn6accfv9hrb5kqehv3k47tx",
  "eventType": "merchant.deleted",
  "data": {
    "merchantId": "mid_test_3r6j69gwvm81gapafn6c0dtmg2",
    "merchantName": "Test Plan",
    "modifiedOn": "2024-01-29T20:08:44Z",
    "modifiedBy": "User:[email protected]",
    "isTestMode": true
  }
}