Webhooks
What Preczn webhooks are, and the tasks to set them up.
Webhooks let Preczn notify your system when something changes, such as a transaction is approved, a merchant record is updated, or a merchant completes a boarding form. You don't have to poll the API to find out.
Use webhooks to learn what changed, and use the API to read detail and to reconcile your stored state after a gap. Polling grows with the number of records you re-read, and some changes, such as a boarding form that a merchant starts or lets expire, are impractical to catch by polling.
The following diagram shows where each piece sits:
flowchart LR
A["<img src='https://files.readme.io/cf81688a760902dd88bc091cf29030cb150243a4dfad5e5fa2044ddb12dabb5e-Preczn_logo_white.png' width='110' /><br/>An event happens in Preczn"] --> B["Preczn sends a signed POST"]
B --> C["Your endpoint verifies and acknowledges"]
C --> D["Your system processes the change"]
classDef preczn fill:#4013be,stroke:#300e90,color:#ffffff
classDef platform fill:#2563eb,stroke:#1d4ed8,color:#ffffff
classDef done fill:#059669,stroke:#047857,color:#ffffff
class A,B preczn
class C platform
class D done
Key concepts
Subscription
One endpoint URL and the events it receives. You create subscriptions in the Dashboard or through the API, and both manage the same subscriptions.
Mode
Each subscription belongs to Live mode or Test mode and receives only that mode's events. See Live vs. test mode.
Signed notification
Preczn sends each notification as an HTTP POST with a JSON body, signed with the subscription's own signing secret. Your endpoint checks the signature to confirm the notification came from Preczn.
Set up webhooks
Complete these tasks in order:
- Create a subscription for your endpoint and the events you want. See Subscribe to webhooks.
- Build the endpoint that verifies and acknowledges each notification. See Receive and verify webhooks.
- Learn what Preczn retries, when it disables a subscription, and how to recover. See Webhook delivery, retries, and failures.
- Choose your events and find each event's payload. See Webhook events.
Updated 11 days ago
