Discussions

Ask a Question
Back to All

No webhook received using live mode or endpoint not triggered

Good day, we're creating a website that uses Paymongo pages. When we test using Postman, it works, but when we try to pay in live mode using Paymongo pages, we don't receive the webhook or trigger our endpoint. Are there any steps to determine the problem?; how to know if paymongo has already sent the webhook?

--WEBHOOK
{
"id": "hook_bAjbS7B*****",
"type": "webhook",
"attributes": {
"livemode": true,
"secret_key": "whsk_PCG9vd******",
"status": "enabled",
"url": "our url is accessible in public ,
"events": [
"source.chargeable"
],
"created_at": 1681739205,
"updated_at": 1681739205
}
}

--ENDPOINT

        [AllowAnonymous]  
        [HttpPost, Route("paymongo-data")]  
        public async Task<IActionResult> Paymongo(string json)  
        {  
           var rawData = await _userSvc.RawData(json);

            PaymongoData data = JsonConvert.DeserializeObject<PaymongoData>(json);
            var response = await _userSvc.PaymongoProcess1(data);

            if (response.Success)
            {
                return Ok(response);
            }
            else
            {
                return BadRequest();
            }
        }

Thanks,