Skip to main content

Organization Webhooks

Riseact calls your endpoint when something happens in an organization: a supporter created, a checkout paid and so on.

Organization webhooks receive only the events of one organization. For a partner app that needs the events of every organization that installed it, use the application webhooks.

Setting up a webhook​

They are managed on the detail page of a private application; access to application management is enough.

  1. Go to Settings > Apps > Private applications and open (or create) the application.
  2. In the Webhook section, Organization webhooks card, click Add webhook.
  3. Choose the events and enter the HTTPS URL that will receive the POST calls.
  4. Click Save.

From the card you can edit or delete the registered webhooks. They apply to the whole organization, whichever private application created them.

Available events​

EventDescription
supporter.createdA new supporter has been created
supporter.updatedA supporter has been updated
supporter.deletedA supporter has been deleted
checkout.createdA new checkout has been opened
checkout.updatedA checkout has been updated
checkout.paidA checkout has been completed with payment
checkout.closedA checkout has been closed
donation.createdA new donation has been created
donation.updatedA donation has been updated
donation.deletedA donation has been deleted
donation.revokedA donation has been revoked: by hand, by the refund of its last payment, or by the failed payment of a one-off donation
payment.createdA new payment has been recorded
payment.updatedA payment has been updated
campaign.createdA new campaign has been created
campaign.updatedA campaign has been updated
campaign.deletedA campaign has been deleted

Delivery of the calls​

Riseact sends a JSON POST to the registered URL. The payload contains:

  • organization: the domain of the organization;
  • event: the topic, for example donation.created;
  • object: the object of the event;
  • idempotency_key: identifier of the call. The same key can arrive more than once: use it to deduplicate.

The timeout is 10 seconds: respond immediately with 2xx and do heavy work asynchronously.

If the answer is not 2xx, or does not arrive within the timeout, Riseact retries the delivery after 1 minute, 10 minutes, 1 hour, 6 hours and 24 hours, with the same payload and the same idempotency_key. A retried call may therefore arrive after newer events for the same object: compare update_date with the one you stored and drop outdated payloads.

Webhooks an app registers through the API, with its own token, are signed with the app's client secret, in the same format as application webhooks. Webhooks created from the admin are not signed: to verify their origin, use a secret path or a token in the query string of the URL.

If the private app has a URL set it also gets the uninstall call.

Request details​

Supporter webhooks​

{
"organization": "your-org-domain",
"object": {
"id": 75835,
"create_date": "2023-08-17T16:10:45.354192+00:00",
"update_date": "2023-08-17T16:10:45.367332+00:00",
"image": "",
"business_name": null,
"first_name": "first name",
"last_name": "last name",
"supporter_type": "INDIVIDUAL",
"email": "test@email.com",
"phone": "phone",
"mobile": "mobile",
"sex": "MALE",
"date_of_birth": "1970-01-01",
"place_of_birth": "Place of birth",
"ssn": "ssn",
"vat": "vat",
"address": "address",
"address2": "secondary address",
"city": "city",
"locality": "locality",
"country": "IT",
"postal_code": "code",
"certification_url": null,
"privacy": false,
"email_marketing": false,
"phone_marketing": false,
"sms_marketing": false,
"postal_marketing": false,
"profilation_marketing": false,
"note": "notes",
"tags": [],
"external_ref": null,
"source_campaign": null,
"organization": 33,
"application": 1,
"stripe_customer_id": null
},
"event": "supporter.created",
"idempotency_key": "b1e0c9a2-4f3d-4e2a-9c1b-6a7f8d0e2c34"
}

Checkout webhooks​

{
"organization": "your-org-domain",
"object": {
"id": 901,
"create_date": "2023-08-17T16:15:52.746141+00:00",
"update_date": "2023-08-17T16:15:52.746165+00:00",
"state": "OPEN",
"amount": 10,
"completed_date": null,
"donation": null,
"supporter": 75835,
"frequency": null,
"peer_campaign": null
},
"event": "checkout.created",
"idempotency_key": "b1e0c9a2-4f3d-4e2a-9c1b-6a7f8d0e2c34"
}

Payment webhooks​

{
"organization": "your-org-domain",
"object": {
"id": 230,
"create_date": "2023-08-17T16:27:04.647182+00:00",
"update_date": "2023-08-17T16:27:04.647204+00:00",
"state": "PAID",
"amount": 10,
"payment_date": "2023-08-17T16:26:59.889000+00:00",
"payment_method": "MANUAL",
"donation": 229,
"supporter": 75835,
"frequency": 0,
"peer_campaign": null
},
"event": "payment.created",
"idempotency_key": "b1e0c9a2-4f3d-4e2a-9c1b-6a7f8d0e2c34"
}

Donation webhooks​

{
"organization": "your-org-domain",
"object": {
"id": 229,
"create_date": "2023-08-17T16:27:04.542168+00:00",
"update_date": "2023-08-17T16:27:04.542168+00:00",
"code": "#1000",
"state": "pending",
"amount": 10,
"frequency": 0,
"completed_date": null,
"campaign": 29,
"peer_campaign": null,
"supporter": 75835,
"tags": [],
"payment_method": "MANUAL"
},
"event": "donation.created",
"idempotency_key": "b1e0c9a2-4f3d-4e2a-9c1b-6a7f8d0e2c34"
}