Does anyone know how we can set up an ecommerce system that can limit purchases to one per customer? We'd need to use PayPal. We are trying to sell tickets and limit the online purchases to one pair (two tickets) per customer.

Obviously we can limit the quantity, say in a drop down , to 2, but that would not stop people from repeating the process.

We'd be okay if they bought again using another name, but otherwise want to limit purchases to one time per customer.

Any suggestions are appreciated.
Thank you.

Dani AI

Generated

Short, practical plan that ties the forum suggestions together and gives implementable steps.

wants “one pair per customer.” is right that enforcement belongs in the database; ’s Buy‑Now idea helps with UI but won’t stop repeat buys. The most reliable setup is server‑side enforcement keyed to a stable identifier: either a site account (require login) or the PayPal payer identifier returned by PayPal — store that in your purchases table and enforce uniqueness for the (event_id, payer_id) pair. (developer.paypal.com)

Concrete flow examples (minimal, safe rules):

  • Best: require users to create an account, verify email, then block the purchase if a record exists for that user/event. Add a unique DB constraint so code and accidental race conditions are both covered.
  • If you want to allow guest checkout but still limit by PayPal identity, use the PayPal Orders/webhook flow to read payer.payer_id (or payer_email) before or at payment completion and reject or auto‑refund duplicates.

SQL + pseudocode examples (illustrative):

CREATE UNIQUE INDEX ux_event_payer ON purchases (event_id, payer_id);
# on order approval (Orders API or webhook)
if db.exists(event_id=E, payer_id=order.payer.payer_id):
    refuse_capture_or_refund()
else:
    capture_payment(); insert_purchase(...)

If using classic Buy‑Now/redirect buttons where you only get IPN after payment, detect duplicates in your IPN/webhook handler and refund programmatically (or flag for manual review). PayPal supports webhooks/IPN for buyer data and has an API to refund captured payments. Plan clear customer messaging and a manual-review path to avoid false positives. (docs.paypal.ai)

Practical cautions and extras: cookies/IP blocks are trivial to bypass; shipping address or IP are weak signals. Payer IDs are tied to PayPal accounts but buyers can use multiple PayPal accounts or guest checkout, so combine techniques (captcha, rate limits, single‑use coupon distribution, ID check at pickup) if scalpers are a concern. Store only what you need and disclose it in your privacy policy.

Recommended Answers

All 3 Replies

Member Avatar for Member #949455

Does anyone know how we can set up an ecommerce system that can limit purchases to one per customer?

This is a good question.

The solution is from your database. It really depend what platform you are using. You can filter your database by their info and preventing customers buying more than one or same item.

I wouldn't recommend a filter at all for any e-commerece website because you'll lost customers.

Use the Paypal "Buy Now" button. When you create your Buy Now button, in Step 3 select "No" for the option, "Let your customer change order quantities?"

Good one answer LastMitch. And i really appreciate your answer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.