0
votes

I am using Paypal REST API (Java) in Sanbox mode to test my recurring payment setup.

Business rules:

1- Upon new subscription, I want to charge the customer 3 months billed immediately without refund.

2- After 3 months, a regular monthly bill will apply automatically for infinite until canceled by user

Plan Definitions:

For rule (1), I did:

{ "name": "Trial", "type": "TRIAL", "frequency_interval": "3", "frequency": "Month", "cycles": "1", "amount": { "currency": "CAD", "value": "900" }

For rule (2):

{ "name": "Regular", "type": "REGULAR", "frequency_interval": "1", "frequency": "Month", "cycles": "0", "amount": { "currency": "CAD", "value": "300" }

Agreement:

agreement.setStartDate(//3months from today);

Questions:

  1. Is the use of 'Trial' correct for my business rule? (charge immediately today) Or should I use 'Initial' instead?
  2. How can I make the 'trial' charge non-refundable?

Thank you

2

2 Answers

3
votes

The trial amount would be charged on whatever day is set as the profile start date. If it's setup for the current day, it would charge that day, but not necessarily immediately. The initial amount would be charged immediately and is treated more like an additional charge on top of whatever the profile would be doing. Like a setup fee on a cable installation, for example.

For what you're doing here it seems like the trial period of 3 months is what you're after. This would charge the trial amount the first day it's signed up and would begin charging the regular amount after that.

As for the refunding, you would have to trigger the refund one way or another, so really, they're all non-refundable unless you refund it (or if the user submits a dispute and wind the case.)

1
votes

The only way to properly get immediate charge for the recurring payment is to add a setup_fee equal to the amount you want to charge recurrently, then set start_date of the agreement to the date when next cycle is supposed to be billed.

More information can be found in the discussion on github: https://github.com/paypal/PayPal-PHP-SDK/issues/180