PayMongo

PayMongo API Reference

Welcome to the PayMongo developer hub. You'll find comprehensive guides and documentation to help you start working with PayMongo as quickly as possible, as well as support if you get stuck. Let's jump right in!

API Reference    

Questions

Ask A Question
1

Need help in generating webhook signature from source.chargeable event request

Header received in a request... "Paymongo-Signature": "t=1620901532,te=0c6fcee4abf200e6b8858c2b6fc5f773c3920e1087f9cb4c4d67d4c7212dbe7d,li=", payload received: "body": "{\"data\":{\"id\":\"evt_kVBbtHrJcsHSNC2oAKoGcjsL\",\"type\":\"event\",\"attributes\":{\"type\":\"source.chargeable\",\"livemode\":false,\"data\":{\"id\":\"src_MGZPYvicoDMSQrv7tbn7tGjR\",\"type\":\"source\",\"attributes\":{\"amount\":15500,\"billing\":{\"address\":{\"city\":\"Bengaluru\",\"country\":null,\"line1\":\"\",\"line2\":\"Marine Drive, Benga\",\"postal_code\":null,\"state\":\"Karnataka\"},\"email\":\"[email protected]\",\"name\":\"Shashi Kant\",\"phone\":\"6203362289\"},\"currency\":\"PHP\",\"livemode\":false,\"redirect\":{\"checkout_url\":\"https://test-sources.paymongo.com/sources?id=src_MGZPYvicoDMSQrv7tbn7tGjR\",\"failed\":\"http://localhost:3000/checkout\",\"success\":\"http://localhost:3000/checkout\"},\"status\":\"chargeable\",\"type\":\"grab_pay\",\"created_at\":1620901511,\"updated_at\":1620901514}},\"previous_data\":{},\"created_at\":1620901514,\"updated_at\":1620901514}}}", trying to create a signature sign = "1620901532.{\"data\":{\"id\":\"evt_kVBbtHrJcsHSNC2oAKoGcjsL\",\"type\":\"event\",\"attributes\":{\"type\":\"source.chargeable\",\"livemode\":false,\"data\":{\"id\":\"src_MGZPYvicoDMSQrv7tbn7tGjR\",\"type\":\"source\",\"attributes\":{\"amount\":15500,\"billing\":{\"address\":{\"city\":\"Bengaluru\",\"country\":null,\"line1\":\"\",\"line2\":\"Marine Drive, Benga\",\"postal_code\":null,\"state\":\"Karnataka\"},\"email\":\"[email protected]\",\"name\":\"Shashi Kant\",\"phone\":\"6203362289\"},\"currency\":\"PHP\",\"livemode\":false,\"redirect\":{\"checkout_url\":\"https://test-sources.paymongo.com/sources?id=src_MGZPYvicoDMSQrv7tbn7tGjR\",\"failed\":\"http://localhost:3000/checkout\",\"success\":\"http://localhost:3000/checkout\"},\"status\":\"chargeable\",\"type\":\"grab_pay\",\"created_at\":1620901511,\"updated_at\":1620901514}},\"previous_data\":{},\"created_at\":1620901514,\"updated_at\":1620901514}}} after running this with sha256 hash function the test-part in the paymongo-signature header does not match? Need help as to what is the action raw json payload of the api request

Posted by Shashi Kant 2 months ago