1
votes

I am using PayPal REST API and i would like to create a combine transaction that will handle one time payment and recurring payments in single transaction.

Use Case: According to flow, User can purchase product from portal and can also subscribe the products for Monthly and Quarterly basis. User can also purchase product with subscription and product with one time payment in a single transaction.

I have searched the REST API documentation as well as the PHP SDK examples and cannot find an example of a transaction that uses a mix of recurring and one-time payments in single Transaction.

1

1 Answers

0
votes

I note that https://www.paypal-community.com/t5/Business-Tools/One-time-purchase-and-recurring-payments-in-single-transaction/td-p/1509420 has a similar question and has an answer; I suspect the same author may have asked both questions, but thought this could be useful for others seeking an answer.

To avoid link rot, I'll paste the answer given there below - but I haven't personally tried this so I do not know if it worked.

One option for a one time payment is to use the Trial Variables set for one day, after that the regular payment starts on the second day.

For example, you run a service business:

There's a Onetime Setup Fee of $25.00 plus a Monthly Maintenance Fee of $10.00. The Setup Fee is charged by using the Trial Variables set for one day, after that the regular payment starts on the second day.

Some sample code with notes:

<!-- "a1" Trial amount 1. This is the price of the first trial period.
For a free trial, use a value of 0 --> 
<input type="hidden" name="a1" value="25.00"> 
<!-- "p1" Trial period 1. This is the length of the first trial period. 
The number is modified by the trial period 1 units (t1, below) --> 
<input type="hidden" name="p1" value="1"> 
<!-- "t1" Trial period 1 units. This is the units of trial period 1 (p1, above). 
Acceptable values are: D (days), W (weeks), M (months), Y (years) -->
<input type="hidden" name="t1" value="D">  

Not sure if this is what you have in mind but, it may give you some other ideas too.