Discussions

Ask a Question

Error: Do not use the secret key in the browser

I am trying to apply paymongo api on my ionic application. I am using plugin of <https://paymongo.paolotiu.com/>. Create Payment Method and Retrieve Payment Method was successful and running Create Payment Intent was successful but retrieving always got an error. Error using public key - Error: Request failed with status code 404 Error if I user secret key - Error: Do not use the secret key in the browser I always got this error when I use secret key
ANSWERED

Inquiry Regarding Testing Environment for Paymongo Integration

I am currently in the process of developing an application that integrates with payment gateways, and I am interested in using Paymongo's services. Before proceeding with the integration, I wanted to confirm if there is a sandbox or testing environment available where I can simulate transactions and test the functionality of the integration without using actual funds. Could you kindly provide information regarding the availability of such a testing environment? This would greatly assist me in ensuring the smooth and accurate integration of Paymongo's services into my application. Thank you!

Checkout Api

Hi! Good Day! Is there a way for us developers to remove or hide the redirect back to the merchant button after payment success?
ANSWERED

How to simulate "payment.failed" in webhook api?

I've been configuring the webhook api, however I only managed to call source.chargeable and payment.paid. Is there a way to simulate payment.failed?
ANSWERED

How to get the customer input from custom field added to Paymongo Pages?

Hi, Upon successful payment by the customer on Paymongo Pages, the associated endpoint (webhook) received a request body containing the payment details. However, it came to my attention that the customer input provided in the custom field, which I added to Paymongo Pages, was not included in the received request body. Nevertheless, I have observed that the said customer input is visible in Paymongo Payments Dashboard. I would greatly appreciate your guidance on the possibility of obtaining the aforementioned customer data within the request body received from the webhook. Thank you for your attention to this matter. I am looking forward to your assistance and support.
ANSWERED

Can I create a checkout session with capture_type as manual?

I would like to take advantage of the pre-built checkout page to pre-authorize a payment prior to reserving an item in my inventory for the customer. If the item is available and the pre-auth is successful, I would capture the payment intent. If not, then I would expire the checkout session/cancel the payment intent. As an example, Stripe supports this by allowing the developer to nest a `payment_intent_data` object within the `checkout_session` resource object when creating a checkout session. Is this currently possible? or is there another recommended way of achieving this? Thanks in advance :)
ANSWERED

How to create a redirection to the website after successful payment has been done

1. After clicking 'Pay Now' button the customer will be redirected to paymongo 2. Once, all information asked is supplied. The payment will be processed as expected. 3. In my scenario, it will remain with the paymongo and ask that the window can be closed instead of redirecting it back to Customer Dashboard
ANSWERED

attributes cannot be blank

Why i have this error, i check attribute and it is not empty \+"code": "invalid_payload_format" +"detail": "attributes cannot be blank." im using this code below public function pay() { $data = \[ 'data' => \[ 'attributes' => \[ 'amount' => 10000, 'payment_method_allowed' => [ 'atome', 'card', 'dob', 'paymaya', 'billease', 'gcash', 'grab_pay' ], 'payment_method_options' => \[ 'card' => [ 'request_three_d_secure' => 'any' ] ], 'currency' => 'PHP', 'capture_type' => 'automatic' ] ] ]; ``` // Send the API request to create a payment intent $response = Curl::to('https://api.paymongo.com/v1/payment_intents') ->withHeader('accept: application/json') ->withHeader('authorization: Basic ' . env('AUTH_PAY')) ->withHeader('content-type: application/json') ->withData(json_encode($data)) ->asJson() ->post(); dd($response); // Check if the payment intent creation was successful if ($response->data && $response->data->id) { // Store the payment intent ID in the session \Session::put('payment_intent_id', $response->data->id); // Redirect the user to the checkout URL return redirect()->to($response->data->attributes->checkout_url); } else { // Handle the case when the payment intent creation fails // You can display an error message or redirect the user to an error page } } ```
ANSWERED

Transaction Limits

Is there a minimum/maximum amount per transaction for the different payment methods?
ANSWERED

Error in Making Payment Method Resource on Javascript Client Side

Hello. I am trying to create a Payment Method Resource on Javascript Client Side.But I got this error. {"readyState":4,"responseText":"{\"errors\":[{\"code\":\"parameter_data_type_invalid\",\"detail\":\"details.exp_month should be an integer.\",\"source\":{\"pointer\":\"details.exp_month\",\"attribute\":\"exp_month\"}},{\"code\":\"parameter_data_type_invalid\",\"detail\":\"details.exp_year should be an integer.\",\"source\":{\"pointer\":\"details.exp_year\",\"attribute\":\"exp_year\"}}]}","responseJSON":{"errors":[{"code":"parameter_data_type_invalid","detail":"details.exp_month should be an integer.","source":{"pointer":"details.exp_month","attribute":"exp_month"}},{"code":"parameter_data_type_invalid","detail":"details.exp_year should be an integer.","source":{"pointer":"details.exp_year","attribute":"exp_year"}}]},"status":400,"statusText":"error"} var authorizationHeader = 'Basic ' + btoa('pk_test_mycode'); $.ajax({ method:'POST', url:'<https://api.paymongo.com/v1/payment_methods'>, headers:{Authorization:authorizationHeader, contentType:'application/json', dataType:'json'}, data:{ data:{ attributes:{ type:'card', details:{ card_number:'4343434343434345', exp_month:5, exp_year:2026, cvc:'111' } } } }, success: function(data, status, xhr){ alert('success ' + data); }, error: function (xhr, status, error){ var errmsg = JSON.stringify(xhr) + '<br><br>' + status + '<br><br>' + error; alert(errmsg); } }); Please tell me what is wrong. Please respond immediately. Thank you.