How to handle shipment based on the country of the user and how to block payment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
How can i handle different shipping methods based on country of the user?
With paypal express checkout i can access user informations only after they authorize the payment and then i can add shipping fees based on that and execute the payment.
In sandbox this works but i found this really weird..
The user will authorize for example 100$ and then you withdraw 120$ because shipping to this country is 20$ without even him knowing that.
I tried an order in sandbox with 100000$ shipping fees not authorized by the user and the payment work.
User-experience-wise i can at least show a review of the payment before executing the payment but i wonder if in production this kind of thing will work.
The other problem i have is to block payment to some nations.
If for example i don't want to ship to France can i just not execute the payment after the authorization of the user?
Is there some way to abort the payment?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, yes ExpressCheckout allows to specify a different amount from the creation (SetExpressCheckout) to the execution (DoExpressCheckout) of the payment as it gives the possibility to add for example the shipping fees. So it is correct that allows that.
You could place a sort of alert on your website saying that based on the shipping country there will be a fee applied to the amount.
For blocking some countries for the payment you need to set this before the checkout, in your website, with a sort of filter or allows to see the checkout only to those countries that you want to ship to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can i also check the address after authorization and don't proceed with the execution because the address is not in the allowed countries or is that against paypal policy?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, indeed you can, once you create the payment with SetExpressCheckout and you checked the country of the buyer you are then redirected to your website where if you want to process the payment then you call DoExpressCheckout to execute it, but if you don't want to process it (because of the country that is not in your shipping country list) then do not call DoExpressCheckout and instead show a message about that.
If you didn't develop the integration on your own but you are using a third party module / eCommerce then you need to check with them how to achieve that.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- [WooCommerce PayPal Payments] - Required phone country code, different than the cards country code. in PayPal Payments Standard
- Compliance violation. flag based on the account origin ? in Sandbox Environment
- Advanced Credit and Debit Card Payments are disabled, Apple Pay not working in PayPal Payments Standard
- OXXO payment source error PAYEE_COUNTRY_NOT_SUPPORTED_FOR_PAYMENT_SOURCE error in production in REST APIs
- How do I offer PayPal Pay Later button on my website? in PayPal Payments Standard