Discussions

Ask a Question
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);
ANSWERED

React Native Supported

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

Paymongo on Wix

Will Paymongo work on Wix?
ANSWERED
ANSWERED

Paymongo not accepting my payment

I am trying to pay with my wellsfargo visa credit card through paymongo for a transaction in the philippines, but it keeps on giving a message that this payment type is not accepted, try a different payment method or credit card. I have sufficient fund and there is no issue with the bank institution here...

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