i follow the quide that talk how to add button for customer to pay with credit cart on paypal, (paypal smart button) but the problem is, in smart button customize it telling me to creat my product price, and on my shopify i make a 10% cuopne code for new cutomer order, (automatically fill out the coupne when the cutomer reach to checkout page) , is there anyway i can creat the smart button based on what i have on my shopify automatically (hope i say this right)
hi @Bma
You’re right that PayPal Smart Buttons ask you to manually set the product price when customizing the button, which can be tricky if you’re using dynamic pricing, like Shopify discount codes or automatic coupons.
Unfortunately, PayPal Smart Buttons don’t automatically sync with Shopify’s built-in cart or discount system, so they won’t reflect real-time discounts like your 10% off coupon unless you custom-code the integration.
If you want to keep the Smart Button but still use Shopify’s built-in features like discounts, here are two suggestions:
Option 1: Let Shopify Handle Payments
Instead of using a separate PayPal Smart Button, let customers go through the regular Shopify checkout. Shopify already integrates PayPal Express, and it will:
Automatically apply any discount codes
Let customers choose PayPal (or credit card) at checkout
This way, the 10% coupon will still apply, and customers can pay via PayPal with their card if they want.
Option 2: Advanced Custom Integration (Not Recommended for Most Stores)
You could build a custom integration using PayPal’s APIs that fetches the cart info and applies discounts dynamically, but this is a more advanced solution and requires development skills.
In short: if you’re using Shopify’s discount features and want a smooth experience, it’s best to stick with Shopify’s built-in checkout and let it handle PayPal payments in the background.