One time purchase and recurring payments in single transaction using express checkout rest apis

rnjnaspringrole
New Community Member

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.

Login to Me Too
1 REPLY 1

Anonymous_User
Not applicable

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.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.