Localized Pricing
Lưu trữ Giá Địa Phương
Lưu trữ một quy tắc giá địa phương. Xóa mềm idempotent.
DELETE
/
products
/
{product_id}
/
localized-prices
/
{id}
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.products.localizedPrices.archive('lcp_3aOOT7ebrzBOV41yL2V6s', {
product_id: 'pdt_R8AWMPiV8RyJElcCKvAID',
});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.products.localized_prices.archive(
id="lcp_3aOOT7ebrzBOV41yL2V6s",
product_id="pdt_R8AWMPiV8RyJElcCKvAID",
)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.Products.LocalizedPrices.Archive(
context.TODO(),
"pdt_R8AWMPiV8RyJElcCKvAID",
"lcp_3aOOT7ebrzBOV41yL2V6s",
)
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.products.localizedprices.LocalizedPriceArchiveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LocalizedPriceArchiveParams params = LocalizedPriceArchiveParams.builder()
.productId("pdt_R8AWMPiV8RyJElcCKvAID")
.id("lcp_3aOOT7ebrzBOV41yL2V6s")
.build();
client.products().localizedPrices().archive(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceArchiveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: LocalizedPriceArchiveParams = LocalizedPriceArchiveParams.builder()
.productId("pdt_R8AWMPiV8RyJElcCKvAID")
.id("lcp_3aOOT7ebrzBOV41yL2V6s")
.build()
client.products().localizedPrices().archive(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
result = dodo_payments.products.localized_prices.archive(
"lcp_3aOOT7ebrzBOV41yL2V6s",
product_id: "pdt_R8AWMPiV8RyJElcCKvAID"
)
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->products->localizedPrices->archive(
'lcp_3aOOT7ebrzBOV41yL2V6s', productID: 'pdt_R8AWMPiV8RyJElcCKvAID'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.Products.LocalizedPrices;
DodoPaymentsClient client = new();
LocalizedPriceArchiveParams parameters = new()
{
ProductID = "pdt_R8AWMPiV8RyJElcCKvAID",
ID = "lcp_3aOOT7ebrzBOV41yL2V6s",
};
await client.Products.LocalizedPrices.Archive(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let product_id = "product_id";
let id = "id";
let result = client
.products()
.localized_prices()
.archive()
.product_id(product_id)
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request DELETE \
--url https://test.dodopayments.com/products/{product_id}/localized-prices/{id} \
--header 'Authorization: Bearer <token>'Lần sửa đổi cuối 26 tháng 6, 2026
Trang này có hữu ích không?
Trước
Tạo AddonTạo một sản phẩm addon mới có thể được gắn vào các sản phẩm đăng ký chính của bạn
Tiếp theo
⌘I
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.products.localizedPrices.archive('lcp_3aOOT7ebrzBOV41yL2V6s', {
product_id: 'pdt_R8AWMPiV8RyJElcCKvAID',
});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.products.localized_prices.archive(
id="lcp_3aOOT7ebrzBOV41yL2V6s",
product_id="pdt_R8AWMPiV8RyJElcCKvAID",
)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.Products.LocalizedPrices.Archive(
context.TODO(),
"pdt_R8AWMPiV8RyJElcCKvAID",
"lcp_3aOOT7ebrzBOV41yL2V6s",
)
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.products.localizedprices.LocalizedPriceArchiveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LocalizedPriceArchiveParams params = LocalizedPriceArchiveParams.builder()
.productId("pdt_R8AWMPiV8RyJElcCKvAID")
.id("lcp_3aOOT7ebrzBOV41yL2V6s")
.build();
client.products().localizedPrices().archive(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceArchiveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: LocalizedPriceArchiveParams = LocalizedPriceArchiveParams.builder()
.productId("pdt_R8AWMPiV8RyJElcCKvAID")
.id("lcp_3aOOT7ebrzBOV41yL2V6s")
.build()
client.products().localizedPrices().archive(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
result = dodo_payments.products.localized_prices.archive(
"lcp_3aOOT7ebrzBOV41yL2V6s",
product_id: "pdt_R8AWMPiV8RyJElcCKvAID"
)
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->products->localizedPrices->archive(
'lcp_3aOOT7ebrzBOV41yL2V6s', productID: 'pdt_R8AWMPiV8RyJElcCKvAID'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.Products.LocalizedPrices;
DodoPaymentsClient client = new();
LocalizedPriceArchiveParams parameters = new()
{
ProductID = "pdt_R8AWMPiV8RyJElcCKvAID",
ID = "lcp_3aOOT7ebrzBOV41yL2V6s",
};
await client.Products.LocalizedPrices.Archive(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let product_id = "product_id";
let id = "id";
let result = client
.products()
.localized_prices()
.archive()
.product_id(product_id)
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request DELETE \
--url https://test.dodopayments.com/products/{product_id}/localized-prices/{id} \
--header 'Authorization: Bearer <token>'