> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actualizar Precio Localizado

> Actualizar el importe de una regla de precio localizada.



## OpenAPI

````yaml patch /products/{product_id}/localized-prices/{id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.105.15
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /products/{product_id}/localized-prices/{id}:
    patch:
      tags:
        - Product Localized Prices
      operationId: patch_localized_price
      parameters:
        - name: product_id
          in: path
          description: Product Id
          required: true
          schema:
            type: string
          example: pdt_R8AWMPiV8RyJElcCKvAID
        - name: id
          in: path
          description: Localized Price Id
          required: true
          schema:
            type: string
          example: lcp_3aOOT7ebrzBOV41yL2V6s
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchLocalizedPriceRequest'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalizedPriceResponse'
        '404':
          description: Not found or archived
        '422':
          description: Invalid request
        '500':
          description: Server error
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import DodoPayments from 'dodopayments';


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


            const localizedPrice = await
            client.products.localizedPrices.update('lcp_3aOOT7ebrzBOV41yL2V6s',
            {
              product_id: 'pdt_R8AWMPiV8RyJElcCKvAID',
            });


            console.log(localizedPrice.id);
        - lang: Python
          source: |-
            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
            )
            localized_price = client.products.localized_prices.update(
                id="lcp_3aOOT7ebrzBOV41yL2V6s",
                product_id="pdt_R8AWMPiV8RyJElcCKvAID",
            )
            print(localized_price.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tlocalizedPrice, err := client.Products.LocalizedPrices.Update(\n\t\tcontext.TODO(),\n\t\t\"pdt_R8AWMPiV8RyJElcCKvAID\",\n\t\t\"lcp_3aOOT7ebrzBOV41yL2V6s\",\n\t\tdodopayments.ProductLocalizedPriceUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", localizedPrice.ID)\n}\n"
        - lang: Java
          source: >-
            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.LocalizedPrice;

            import
            com.dodopayments.api.models.products.localizedprices.LocalizedPriceUpdateParams;


            public final class Main {
                private Main() {}

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

                    LocalizedPriceUpdateParams params = LocalizedPriceUpdateParams.builder()
                        .productId("pdt_R8AWMPiV8RyJElcCKvAID")
                        .id("lcp_3aOOT7ebrzBOV41yL2V6s")
                        .build();
                    LocalizedPrice localizedPrice = client.products().localizedPrices().update(params);
                }
            }
        - lang: Kotlin
          source: >-
            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.LocalizedPrice

            import
            com.dodopayments.api.models.products.localizedprices.LocalizedPriceUpdateParams


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

                val params: LocalizedPriceUpdateParams = LocalizedPriceUpdateParams.builder()
                    .productId("pdt_R8AWMPiV8RyJElcCKvAID")
                    .id("lcp_3aOOT7ebrzBOV41yL2V6s")
                    .build()
                val localizedPrice: LocalizedPrice = client.products().localizedPrices().update(params)
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

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

            localized_price = dodo_payments.products.localized_prices.update(
              "lcp_3aOOT7ebrzBOV41yL2V6s",
              product_id: "pdt_R8AWMPiV8RyJElcCKvAID"
            )

            puts(localized_price)
        - lang: PHP
          source: |-
            <?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 {
              $localizedPrice = $client->products->localizedPrices->update(
                'lcp_3aOOT7ebrzBOV41yL2V6s',
                productID: 'pdt_R8AWMPiV8RyJElcCKvAID',
                amount: 0,
              );

              var_dump($localizedPrice);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using DodoPayments.Client;

            using DodoPayments.Client.Models.Products.LocalizedPrices;


            DodoPaymentsClient client = new();


            LocalizedPriceUpdateParams parameters = new()

            {
                ProductID = "pdt_R8AWMPiV8RyJElcCKvAID",
                ID = "lcp_3aOOT7ebrzBOV41yL2V6s",
            };


            var localizedPrice = await
            client.Products.LocalizedPrices.Update(parameters);


            Console.WriteLine(localizedPrice);
        - lang: Rust
          source: |-
            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()
                    .update()
                    .product_id(product_id)
                    .id(id)
                    .body(Default::default())
                    .await?;
                println!("{result:?}");
                Ok(())
            }
components:
  schemas:
    PatchLocalizedPriceRequest:
      type: object
      properties:
        amount:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            New amount in the smallest currency unit (e.g., cents). Must be
            greater

            than zero. The currency and country_code of an existing rule cannot
            be changed.
    LocalizedPriceResponse:
      type: object
      required:
        - id
        - product_id
        - mode
        - currency
        - amount
        - created_at
        - updated_at
      properties:
        amount:
          type: integer
          format: int32
          description: Amount in the smallest currency unit (e.g., cents).
        country_code:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CountryCodeAlpha2'
              description: Country the rule applies to. Only set when mode is by_country.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the localized price was created.
        currency:
          $ref: '#/components/schemas/Currency'
          description: Currency to charge in.
        id:
          type: string
          description: Unique identifier for the localized price.
        mode:
          $ref: '#/components/schemas/PricingMode'
          description: 'Pricing mode of the rule: by_currency or by_country.'
        product_id:
          type: string
          description: Product this localized price belongs to.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the localized price was last updated.
    CountryCodeAlpha2:
      type: string
      description: ISO country code alpha2 variant
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CW
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GG
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MK
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - US
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
    Currency:
      type: string
      enum:
        - AED
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BWP
        - BYN
        - BZD
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STN
        - SVC
        - SZL
        - THB
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    PricingMode:
      type: string
      enum:
        - by_currency
        - by_country
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````