---
updatedAt: 2026-02-24T22:23:16.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/v2.4/llms.txt
---

# Vendors

## Overview

Vendor webhooks notify your application when vendor records change. Vendors are contributor-type users in Pelcro, typically representing freelancers, writers, or suppliers who receive payments (bills) from the publisher.

***

## Use Cases

* Sync vendor records to your accounting or ERP system
* Track vendor onboarding and offboarding
* Update internal directories when vendor profiles change
* Trigger workflows when new vendors are added

***

## Events

| Event                              | Description                    |
| ---------------------------------- | ------------------------------ |
| [`vendor.created`](#vendorcreated) | A new vendor was created       |
| [`vendor.updated`](#vendorupdated) | A vendor's profile was updated |
| [`vendor.deleted`](#vendordeleted) | A vendor was deleted           |

***

## vendor.created

### Triggered When

* A new vendor is created via the Core API (`POST /api/core/vendors`).

### Payload

```json
{
  "type": "vendor.created",
  "id": "evt_a1b2C3d4E5f6g7H8i9J0k1L2",
  "created": 1704067200,
  "data": {
    "object": {
      "object": "vendor",
      "id": 12345,
      "balance": 0,
      "created": "2024-01-01T00:00:00.000000Z",
      "currency": null,
      "dates": {
        "created_at": 1704067200,
        "updated_at": 1704067200
      },
      "default_source_id": null,
      "delinquent": false,
      "display_name": null,
      "email": "vendor@example.com",
      "email_confirm": null,
      "email_hardbounce": false,
      "first_name": "Jane",
      "has_password": 0,
      "language": null,
      "last_login_method": null,
      "last_name": "Doe",
      "mail_marketing": null,
      "metadata": null,
      "object_id": "cus_1a2B3c4D5e6F7g",
      "password_last_updated_at": null,
      "phone": "5551234567",
      "phone_confirm": null,
      "salutation": null,
      "tele_marketing": null,
      "title": null,
      "username": null
    }
  }
}
```

***

## vendor.updated

### Triggered When

* A vendor's profile is updated (e.g., name, email, phone) and the `UserObserver::updated()` method fires for a user of type `vendor`.
* Updates can come from the Core API (`PUT /api/core/vendors/{id}`) or any code path that updates the User model for a vendor-type user.

### Payload

```json
{
  "type": "vendor.updated",
  "id": "evt_b2C3d4E5f6g7H8i9J0k1L2m3",
  "created": 1704067200,
  "data": {
    "object": {
      "object": "vendor",
      "id": 12345,
      "balance": 0,
      "created": "2024-01-01T00:00:00.000000Z",
      "currency": null,
      "dates": {
        "created_at": 1704067200,
        "updated_at": 1704153600
      },
      "default_source_id": null,
      "delinquent": false,
      "display_name": null,
      "email": "vendor-new@example.com",
      "email_confirm": null,
      "email_hardbounce": false,
      "first_name": "Jane",
      "has_password": 0,
      "language": null,
      "last_login_method": null,
      "last_name": "Doe",
      "mail_marketing": null,
      "metadata": null,
      "object_id": "cus_1a2B3c4D5e6F7g",
      "password_last_updated_at": null,
      "phone": "5551234567",
      "phone_confirm": null,
      "salutation": null,
      "tele_marketing": null,
      "title": null,
      "username": null
    },
    "previous_attributes": {
      "email": "vendor-old@example.com"
    }
  }
}
```

### Previous Attributes

The `previous_attributes` object contains the field values **before** the update. Only fields that actually changed and are in the publishable set are included.

***

## vendor.deleted

### Triggered When

* A vendor is deleted via the Core API (`DELETE /api/core/vendors/{id}`).
* Deletion is blocked if the vendor has existing bills â€” a vendor with bills cannot be deleted.
* When deleted, the vendor record is removed and the underlying user is converted from vendor type to customer type.

### Payload

```json
{
  "type": "vendor.deleted",
  "id": "evt_c3D4e5F6g7H8i9J0k1L2m3N4",
  "created": 1704067200,
  "data": {
    "object": {
      "object": "vendor",
      "id": 12345,
      "balance": 0,
      "created": "2024-01-01T00:00:00.000000Z",
      "currency": null,
      "dates": {
        "created_at": 1704067200,
        "updated_at": 1704153600
      },
      "default_source_id": null,
      "delinquent": false,
      "display_name": null,
      "email": "vendor@example.com",
      "email_confirm": null,
      "email_hardbounce": false,
      "first_name": "Jane",
      "has_password": 0,
      "language": null,
      "last_login_method": null,
      "last_name": "Doe",
      "mail_marketing": null,
      "metadata": null,
      "object_id": "cus_1a2B3c4D5e6F7g",
      "password_last_updated_at": null,
      "phone": "5551234567",
      "phone_confirm": null,
      "salutation": null,
      "tele_marketing": null,
      "title": null,
      "username": null
    }
  }
}
```

***

## Payload Reference

### Vendor Object Fields

| Field                      | Type            | Description                                                          |
| -------------------------- | --------------- | -------------------------------------------------------------------- |
| `object`                   | string          | Always `"vendor"`                                                    |
| `id`                       | integer         | Pelcro user ID                                                       |
| `balance`                  | integer         | Account balance in cents                                             |
| `created`                  | string          | ISO 8601 creation timestamp                                          |
| `currency`                 | string \| null  | Three-letter currency code (e.g., `"usd"`)                           |
| `dates`                    | object          | Nested object with unix timestamps                                   |
| `dates.created_at`         | integer         | Unix timestamp of record creation                                    |
| `dates.updated_at`         | integer         | Unix timestamp of last update                                        |
| `default_source_id`        | integer \| null | Default payment source ID                                            |
| `delinquent`               | boolean         | Whether the vendor has past-due payments                             |
| `display_name`             | string \| null  | Display name                                                         |
| `email`                    | string          | Vendor email address                                                 |
| `email_confirm`            | boolean \| null | Whether email is confirmed                                           |
| `email_hardbounce`         | boolean         | Whether email has hard bounced                                       |
| `first_name`               | string          | First name                                                           |
| `has_password`             | integer         | `1` if vendor has a password, `0` otherwise                          |
| `language`                 | string \| null  | Preferred language code                                              |
| `last_login_method`        | string \| null  | Last login method: `"email"`, `"auth0"`, `"google"`, or `"facebook"` |
| `last_name`                | string          | Last name                                                            |
| `mail_marketing`           | boolean \| null | Mail marketing opt-in status                                         |
| `metadata`                 | object \| null  | Custom key-value metadata                                            |
| `object_id`                | string \| null  | Payment gateway customer ID (e.g., `"cus_..."`)                      |
| `password_last_updated_at` | string \| null  | Timestamp of last password change                                    |
| `phone`                    | string \| null  | Phone number                                                         |
| `phone_confirm`            | boolean \| null | Whether phone is confirmed                                           |
| `salutation`               | string \| null  | Salutation (e.g., `"Mr."`, `"Ms."`)                                  |
| `tele_marketing`           | boolean \| null | Telemarketing opt-in status                                          |
| `title`                    | string \| null  | Job title or professional title                                      |
| `username`                 | string \| null  | Username                                                             |

# Sibling pages

* [Email Templates](https://docs.pelcro.com/v2.4/docs/e-mail-templates-for-webhooks.md)
* [Addresses](https://docs.pelcro.com/v2.4/docs/webhooks-addresses.md)
* [Bills](https://docs.pelcro.com/v2.4/docs/webhooks-bills.md)
* [Campaigns](https://docs.pelcro.com/v2.4/docs/webhooks-campaigns.md)
* [Charges](https://docs.pelcro.com/v2.4/docs/webhooks-charges.md)
* [Customers](https://docs.pelcro.com/v2.4/docs/webhooks-customers.md)
* [Exports](https://docs.pelcro.com/v2.4/docs/webhooks-exports.md)
* [Fraud Prevention](https://docs.pelcro.com/v2.4/docs/webhooks-fraud-prevention.md)
* [Invoices](https://docs.pelcro.com/v2.4/docs/webhooks-invoices.md)
* [Members](https://docs.pelcro.com/v2.4/docs/webhooks-members.md)
* [Newsletters](https://docs.pelcro.com/v2.4/docs/webhooks-newsletters.md)
* [Orders](https://docs.pelcro.com/v2.4/docs/webhooks-orders.md)
* [Payment Methods](https://docs.pelcro.com/v2.4/docs/webhooks-payment-methods.md)
* [Plans](https://docs.pelcro.com/v2.4/docs/webhooks-plans.md)
* [Products](https://docs.pelcro.com/v2.4/docs/webhooks-products.md)
* [Subscriptions](https://docs.pelcro.com/v2.4/docs/webhooks-subscriptions.md)