Partial.ly
Back to home

Webhooks

Overview

Webhooks are a way to customize your software with real-time updates from Partially. Partially can send details to any URL you specify when specific events occur, such as a payment plan being opened, a payment succeeding, or a payment failing.

Webhooks post a JSON-formatted document to your URL. To verify that the webhook is coming from Partially and that the data hasn't been tampered with, Partially adds a Partially-Signature header to the request. The value of this header is the SHA-256 HMAC of the posted body, using your API key as the secret key. Your API key can be found in your Partially merchant portal under Settings > General.

Configuring Webhooks

To add a webhook, log into the Partially merchant portal, click Settings, then Webhooks.

You can test your webhook by sending fake events using the webhook testing tool — click the Test webhooks link on the webhook settings page. This sends a test webhook to the URL you provide and displays the request and response bodies.

Webhook Format

All webhooks include the following keys:

  • event — the type of event
  • id — the id of the event
  • data — data specific to the event

The following events are currently supported:

  • plan_opened — sent when a new payment plan is opened
  • payment_succeeded — sent when a scheduled payment is successful
  • payment_failed — sent when a scheduled payment fails
  • plan_paid — sent when a payment plan is fully paid
  • plan_defaulted — sent when a payment plan defaults due to 3 consecutive failed payments
  • plan_canceled — sent when a payment plan is canceled
  • refund_created — sent when a new refund is created
  • dispute_created — sent when a new dispute is created
  • dispute_closed — sent when a dispute is won or lost
  • checkout_abandoned — sent when a Partially checkout is abandoned, as defined by configuration settings
  • checkout_plan_deleted — sent when a payment plan that was never opened (still in checkout status) is deleted, two weeks after it was created. The payment plan no longer exists, so the payload contains a copy of it from just before it was deleted, which you can use to remove any references to it

For full details on working with webhooks, see the webhook developer documentation.