Discussions

Ask a Question
ANSWERED

Webhook and Source's Callback URLs

Do I need to implement Webhook for GCash/GrabPay if I am using the Source Callback URLs?
ANSWERED

Lessen Customers hassle by supporting query parameter string in Paymongo Link

We have an ecommerce that integrates paymongo Link. Most of our customer are frustrated that they have to input their info again in paymongo link. Is there a way we could just pass a data on URL. Like sample below <https://pm.link/PCWorth/NoXxXhL?first_name=john&last_name=doe>
ANSWERED

Invalid Payload Format when creating Payment Intents

I am trying to create a payment intent using the api reference guide but the response I am getting is status code 400 with error details {"errors":[{"code":"invalid_payload_format","detail":"attributes cannot be blank."}]} I based my payload on the api guide, here is the payload const paymentIntentData = { attributes: { amount: totalAmount, payment_method_allowed: ['card'], payment_method_options: {card: { request_three_d_secure: 'any' } }, currency: 'PHP', description: 'GoBigas', statement_descriptor: 'GoBigas', metadata: { 'data': 'data'} } } const paymentIntentOptions = { headers: { 'Content-Type': 'application/json', Authorization: `Basic ${window.btoa(apiKey)}` }, } const paymentIntent = await axios.post('https://api.paymongo.com/v1/payment_intents', paymentIntentData, paymentIntentOptions);
ANSWERED

Cannot retrieve webhook data

Hi, why is that I cannot dump the posted data on my webhook? Is there any request header or parameter needed? Aside from, of course. the authorization using secret kay. Thanks!
ANSWERED
ANSWERED
ANSWERED

webhook signature error

Hello, I'm trying the webhook in paymongo by using the spatie/laravel-webhook-client but unfortunately i got the error of signature exception. I did generate the secret_key. by the way I used ngrok to public my link. Below is the error log: [2020-11-01 11:48:39] local.ERROR: The signature is invalid. {"exception":"[object] (Spatie\\WebhookClient\\Exceptions\\WebhookFailed(code: 0): The signature is invalid. at F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\spatie\\laravel-webhook-client\\src\\Exceptions\\WebhookFailed.php:11) [stacktrace] #0 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\spatie\\laravel-webhook-client\\src\\WebhookProcessor.php(44): Spatie\\WebhookClient\\Exceptions\\WebhookFailed::invalidSignature() #1 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\spatie\\laravel-webhook-client\\src\\WebhookProcessor.php(26): Spatie\\WebhookClient\\WebhookProcessor->ensureValidSignature() #2 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\spatie\\laravel-webhook-client\\src\\WebhookController.php(11): Spatie\\WebhookClient\\WebhookProcessor->process() #3 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(48): Spatie\\WebhookClient\\WebhookController->__invoke(Object(Illuminate\\Http\\Request), Object(Spatie\\WebhookClient\\WebhookConfig)) #4 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(255): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Spatie\\WebhookClient\\WebhookController), '__invoke') #5 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(197): Illuminate\\Routing\\Route->runController() #6 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(691): Illuminate\\Routing\\Route->run() #7 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request)) #8 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #9 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #10 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken.php(77): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #11 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #12 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\View\\Middleware\\ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #13 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #14 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #15 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Session\\Middleware\\StartSession.php(63): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure)) #16 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #17 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #18 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #19 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #20 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #21 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #22 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(693): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #23 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(668): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request)) #24 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(634): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route)) #25 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(623): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request)) #26 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(166): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request)) #27 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request)) #28 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #29 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #30 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #31 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #32 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #33 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #34 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php(87): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #35 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #36 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\fruitcake\\laravel-cors\\src\\HandleCors.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #37 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fruitcake\\Cors\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #38 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\fideloper\\proxy\\src\\TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #39 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) #40 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) #41 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #42 F:\\xampp\\htdocs\\RESTfulAPI\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) #43 F:\\xampp\\htdocs\\RESTfulAPI\\public\\index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
ANSWERED

sample code

Hi! Most of your examples are js and php. Do you have a sample code written in c# or angular? or a postman version of it? Thanks
ANSWERED
ANSWERED

Cannot Create Webhook | Error: secret_key_required

Just want to ask why I can't create a webhook. It's keeps on giving me this error response: { "errors": [ { "code": "secret_key_required", "detail": "Please use your secret key to access this resource. Go to https://developers.paymongo.com/docs/authentication to know more about our API authentication." } ] } NOTE: I have already successfully create "Sources" and "Payments" using my API keys and Auths are valid. But when using the same when creating a webhook, the error above persists.