Skip to main content

Webhook Event Subscriptions

Webhooks serve as a mechanism for status updates on Stitch payments. These are asynchronous updates, meaning that these notifications are sent by Stitch, to your platform (on a specified HTTPS URL endpoint), separately from the in-line requesting and processing of a payment on your platform.

This is an important aspect required to incorporate into your integration that provides the following:

  • Status updates as soon as the status of a particular payment is updated at Stitch. This avoids the need to build in resource-intensive polling, or be concerned of missing a status change in certain scenarios e.g. if a user is unable to redirect to you after a payment due to a network fault.
  • Secure notifications by means of signature-verified messages. When integrating, you are able to verify whether the message came from Stitch, to ensure its legitimacy.
  • Reliable updates by means of an exponential retry mechanism. Should you have any temporary issues on your server, webhooks will be retried multiple times (within a period), until they are successfully received.

Webhooks can be used for all payment types that Stitch supports. Svix is our trusted third-party that delivers our webhooks securely and reliably.

A typical webhook use-case flow is illustrated below (with payment requests):

sequenceDiagram participant User participant Client Application participant Svix participant Stitch critical Once-off, per payment type Client Application ->> Svix: Create webhook subscription end critical Per payment (in-line payment) Client Application ->> User: Redirect user to payment request User ->> Stitch: Make payment Stitch ->> User: Confirm successful payment User ->> Client Application: Redirect back to client par Webhook processing Stitch --) Svix: Expedite Completed status webhook Svix --) Client Application: Deliver webhook to client Client Application --) Client Application: Process webhook notification <br/> (after signature-verifying) Client Application --) Svix: Acknowledge webhook successfully received end Client Application ->> User: Confirm successful payment for order/deposit <br/> (following processed webhook status) end