简体   繁体   中英

PayPal infinite billing plan - how to create?

I am trying to create an infinite billing plan with the PayPal API, but I am unsure how to create this.

If I try to set total_cycles to 0 the API rejects this as invalid input with the response that total_cycles must be between 1-999.

Using total_cycles: 999 as a value returns this as invalid input with the response that total_cycles must be between 1-999!

Using total_cycles: 998 is accepted! Grr!

There appears to be an "off by 1" error in the API at the very least.

So: How does one create an infinite subscription? I don't want subscriptions to end after 998 occurrences.

According to their own documentation , 0 is the correct value.

The number of times this billing cycle runs. Trial billing can only have maximum value of 1 for total_cycles. In case of infinite regular billing cycle, total_cycles can be set to 0 . For finite regular billing cycle, total_cycles can be set between 1 and 999. Default: 1.

Minimum value: 0.

Maximum value: 999.

Sounds like a bug. You should report an issue if it's still a problem: https://github.com/paypal/paypal-checkout-components/issues

Update

I just tried it with 0 in their sandbox environment and it appears to have worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM