This will allow you to change various parameters related to a particular recurring payment subscription from one particular lead. A few limitations to keep in mind:
- PayPal subscriptions cannot be edited, since Paypal manages the subscriptions in-house and they do not allow modifications from external sources.
- Payment subscriptions with status Cancelled or Terminated (meaning payment plans where all scheduled payments have already been paid) cannot be changed since they are not technically active anymore.
| Type | Parameters | Values | ||||
| POST | cmd* | edit_subscription | ||||
| POST | subscription_id* | integer | ||||
| POST | subscription_product_id** *** | integer | ||||
| POST | subscription_price_point** *** | integer | ||||
| POST | subscription_next_payment_date *** | 'yyyy-mm-dd hh:mm' format Timezone EST | ||||
| POST | subscription_amount *** | decimal | ||||
| POST | subscription_recurrence *** |
| ||||
| POST | subscription_product_quantity *** | integer | ||||
| POST | subscription_installments_left *** | integer or 'until cancelled' | ||||
| POST | subscription_tax_percent *** | decimal, between 0 and 100 |
* Required fields. ** In case of changing the product id, both subscription_product_id and subscription_price_point need to be present. *** At least one of the parameters need to be sent to the API. Here is an example:
'actions' => [ '0' => [ 'cmd' => 'edit_subscription', 'subscription_id' => 32451, 'subscription_product_id' => 223, 'subscription_price_point' => 2, 'subscription_next_payment_date' => '2021-01-18 05:46:00', 'subscription_amount' => 22.00, 'subscription_recurrence' => [ 'recurring_period_1' => 'monthly', 'recurring_period_2' => 'yearly' ], 'subscription_product_quantity' => 2, 'subscription_installments_left' => 3,'subscription_tax_percent' => 5 ] ]
Success message:
{
"status":"Success",
"actions":[
{
"edit_subscription":{
"status":"Success",
"message":"Subscription modified",
"type":"115"
}
}
]
}
Error Cases:
| Type Number | Message | Cause |
| 248 | Subscription doesn't exist |
|
| 260 | Invalid date format |
|
| 261 | Date is in the past |
|
| 268 | Invalid amount |
|
| 275 | Subscriptions cancelled or terminated cannot be updated |
|
| 276 | Quantity must be between 1 and 9,999 |
|
| 277 | Price must be between 1.00 and 9,999.99 |
|
| 278 | Invalid number |
|
| 280 | Invalid recurring period |
|
| 281 | Recurrence cannot be changed |
|
| 282 | Incorrect number of installments |
|
| 283 | Wrong product id or price point |
|
| 284 | Paypal transactions cannot be modified |
|
| 285 | No editable parameters for subscription |
|
| 290 | Tax must be between 0 and 100 |
|
{
"status": "Error",
"message": "Subscription doesn't exist",
"type": 248
}