// Copyright 2026 MOIA GmbH syntax = "proto3"; package moia.trip.webhook.v1; import "google/protobuf/timestamp.proto"; option go_package = "./webhookv1"; option java_multiple_files = false; option java_outer_classname = "WebhookV1"; option java_package = "io.moia.protos.trip.webhook.v1"; // The request body of a webhook. message WebhookRequest { // A unique id that identifies this event. string id = 1; // The date and time when this event occurred (not the time when it was sent). // In JSON format, the timestamp is encoded as a string in the RFC 3339 (https://www.ietf.org/rfc/rfc3339.txt) format. // That is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" // where {year} is always expressed using four digits // while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. // The optional fractional seconds can go up to 9 digits (i.e., up to 1 nanosecond resolution). // Always uses UTC as timezone, as indicated by the "Z" suffix. // For example, "2017-01-15T01:30:15.01Z". google.protobuf.Timestamp timestamp = 2; // Version of the webhook specification, e.g., "1". string webhook_version = 3; // The main payload of the event. oneof data { // A refund was issued. RefundIssued refund_issued = 4; } } // This event signals that a refund has been issued. // Use `GetRefund` on the `RefundService` to request the details of the refund. message RefundIssued { // The ID of the refund. string refund_id = 1; // The ID of the customer who requested the refund. string customer_id = 2; }