Cancel the current dunning episode for a subscription
POST
/api/subscriptions/{id}/cancel-dunning
const url = 'https://api.usegro.co/api/subscriptions/example/cancel-dunning';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.usegro.co/api/subscriptions/example/cancel-dunningWrites off the unpaid billing cycle: the dunning episode is marked lost (exhausted) and the subscription resumes its normal schedule. Requires the subscription’s next dates to be valid (present and not in the past).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Dunning cancelled
Media typeapplication/json
object
success
required
boolean
message
required
string
Example generated
{ "success": true, "message": "example"}Subscription is not in dunning or its dates are invalid
Media typeapplication/json
Example
{ "success": false, "error": "Cannot cancel dunning: next billing date is in the past", "errorCode": "INVALID_DATES"}