3
votes

Let's say we have a hotel booking system and we want to receive payments via PayPal.

When user goes through the booking process he / she ends up on the page that says "complete your payment here" which is a link to PayPal.

Because this link is in a different system (PayPal) it would be nice if it would be valid for a certain amount of time. Otherwise I can open this link after one day and pay while my real booking was already cancelled.

===

The only way to implement something similar I have found so far is to use option "Can customers buy an item when it is sold out?".

The idea is to have a link like this:

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&charset=utf-8&business=email-is-here&item_name=Prepayment+of+booking&amount=1&currency_code=USD&notify_url=https://my-booking-mega-system.com/pingback&first_name=fn&last_name=ln&expires=1433234400000

2
Similar to below answer, why not just pop the payment flow, direct, Paypal redirect or in-context, after you've done some eval on your end (inventory, etc.)? IMHO, relatively "simpler" than having to manage (unreliably) some x number of links lifetimes...EdSF
Same answer as below: once you get the final PayPal link - it is valid "forever". The idea is to keep the check on the side of the payment system.chestozo

2 Answers

1
votes

PayPal does not provide this functionality.

However, you could build it yourself:

You can add arbitrary functionality (such as checking an expiration date, or inventory, or offer conditions...) by having the "payment" link go to your website rather than PayPal's, do the checks, then redirect to PayPal.

Just respect PayPal's branding rules (I have not checked them recently but they may not let you use their regular button to silently go to your site, but might require that you use a "buy now with PayPal" button or something).

0
votes

Using PayPal REST SDK you can generate new links to be used by users for checkouts. So every time a user makes a request e.g clicks a button "complete your payment here" a new link is generated for the particular service. So no need for embedding an old link to the button.

Their SDK supports most of the programming languages

and also check out their GitHub for examples and usage.