Subscription Plan definition Using REST API PHP with Trial
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created the Subscription plan using REST API but plan defined only accepts payments without trial . Please check. I have provided some part of code.
$plan = new Plan();
$plan->setName('TESTR3')
->setDescription('TESTR3.')
->setType('fixed');
$paymentDefinition = new PaymentDefinition();
$paymentDefinition->setName('Regular Payments')
->setType('REGULAR')
->setFrequency('Month')
->setFrequencyInterval("1")
->setCycles("60")
->setAmount(new Currency(array('value' => 35, 'currency' => 'USD')));
$paymentDefinition->setName('Free trial payment definition')
->setType('TRIAL')
->setFrequency('Week')
->setFrequencyInterval("1")
->setCycles("1")
->setAmount(new Currency(array('value' => 0, 'currency' => 'USD')));
Please let me know how can i resolve this.
- Labels:
-
Subscriptions
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Reliable way to know (and keep in sync) when a subscription will (or has) expired? in REST APIs
- Some webhook events are not being sent and not being record in the wehbook events logs in REST APIs
- [JS-SDK] Trying to upgrade a subscription with a prorata charge, but still can't understand how in SDKs
- Create plan billed every 4 weeks in REST APIs
- Extra 1 year trial added to customer subscriptions - how to remove? in PayPal Payments Standard