for the payment.sale I get next response:
create_time "2020-07-10T09:32:04.487Z",
event_type "PAYMENT.SALE.COMPLETED",
event_version 1.0,
id "WH-5G104985TP0999132-7MD08978AU724400U",
links [
[0] {
href "https://api.paypal.com/v1/notifications/webhooks-events/WH-5G104985TP0999132-7MD08978AU724400U",
method "GET",
rel "self"
},
[1] {
href "https://api.paypal.com/v1/notifications/webhooks-events/WH-5G104985TP0999132-7MD08978AU724400U/resend",
method "POST",
rel "resend"
}
],
Because of some issue on our server we did not handle this request. So I try to use links from the object.
Currently I want to resend this hook.
When I use this link I get 404:
-- Client <<< Server (https://api.paypal.com/v1/notifications/webhooks-events/WH-5G104985TP0999132-7MD08978AU724400U/resend)
{"name":"INVALID_RESOURCE_ID","message":"Resource id is invalid","debug_id":"324e06da40287","information_link":"https://developer.paypal.com/docs/api/webhooks/#errors","details":[],"links":[]}
Mojo::Message::Response {
Parents Mojo::Message
public methods (17) : code, cookies, default_message, extract_start_line, fix_headers, get_start_line_chunk, has, is_client_error, is_empty, is_error, is_info, is_redirect, is_server_error, is_success, max_message_size, message, start_line_size
private methods (2) : _start_line, _status_class
internals: {
code 404,
content Mojo::Content::Single,
error {
code 404,
message "Not Found"
},
events {},
finished 3,
max_line_size 8192,
max_message_size 2147483648,
message "Not Found",
raw_size 562,
state "finished",
version 1.1
}
} at /home/feelsafe/web/lib/API/PayPal.pm line 100.
Mojo::Message::Response {
Parents Mojo::Message
public methods (17) : code, cookies, default_message, extract_start_line, fix_headers, get_start_line_chunk, has, is_client_error, is_empty, is_error, is_info, is_redirect, is_server_error, is_success, max_message_size, message, start_line_size
private methods (2) : _start_line, _status_class
internals: {
code 404,
content Mojo::Content::Single,
error {
code 404,
message "Not Found"
},
events {},
finished 3,
json {
debug_id "324e06da40287",
details [],
information_link "https://developer.paypal.com/docs/api/webhooks/#errors",
links [],
message "Resource id is invalid",
name "INVALID_RESOURCE_ID"
},
max_line_size 8192,
max_message_size 2147483648,
message "Not Found",
raw_size 562,
state "finished",
version 1.1
}
}
*NOTICE debug_id
But when I want to get webhook, then URL works:
v1/notifications/webhooks-events/WH-5G104985TP0999132-7MD08978AU724400U
internals: {
code 200,
content Mojo::Content::Single,
events {},
finished 2,
max_line_size 8192,
max_message_size 2147483648,
message "OK",
raw_size 1752,
state "finished",
version 1.1
}
}
Then I did fake requests to .../resend with GET PUT methods. I get Method not allowed error.
Then when I repeat my POST Request to
https://api.paypal.com/v1/notifications/webhooks-events/WH-5G104985TP0999132-7MD08978AU724400U/resend
It was completed successfully
internals: {
code 202,
content Mojo::Content::Single,
events {},
finished 2,
max_line_size 8192,
max_message_size 2147483648,
message "Accepted",
raw_size 1759,
state "finished",
version 1.1
}
Please help me to resolve random pp response: 404, which sometimes occur for .../resend API endpoint
Thank you
Describe steps to reproduce. If possible, please, share a link with a minimal reproduction.
A clear and concise description of what is happening. Please include console logs during the time of the issue, especially error messages.
A clear and concise description of what you expected to happen.
window.paypal.version): -What browser(s) are affected?
Add any other context about the problem here. Screenshots or videos that show the issue are very helpful.
Issue-Label Bot is automatically applying the label ๐ bug to this issue, with a confidence of 0.85. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Despite on I get accepted for .../resend query to PP, we still do not see resended webhook from paypal
Hi @KES777, your issue isn't related to the JS SDK or paypal-checkout-components or PayPal Checkout in general, but I'm working on finding you an answer to your question. Stay tuned. Thanks!
I am sorry. My question is about paypal checkout. And I think this is more closer repository.
Is there a better place to ask/report about problems for PP v1 checkout API?
404 again.
GET v1/notifications/webhooks-events/WH-6JL65278TB5974006-41684307TX3258604
{"id":"WH-6JL65278TB5974006-41684307TX3258604","create_time":"2020-07-24T12:38:51.414Z","resource_type":"payment","event_type":"PAYMENTS.PAYMENT.CREATED","summary":"Checkout payment is created and approved by buyer","resource":{"update_time":"2020-07-24T12:38:51Z","create_time":"2020-07-24T12:38:31Z","redirect_urls":{"return_url":"/cabinet/payment_success?paymentId=PAYID-L4NNMRY3SH15170U4075740H","cancel_url":"/cabinet/payment_cancel"},"links":[{"href":"https://api.paypal.com/v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H","rel":"self","method":"GET"},{"href":"https://api.paypal.com/v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H/execute","rel":"execute","method":"POST"},{"href":"https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-58G2569692892880N","rel":"approval_url","method":"REDIRECT"}],"id":"PAYID-L4NNMRY3SH15170U4075740H","state":"created","transactions":[{"amount":{"total":"22.00","currency":"EUR","details":{"subtotal":"22.00","tax":"0.00"}},"payee":{"merchant_id":"RSEX85KVSWNAW","email":"[email protected]"},"item_list":{"shipping_address":{"recipient_name":"******","line1":"***","line2":"***","city":"******","state":"Afgooye","postal_code":"2526","country_code":"SO","default_address":false,"preferred_address":false,"primary_address":false,"disable_for_transaction":false}},"related_resources":[]}],"intent":"sale","cart":"58G2569692892880N"},"links":[{"href":"https://api.paypal.com/v1/notifications/webhooks-events/WH-6JL65278TB5974006-41684307TX3258604","rel":"self","method":"GET","encType":"application/json"},{"href":"https://api.paypal.com/v1/notifications/webhooks-events/WH-6JL65278TB5974006-41684307TX3258604/resend","rel":"resend","method":"POST","encType":"application/json"}],"event_version":"1.0"}
As we can see - web hook exists
If we try to get payment we get 404
GET v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H
-- Client <<< Server (https://api.paypal.com/v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H)
{"name":"INVALID_RESOURCE_ID","message":"The requested resource ID was not found","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"374e72daa49ce"}
Mojo::Message::Response {
Parents Mojo::Message
internals: {
code 404,
content Mojo::Content::Single,
error {
code 404,
message "Not Found"
},
events {},
finished 3,
max_line_size 8192,
max_message_size 2147483648,
message "Not Found",
raw_size 569,
state "finished",
version 1.1
}
} at
If we try execute payment, It also does not exists:
POST v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H/execute
-- Client <<< Server (https://api.paypal.com/v1/payments/payment/PAYID-L4NNMRY3SH15170U4075740H/execute)
{"name":"INVALID_RESOURCE_ID","message":"Requested resource ID was not found.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"196c9734aa8a6"}
Mojo::Message::Response {
Parents Mojo::Message
internals: {
code 404,
content Mojo::Content::Single,
error {
code 404,
message "Not Found"
},
events {},
finished 3,
max_line_size 8192,
max_message_size 2147483648,
message "Not Found",
raw_size 566,
state "finished",
version 1.1
}
} at
How it could be? web hook says that there is payment, but we can not access that payment?
more not found links:
v1/payments/payment/PAYID-L4NNLKI2SP52902VW2537810
v1/payments/payment/PAYID-L4NNJIA23F06524VF230351F
Hi @KES777, I don't know of a public GitHub repository to handle /v1/payments issues. Our API documentation on developer.paypal.com have support links that point at https://www.paypal-support.com. Typically, API support requests fall into that bucket.
For now, I opened up an internal JIRA ticket and sent it to the appropriate team and I'll relay back updates to this GitHub issue. Stay tuned!
Hi @KES777, checking in. It appears to be an intermittent issue. They're trying to figure out why. I'll relay back updates here.
Hi @KES777, I have an update! As you called out initially, the /resend API had an intermittent issue at the time you called it. Since then, we've been able to confirm on our end that the event exists.
For the subsequent /v1/payments/payment/PAYID-* calls that you pointed out, we see that the buyer had an INSUFFICIENT_FUNDS error when trying to approve the payment, then when you tried to execute the payment, you received a PAYER_ACTION_REQUIRED error on 7/24 at 5:38.
The next day, when you tried an execute call on 7/25 at 00:10, the PAYID was already expired so you received an INVALID_RESOURCE_ID error.
Other than the intermittent issue, which you called out and we confirmed, these other INSUFFICIENT_FUNDS, PAYER_ACTION_REQUIRED and INVALID_RESOURCE_ID errors are business errors or contingencies that seem to be valid.
Hopefully this helps explain the subsequent business errors. The team is actively working on figuring out and resolving why the /resend API sometimes has intermittent 404s. Hopefully this helps w/ any uncertainty.
If you have any other PayPal API questions, the best route is going to https://www.paypal-support.com and engaging technical support. That way you'll be routed to the correct team right away.
thank you very much
Would be nice if PP will respond with corresponding meaningful status: expired, instead of just 404
Agreed! I relayed that back to the API team. I also felt like a more descriptive error message would have been more helpful.
When I ask PP to resend it does noting.
POST v1/notifications/webhooks-events/WH-5RD08120D50389917-5KL236929A660204S/resend
as response we get:
internals: {
code 202,
content Mojo::Content::Single,
events {},
finished 2,
max_line_size 8192,
max_message_size 2147483648,
message "Accepted",
raw_size 3392,
state "finished",
version 1.1
}
And none events come from PayPal
PayPal just waits next time tick and then sends webhook event. It forces us to wait hours, MANY MANY HOURS to resolve production problem... and our clients just gone :`-( We also glad to gone from PayPal, but we just have no alternatives currently =(
Expected behavior:
PP MUST resend webhook instantly if it is asked to do so.
PS: I have tried https://www.paypal-support.com/ interface as you have advised. It is ugly.
if something went wrong I shows error and my filled into form data is lost. I must fill again and again. Very very bad interface
Most helpful comment
Hi @KES777, I have an update! As you called out initially, the /resend API had an intermittent issue at the time you called it. Since then, we've been able to confirm on our end that the event exists.
For the subsequent /v1/payments/payment/PAYID-* calls that you pointed out, we see that the buyer had an INSUFFICIENT_FUNDS error when trying to approve the payment, then when you tried to execute the payment, you received a PAYER_ACTION_REQUIRED error on 7/24 at 5:38.
The next day, when you tried an execute call on 7/25 at 00:10, the PAYID was already expired so you received an INVALID_RESOURCE_ID error.
Other than the intermittent issue, which you called out and we confirmed, these other INSUFFICIENT_FUNDS, PAYER_ACTION_REQUIRED and INVALID_RESOURCE_ID errors are business errors or contingencies that seem to be valid.
Hopefully this helps explain the subsequent business errors. The team is actively working on figuring out and resolving why the /resend API sometimes has intermittent 404s. Hopefully this helps w/ any uncertainty.
If you have any other PayPal API questions, the best route is going to https://www.paypal-support.com and engaging technical support. That way you'll be routed to the correct team right away.