Syntax
createPaymentplan( data )
Creates a payment plan for a product on Digistore24.
Access rights
Full access required.
Parameters
product_id – Product ID of the product to which the payment plan is to be added.
data – array with payment plan properties.
- first_amount
- first_billing_interval
- currency
- other_amounts
- other_billing_intervals
- number_of_installments: int
- is_active: bool
- cancel_policy
- Possible values: 6m_0,6m_6m,6m_12m,12m_0,12m_3m,12m_6m,12m_12m,24m_0,24m_6m,24m_12m
- Field “Minimum term” in backoffice
The billing type is computed from the parameters number_of_installments and other_amounts:
- other_amounts == 0.00 OR number_of_installments==1 => billing_type = single_payment
- other_amounts > 0.00 AND number_of_installments==0 => billing_type = subscription
- other_amounts > 0.00 AND number_of_installments>=2 => billing_type = installment
Return data
Array (
[is_valid] => Y/N
[paymentplan_id] => int
)