拥有一个可以创建免费试用或不免费试用客户订阅的计划
Have one Plan that can create customer subscription with free trial or without free trial
假设我有一个青铜计划,可以为用户提供 1 个月的[免费试用]。
当用户取消他们的Bronze计划时,他们第二次再次购买Bronze计划时,它应该不再有[免费试用]了。
另一种情况是,当用户升级到黄金计划时,他们不再适用于[免费试用],因为他们已经使用过一次试用版。
有什么解决办法吗?
我尽量避免创建重复的计划。
比如为有免费试用的青铜计划创建一个计划,为没有免费试用的青铜计划创建另一个计划。
我总共有 6 个计划,如果我确实创建了一个没有嵌入免费试用版的重复计划,它将有 12 个计划,这会使事情变得复杂。
不确定这是否有帮助,但我正在使用 Paypal 按钮 JS SDK 创建订阅。
paypal.Buttons({
createSubscription: function(paypal_data, actions) {
return actions.subscription.create({
"plan_id": data.plan_id
});
} //And so on...
}).render('#paypal-button-container');
我打算做的就像我们处理 Stripe 订阅功能的方式一样。我可以自由选择是否应该免费试用 30 天。
return Subscription::create([
'customer' => $customer_id,
'items' => [
[
'plan' => $plan_id
]
],
'trial_period_days' => 30,
'expand' => ['latest_invoice.payment_intent']
]);
API参考Link:
https://developer.paypal.com/docs/api/subscriptions/v1/
https://developer.paypal.com/docs/api/subscriptions/v1/#plans
我在 Paypal 技术支持上发送了一张票,并收到了关于此问题的回复。
引用自我收到的部分电子邮件
According to your description, you want to dynamically set the free
trial in a plan which has be created, right?
But unfortunately, our current subscription payment product doesn't
support dynamically change the trial info after the plan has been
created.
So as my suggestion, currently the best solution is to prepare 2
version (trial on/off) for each plan, totally 12 plans, which you have
mentioned as well. That's the only method to fulfill your business
requirement.
简而言之,目前没有办法在创建计划后动态更改试用信息。
假设我有一个青铜计划,可以为用户提供 1 个月的[免费试用]。
当用户取消他们的Bronze计划时,他们第二次再次购买Bronze计划时,它应该不再有[免费试用]了。
另一种情况是,当用户升级到黄金计划时,他们不再适用于[免费试用],因为他们已经使用过一次试用版。
有什么解决办法吗?
我尽量避免创建重复的计划。
比如为有免费试用的青铜计划创建一个计划,为没有免费试用的青铜计划创建另一个计划。
我总共有 6 个计划,如果我确实创建了一个没有嵌入免费试用版的重复计划,它将有 12 个计划,这会使事情变得复杂。
不确定这是否有帮助,但我正在使用 Paypal 按钮 JS SDK 创建订阅。
paypal.Buttons({
createSubscription: function(paypal_data, actions) {
return actions.subscription.create({
"plan_id": data.plan_id
});
} //And so on...
}).render('#paypal-button-container');
我打算做的就像我们处理 Stripe 订阅功能的方式一样。我可以自由选择是否应该免费试用 30 天。
return Subscription::create([
'customer' => $customer_id,
'items' => [
[
'plan' => $plan_id
]
],
'trial_period_days' => 30,
'expand' => ['latest_invoice.payment_intent']
]);
API参考Link:
https://developer.paypal.com/docs/api/subscriptions/v1/
https://developer.paypal.com/docs/api/subscriptions/v1/#plans
我在 Paypal 技术支持上发送了一张票,并收到了关于此问题的回复。
引用自我收到的部分电子邮件
According to your description, you want to dynamically set the free trial in a plan which has be created, right?
But unfortunately, our current subscription payment product doesn't support dynamically change the trial info after the plan has been created.
So as my suggestion, currently the best solution is to prepare 2 version (trial on/off) for each plan, totally 12 plans, which you have mentioned as well. That's the only method to fulfill your business requirement.
简而言之,目前没有办法在创建计划后动态更改试用信息。