Webhooks

DeveloperBask app

About Webhooks

Two dozen event types pushed to your endpoint the moment state changes, with granular codes like sent_to_pharmacy and rx_denied.

What you can do with Webhooks

  • Bask sends a JSON message to a URL you own when an event happens. Each webhook subscribes to exactly one event type, so create one webhook for each event you want.
  • Patients: New Patient and Profile Updated. Orders: New Order, Order Updated and Order Shipped. Treatments: New Treatment, Treatment Updated, Treatment Canceled and Check-in Due. Prescribing: New Prescription.
  • Subscriptions: Subscription Created and Subscription Updated. Payments: Payment Created, Succeeded, Failed, Canceled and Refunded. Disputes: Dispute Created and Dispute Updated.
  • Other: Chat Message, Questionnaire Updated, Abandoned Session, Magic Link and New Affiliate Conversion.
  • The body is a JSON object with the event type and its data. Bask sends it as POST or PUT, with any headers you configure.

Set up Webhooks

  1. Open Apps, then Webhooks in your Bask sidebar and choose Add new.
  2. Name the webhook and pick the one event it should send.
  3. Enter your endpoint URL. It must start with http:// or https://.
  4. Choose POST or PUT, set the status to Active and add any headers your endpoint needs.
  5. If your endpoint needs a token that expires, turn on Access Token Request so Bask fetches one first.
  6. Save, then use Actions, then Test on the active row to send sample data to your endpoint.

Good to know

  • These webhooks do not add a signature header. Authenticate deliveries with a secret header that you set yourself.
  • Each attempt waits up to one minute for your endpoint. Bask can retry a failed delivery, so build your endpoint to handle the same event twice.
  • If a webhook has at least 10 initial attempts in 24 hours and more than half fail, Bask sets it to inactive and notifies the store. Fix the endpoint and activate it again.
  • Order Shipped fires only when the pharmacy ships the order. New Order fires when Bask creates it, and Order Updated covers later changes, including cancellation and refund.

Who it is for

Written for a developer who sends Bask events to another system. If you do not write code, hand it to your developer.

How it installs

Added to your subscription