🔗Webhook Notification

Build an endpoint on your site that will receive transactions, this will allow us to notify you when we accept new payments

Please consider: In the project configuration add and validate the Webhook.

Through this request we will send notifications about the change of status of your payments and transactions made

We will ma

Webhook example

We will make a POST request with the data statusId, invoiceNumber, quantityPay and wait for a 200 or 201 response to validate it

public async webhook ({ request, response }: HttpContextContract) {
        const { statusId, invoiceNumber, quantityPay } = request.all()

        let cart = await Cart.find(invoiceNumber)

        if(statusId == 4){
            // Your logical here
        }

        return response.status(200).json('Success')
}

Last updated