Consultation Payment Paid By Affiliate

Fires when a consultation fee is billed to the affiliate. targetEntity is the Order. Category: PAYMENT. The eventType is consultation-billed-to-affiliate.

Field guarantees

FieldGuarantee
eventData.amount✅ Always present (v1)
total_value_cents in v2✅ Always present (renamed from amount; value not converted — see caveat below)

v1 payload (legacy)

ownerEntity/targetEntity are the full patient/order documents; abbreviated here.

{
  "ownerEntityModel": "Patient",
  "targetEntityModel": "Order",
  "deleted": false,
  "ownerEntity": { "id": "pat::6ff464cc-xxxx-xxxx-xxxx-17d166c70c4c", "firstName": "<PATIENT_FIRST_NAME>", "lastName": "<PATIENT_LAST_NAME>", "…": "full patient document" },
  "targetEntity": { "id": "order::7ddcc469-xxxx-xxxx-xxxx-1c267042b5ed", "status": "completed", "…": "full order" },
  "eventTitle": "The consultation fee was charged.",
  "eventType": "consultation-billed-to-affiliate",
  "eventData": {
    "amount": 45
  },
  "createdAt": "2022-10-24T22:58:43.725Z",
  "updatedAt": "2022-10-24T23:00:43.175Z",
  "__v": 0,
  "id": "event::167fb14e-xxxx-xxxx-xxxx-5d0eed96e27f"
}
eventData fieldTypeAlways?Notes
amountnumberConsultation fee (dollars in v1)

v2 payload

Sanitized envelope. amount is renamed to total_value_cents — the value is passed through unchanged, not multiplied by 100. Since v1 amount is in dollars, the v2 field carries a dollar figure despite its _cents name (e.g. 45, not 4500). The order reference resolves from the target order.

⚠️

Unit mismatch. total_value_cents on this event is the raw amount value (dollars), not cents. Don't assume /100. This is a platform quirk of the consultation-billing events specifically — the ecommerce/subscription events do emit true cents.

{
  "event_type": "consultation-billed-to-affiliate",
  "event_id": "event::167fb14e-xxxx-xxxx-xxxx-5d0eed96e27f",
  "api_version": "2026-08-09",
  "timestamp": "2026-05-30T14:00:00.000Z",
  "affiliate_id": "aff::43744ce4-xxxx-xxxx-xxxx-5e4a2a8e39b2",
  "patient_id": "pat::6ff464cc-xxxx-xxxx-xxxx-17d166c70c4c",
  "patient_external_id": "ext-patient-123",
  "patient_marketing_consent": false,
  "is_returning_patient": true,
  "order_id": "order::7ddcc469-xxxx-xxxx-xxxx-1c267042b5ed",
  "total_value_cents": 45
}
FieldDelivered in v2Notes
Envelope + patient identity
total_value_centsRenamed from eventData.amount, value unchanged — a dollar figure, not cents (see caveat above)
order_idFrom the target order