Docs
Sandbox > Webhooks

Webhook Simulator

This is a simulator for our webhook Service that allows our users in the development environment to emulate all different conditions any pix can take, both from Charge or Pay Service.

This is specifically useful also to adjust the authentication process as all these webhooks will come authenticated using the generic key that will be provided to you together with the credentials How it works?

Pick any webhook example from the documentation, you can edit the fields and post it to this endpoint. You will receive it in the specified URL authenticated by kamipay.

For instance, if you are testing CHARGE service, you will generate a QR Code and then you can self send the different status updates, like processing, done, failed without needing to make a real payment to that QR code.

Test webhook

const url = "baseURL/v1/emulator/push_webhook"
 
body = << YOUR CUSTOMIZED JSON >>
 
const response = await fetch(url, {
      method: "POST",
      headers: {
      Authorization: `Bearer ${access_token}`,
      "Content-Type": "application/json",
    },
      body: JSON.stringify(body),
})

Response samples

{
  "response": 200,
  "payload": <<YOUR CUSTOMIZED JSON>>
}