Localized Pricing
Danh sách giá theo địa phương
Liệt kê các quy tắc giá theo địa phương đang hoạt động cho một sản phẩm.
GET
/
products
/
{product_id}
/
localized-prices
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const listLocalizedPricesResponse = await client.products.localizedPrices.list(
'pdt_R8AWMPiV8RyJElcCKvAID',
);
console.log(listLocalizedPricesResponse.items);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
)
list_localized_prices_response = client.products.localized_prices.list(
"pdt_R8AWMPiV8RyJElcCKvAID",
)
print(list_localized_prices_response.items)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
listLocalizedPricesResponse, err := client.Products.LocalizedPrices.List(context.TODO(), "pdt_R8AWMPiV8RyJElcCKvAID")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", listLocalizedPricesResponse.Items)
}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.ListLocalizedPricesResponse;
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ListLocalizedPricesResponse listLocalizedPricesResponse = client.products().localizedPrices().list("pdt_R8AWMPiV8RyJElcCKvAID");
}
}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.ListLocalizedPricesResponse
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val listLocalizedPricesResponse: ListLocalizedPricesResponse = client.products().localizedPrices().list("pdt_R8AWMPiV8RyJElcCKvAID")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
list_localized_prices_response = dodo_payments.products.localized_prices.list("pdt_R8AWMPiV8RyJElcCKvAID")
puts(list_localized_prices_response)<?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 {
$listLocalizedPricesResponse = $client->products->localizedPrices->list(
'pdt_R8AWMPiV8RyJElcCKvAID'
);
var_dump($listLocalizedPricesResponse);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Products.LocalizedPrices;
DodoPaymentsClient client = new();
LocalizedPriceListParams parameters = new()
{
ProductID = "pdt_R8AWMPiV8RyJElcCKvAID"
};
var listLocalizedPricesResponse = await client.Products.LocalizedPrices.List(parameters);
Console.WriteLine(listLocalizedPricesResponse);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let product_id = "product_id";
let result = client
.products()
.localized_prices()
.list()
.product_id(product_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/products/{product_id}/localized-prices \
--header 'Authorization: Bearer <token>'{
"items": [
{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"product_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}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 Giá Địa PhươngTạo quy tắc giá địa phương cho một sản phẩm, theo tiền tệ hoặc theo quốc gia.
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
});
const listLocalizedPricesResponse = await client.products.localizedPrices.list(
'pdt_R8AWMPiV8RyJElcCKvAID',
);
console.log(listLocalizedPricesResponse.items);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
)
list_localized_prices_response = client.products.localized_prices.list(
"pdt_R8AWMPiV8RyJElcCKvAID",
)
print(list_localized_prices_response.items)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
listLocalizedPricesResponse, err := client.Products.LocalizedPrices.List(context.TODO(), "pdt_R8AWMPiV8RyJElcCKvAID")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", listLocalizedPricesResponse.Items)
}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.ListLocalizedPricesResponse;
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ListLocalizedPricesResponse listLocalizedPricesResponse = client.products().localizedPrices().list("pdt_R8AWMPiV8RyJElcCKvAID");
}
}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.ListLocalizedPricesResponse
import com.dodopayments.api.models.products.localizedprices.LocalizedPriceListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val listLocalizedPricesResponse: ListLocalizedPricesResponse = client.products().localizedPrices().list("pdt_R8AWMPiV8RyJElcCKvAID")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
list_localized_prices_response = dodo_payments.products.localized_prices.list("pdt_R8AWMPiV8RyJElcCKvAID")
puts(list_localized_prices_response)<?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 {
$listLocalizedPricesResponse = $client->products->localizedPrices->list(
'pdt_R8AWMPiV8RyJElcCKvAID'
);
var_dump($listLocalizedPricesResponse);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Products.LocalizedPrices;
DodoPaymentsClient client = new();
LocalizedPriceListParams parameters = new()
{
ProductID = "pdt_R8AWMPiV8RyJElcCKvAID"
};
var listLocalizedPricesResponse = await client.Products.LocalizedPrices.List(parameters);
Console.WriteLine(listLocalizedPricesResponse);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let product_id = "product_id";
let result = client
.products()
.localized_prices()
.list()
.product_id(product_id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/products/{product_id}/localized-prices \
--header 'Authorization: Bearer <token>'{
"items": [
{
"amount": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"product_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}