Event

trigger.paypal_event
TriggerBusiness appsconnection requiredruns in-engine

Registers a webhook in the tenant's PayPal app on publish and starts one run per delivered event, verified against PayPal's RSA signature.

Start a run when PayPal raises an event — a capture completing, a subscription changing, an invoice being paid, a dispute opening.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
PayPal
Secret shape
{"client_id", "client_secret"}
Config it needs
environment
Resolved by
config.connection_id, else node.connection_id
Note
The same app credentials the other PayPal nodes use; the webhook is created with a client-credentials token minted from them. Publishing needs MANTLE_APP_PUBLIC_BASE_URL set to an https URL PayPal can reach — PayPal only delivers to https on port 443.

Configuration

1 field, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
event_types
PayPal event names to subscribe to. Any valid name is accepted, not only the ones listed; "*" subscribes to every event, including ones PayPal adds later (noisy — each one starts a run).
arrayNo["PAYMENT.CAPTURE.COMPLETED"]1–500 characters; array of string—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "event_types": [
    "PAYMENT.CAPTURE.COMPLETED"
  ]
}

Output

One shape.

paypal event

The flattened PayPal event. `resource`'s own keys vary by resource_type, so the shape is open below the declared fields.

Extra keys beyond the ones listed can appear.

FieldTypeExample
id
PayPal's event id (WH-…). Also the idempotency key: PayPal retries a failed delivery over about three days and reuses this id, so a retry joins the run it already started instead of starting a second. The ingress remembers a key for 24 hours, so a retry that lands later can still start a fresh run.
stringWH-2WR32451HC0233532-67976317FL4543714
event_type
The event name, e.g. PAYMENT.CAPTURE.COMPLETED. Branch on this when the trigger subscribes to more than one.
stringPAYMENT.CAPTURE.COMPLETED
event_version
Version of the event envelope PayPal sent.
string1.0
create_time
When PayPal raised the event (ISO 8601, UTC).
string2024-05-16T05:19:23.000Z
summary
PayPal's own one-line description of the event, meant for a human.
stringPayment completed for $ 42.00 USD
resource_type
What the event is about — capture, sale, subscription, invoice, dispute…
stringcapture
resource_version
Version of the resource representation inside `resource`.
string2.0
resource_id
Id of the object the event is about, lifted out of resource.id so the next node need not dig — the capture id, subscription id, invoice id…
string8MC585209K746392H
resource
PayPal's own resource body. Its keys depend on resource_type, which is why this shape is open.
object—
payload
The event envelope exactly as PayPal sent it, including `links`, for anything the fields above do not lift out.
object—
{
  "create_time": "2024-05-16T05:19:23.000Z",
  "event_type": "PAYMENT.CAPTURE.COMPLETED",
  "event_version": "1.0",
  "id": "WH-2WR32451HC0233532-67976317FL4543714",
  "payload": {
    "event_version": "1.0",
    "id": "WH-2WR32451HC0233532-67976317FL4543714"
  },
  "resource": {
    "amount": {
      "currency_code": "USD",
      "value": "42.00"
    },
    "custom_id": "order-1041",
    "final_capture": true,
    "id": "8MC585209K746392H",
    "status": "COMPLETED"
  },
  "resource_id": "8MC585209K746392H",
  "resource_type": "capture",
  "resource_version": "2.0",
  "summary": "Payment completed for $ 42.00 USD"
}

Notes

  • Publishing creates the webhook in PayPal; unpublishing, disabling or archiving deletes it. A workflow that is off is off at PayPal too.
  • Every delivery is verified offline against PayPal's SHA256withRSA signature over 'transmissionId|timeStamp|webhookId|crc32(body)', using the certificate at paypal-cert-url — which is only trusted from a paypal.com host, over verified TLS.
  • One run per event, idempotent on PayPal's event id, so a redelivery cannot start a second run.
  • Sandbox and live are different apps: a sandbox connection registers a webhook that only ever receives sandbox events.

See Event run in a workflow.

In a technical demo we add the PayPal connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.