Discussions
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);
Posted by Raven Dorado almost 2 years ago
Why can't I reuse the Payment Method ID for future transactions?
Posted by Inquisitive Dev over 2 years ago
Which Debit/Credit types are supported
Hi, I would like to know which type of cards does paymongo supports aside from Visa and Mastercard?
Posted by Kenneth Sy almost 2 years ago
How many days will it still be active if I created a payment link?
Posted by Arturo Armada III over 2 years ago
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 over 1 year ago
Can't disable a webhook
I am trying to disable a webhook, however I am getting the following error:
{
"errors": [
{
"code": "resource_processing_state",
"detail": "Webhook with id hook_<WEBHOOK_ID> is still being processed."
}
]
}
Any help is appreciated.
Posted by John III almost 2 years ago
Are modals required for 3D Secure Authentication?
Posted by Curious Dev over 2 years ago
Payment Method Gcash not allowed
I Create source live payment using "Gcash" the endpoint returned is
"code : payment_method_not_configured
detail : Organization with id is not allowed to process gcash payments." How can fix this?
Posted by Rick Aldrin about 1 year ago
Redirect on Credit Card Authentication?
For a source payment there's a redirect success and failure option. This allows me to redirect the customer to subsequent urls and to other pages altogether.
Is this not available with credit card transactions? Do we have to window listeners and modals for updates?
Posted by Ranbir Anand Mahtani over 1 year ago
secrey key setup on postman
im running payments but i got this error
{
"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."
}
]
}
i already use the api key and the secret key in basic auth what im doing wrong
Posted by roland jay moris almost 2 years ago