Introduction
Get started with kamiPay webhooks
Use webhooks to notify your application about kamiPay events.
kamiPay uses webhooks to push real-time notifications to you about a payment receive. All webhooks use HTTPS and deliver a JSON payload that can be used by your application.
Steps to receive webhooks
You can start receiving real-time events in your app using the following steps:
1. Description
The Status Update webhook provides a way to receive events when changes occur in a payment within the system. Whenever a payment change event occurs, a notification will be sent to the client's URL with the content of the affected payment.
2. Delivery Method
The webhook sends events using the HTTP POST method.
3. Event Content
The event content will be a JSON message that includes the details of the payment affected by the change. The message will have the following format:
4. Authentication
The webhook uses message signature-based authentication to ensure the integrity and authenticity of the sent notifications. A secret key must be shared between the client and the provider to generate the message signature.
5. Client-Side Code Example
In your local application, create a new route that can accept POST requests.
For example, you can add an API route on Next.js:
Always validate the signature of incoming webhook requests to ensure they are authentic and sent by kamiPay.
Webhook Types
kamiPay provides two main types of webhooks to track different payment flows. The Charge webhook notifies you when a customer sends a Pix payment. The Pay webhook provides updates about outgoing payments made from your account to third parties. Select one of the options below for detailed specifications: