Saltar al contenido principal
DELETE
/
subscriptions
/
{subscription_id}
/
change-plan
/
scheduled
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

await client.subscriptions.cancelChangePlan('sub_Iuaq622bbmmfOGrVTqdXv');
import os
from dodopayments import DodoPayments

client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
client.subscriptions.cancel_change_plan(
"sub_Iuaq622bbmmfOGrVTqdXv",
)
package main

import (
"context"

"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)

func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.Subscriptions.CancelChangePlan(context.TODO(), "sub_Iuaq622bbmmfOGrVTqdXv")
if err != nil {
panic(err.Error())
}
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.subscriptions.SubscriptionCancelChangePlanParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

client.subscriptions().cancelChangePlan("sub_Iuaq622bbmmfOGrVTqdXv");
}
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.subscriptions.SubscriptionCancelChangePlanParams

fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

client.subscriptions().cancelChangePlan("sub_Iuaq622bbmmfOGrVTqdXv")
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)

result = dodo_payments.subscriptions.cancel_change_plan("sub_Iuaq622bbmmfOGrVTqdXv")

puts(result)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;

$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);

try {
$result = $client->subscriptions->cancelChangePlan(
'sub_Iuaq622bbmmfOGrVTqdXv'
);

var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}
using DodoPayments.Client;
using DodoPayments.Client.Models.Subscriptions;

DodoPaymentsClient client = new();

SubscriptionCancelChangePlanParams parameters = new()
{
SubscriptionID = "sub_Iuaq622bbmmfOGrVTqdXv"
};

await client.Subscriptions.CancelChangePlan(parameters);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let subscription_id = "subscription_id";
let result = client
.subscriptions()
.cancel_change_plan()
.subscription_id(subscription_id)
.await?;
println!("{result:?}");
Ok(())
}
curl --request DELETE \
--url https://test.dodopayments.com/subscriptions/{subscription_id}/change-plan/scheduled \
--header 'Authorization: Bearer <token>'

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

subscription_id
string
requerido

Subscription Id

Respuesta

Scheduled plan change cancelled successfully

Última modificación el 4 de mayo de 2026