REST API locally works fine. on server 403 error

xbvztyw
Contributor
Contributor

When I invoke the PayPal REST API's order API locally, everything works fine. However, when I try to do the same on the server,

 I get a 403 error.

my server ip is [removed]
Can you help me check if my server is on a blacklist?
the response body is 
 

 

 

 

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>403 Forbidden</title>
  </head>
  <body>
    <h1>Error 403 Forbidden</h1>
    <p>Forbidden</p>
    <h3>Error 54113</h3>
    <p>Details: cache-nrt-rjtf7700044-NRT 168311959[Removed. Phone #s not permitted]lt;/p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>

 

 

 

the request body is 
 

 

 

 

{
	"intent":"CAPTURE",
	"payment_source":{
		"paypal":{
			"experience_context":{
				"brand_name":"tomori",
				"cancel_url":"https://xxx.com/cancelUrl",
				"landing_page":"LOGIN",
				"locale":"ja-JP",
				"payment_method_preference":"IMMEDIATE_PAYMENT_REQUIRED",
				"payment_method_selected":"PAYPAL",
				"return_url":"https://xxx.com/returnUrl",
				"shipping_preference":"NO_SHIPPING",
				"user_action":"PAY_NOW"
			}
		}
	},
	"purchase_units":[
		{
			"amount":{
				"currency_code":"JPY",
				"value":"100000.00"
			},
			"reference_id":"805232a95c0c4396a9a071a2507dddd2"
		}
	]
}

 

 

 

and when I try this command 

 

 

 

wget https://www.sandbox.paypal.com/

 

 

 

I got

 

 

 

[Removed. Phone #s not permitted]14:29--  https://www.sandbox.paypal.com/
Resolving www.sandbox.paypal.com (www.sandbox.paypal.com)... [Removed. Phone #s not permitted]Removed. Phone #s not permitted], ...
Connecting to www.sandbox.paypal.com (www.sandbox.paypal.com)|[removed]
|:443... connected.
HTTP request sent, awaiting response... 403 Forbidde[Removed. Phone #s not permitted]14:29 ERROR 403: Forbidden.

 

 

 

Login to Me Too
4 REPLIES 4

MTS_Chiranjeevi
Moderator
Moderator

Good day @xbvztyw,

 

Thank you for posting to the PayPal community.

 

https://developer.paypal.com/api/rest/reference/orders/v2/errors/#create-order 

 

If your getting this error during Capture API call, please use the same REST API credentials (Client ID and Secret, which you have used while performing the Create Order API call).

 

While performing API calls(Create, Capture, etc.) on behalf of other PayPal sandbox/live account, please make sure to on-board that particular seller/merchant sandbox/live PayPal account and the seller must grant you API permission to process payments on their behalf.

 

https://developer.paypal.com/docs/multiparty/ 

 

https://developer.paypal.com/docs/multiparty/seller-onboarding/ 

 

If your still facing the issue, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with detailed error information. 

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

xbvztyw
Contributor
Contributor

This API did not return any JSON data, but something like XML. The API used is v2/checkout/orders. The program runs well locally, can you help me check if the new server IP has been blacklisted?

Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

@xbvztyw Yes, I have provided the steps and instructions about the  v2/checkout/orders.

 

Please follow the steps provided in my previous comments, If your still facing the issue, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with detailed error information. 

Login to Me Too

tuwinck-adtv
Contributor
Contributor

Im facing the same issue. Locally all Paypal API works, no problem. But suddendly in production server we are getting all the time 403 forbidden. Error 54113.  All API calls returns that response.

 

We installed the app with other provider and some APIs are working but when we capture the payment for the order we are getting the same message.

 

 

[removed]:~# wget https://www.sandbox.paypal.com/
[Removed. Phone #s not permitted]10:42-- https://www.sandbox.paypal.com/
Resolving www.sandbox.paypal.com (www.sandbox.paypal.com)... [removed]
Connecting to www.sandbox.paypal.com (www.sandbox.paypal.com) [removed]... connected.
HTTP request sent, awaiting response... 403 Forbidden

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.