Discussions

Ask a Question

Recurring Payment and Reusable Payment Method

Hi, regarding paymongo Payment Intent API. 1. Can I use the same Payment Method ID when I create a new Payment Intent? 2. How many times can I use the Payment Method ID for different Payment Intents? My use case for this is to ease customer payment experience for those who already bought from our store by giving them the ability to pay in one-click Another use case is for Recurring payments
ANSWERED

React Native Supported

Is Paymongo supported by React-Native, specifically for accepting gcash and credit card payments? Thank you!
ANSWERED
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

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

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
ANSWERED
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);