On my platform clients have the following process: Create subscription (+ free trial for 3 days and then 29.90$/m) Cancel subscription (it should be active until the paid month is over) Resume subscription (if sub was cancelled but paid month isn't over) I have some questions: How do I need to process 2,3? Which event should I track to catch payment status every month? What is the difference between final_payment_due_date and next_billing_date Here you may see the billing plan description: billing_plan = paypal.BillingPlan({
'name': self.name,
'description': self.description,
'merchant_preferences': {
'auto_bill_amount': 'YES',
'cancel_url': f'{settings.FRONT_END_HOST_URL}/settings/billing',
'initial_fail_amount_action': 'CANCEL',
'max_fail_attempts': '3',
'return_url': f'{settings.FRONT_END_HOST_URL}/subscriptions/process',
'setup_fee': {
'currency': 'USD',
'value': '0.00'
}
},
'payment_definitions': [
{
'name': 'Trial',
'type': 'TRIAL',
'frequency_interval': '1',
'frequency': 'DAY',
'cycles': '3',
'amount': {
'currency': 'USD',
'value': '0.00'
},
'charge_models': [
{
'type': 'TAX',
'amount': {
'currency': 'USD',
'value': '0.00'
}
},
{
'type': 'SHIPPING',
'amount': {
'currency': 'USD',
'value': '0.00'
}
}
],
},
{
'cycles': '0',
'frequency': 'MONTH',
'frequency_interval': '1',
'name': 'Regular',
'type': 'REGULAR',
'amount': {
'currency': 'USD',
'value': str(self.price)
},
'charge_models': [
{
'type': 'TAX',
'amount': {
'currency': 'USD',
'value': '0.00'
}
},
{
'type': 'SHIPPING',
'amount': {
'currency': 'USD',
'value': '0.00'
}
}
],
}
],
'type': 'INFINITE'
})
... View more