Customers
Atualizar Cliente
Atualize as informações de um cliente.
PATCH
/
customers
/
{customer_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
});
const customer = await client.customers.update('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(customer.business_id);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
)
customer = client.customers.update(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
print(customer.business_id)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"),
)
customer, err := client.Customers.Update(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customer.BusinessID)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.Customer;
import com.dodopayments.api.models.customers.CustomerUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
Customer customer = client.customers().update("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.Customer
import com.dodopayments.api.models.customers.CustomerUpdateParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val customer: Customer = client.customers().update("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
customer = dodo_payments.customers.update("cus_TV52uJWWXt2yIoBBxpjaa")
puts(customer)<?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 {
$customer = $client->customers->update(
'cus_TV52uJWWXt2yIoBBxpjaa',
email: 'email',
metadata: ['foo' => 'string'],
name: 'name',
phoneNumber: 'phone_number',
);
var_dump($customer);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerUpdateParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var customer = await client.Customers.Update(parameters);
Console.WriteLine(customer);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.update()
.customer_id(customer_id)
.body(Default::default())
.await?;
println!("{result:?}");
Ok(())
}curl --request PATCH \
--url https://test.dodopayments.com/customers/{customer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"metadata": {},
"name": "<string>",
"phone_number": "<string>"
}
'{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"email": "<string>",
"name": "<string>",
"metadata": {},
"phone_number": "<string>"
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de caminho
Customer Id
Corpo
application/json
Última modificação em 28 de maio de 2026
Esta página foi útil?
Anterior
Criar Sessão do Portal do ClienteCriar uma sessão do Portal do Cliente para um cliente específico.
Próximo
⌘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 customer = await client.customers.update('cus_TV52uJWWXt2yIoBBxpjaa');
console.log(customer.business_id);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
)
customer = client.customers.update(
customer_id="cus_TV52uJWWXt2yIoBBxpjaa",
)
print(customer.business_id)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"),
)
customer, err := client.Customers.Update(
context.TODO(),
"cus_TV52uJWWXt2yIoBBxpjaa",
dodopayments.CustomerUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customer.BusinessID)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.customers.Customer;
import com.dodopayments.api.models.customers.CustomerUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
Customer customer = client.customers().update("cus_TV52uJWWXt2yIoBBxpjaa");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.customers.Customer
import com.dodopayments.api.models.customers.CustomerUpdateParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val customer: Customer = client.customers().update("cus_TV52uJWWXt2yIoBBxpjaa")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
customer = dodo_payments.customers.update("cus_TV52uJWWXt2yIoBBxpjaa")
puts(customer)<?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 {
$customer = $client->customers->update(
'cus_TV52uJWWXt2yIoBBxpjaa',
email: 'email',
metadata: ['foo' => 'string'],
name: 'name',
phoneNumber: 'phone_number',
);
var_dump($customer);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Customers;
DodoPaymentsClient client = new();
CustomerUpdateParams parameters = new()
{
CustomerID = "cus_TV52uJWWXt2yIoBBxpjaa"
};
var customer = await client.Customers.Update(parameters);
Console.WriteLine(customer);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let customer_id = "customer_id";
let result = client
.customers()
.update()
.customer_id(customer_id)
.body(Default::default())
.await?;
println!("{result:?}");
Ok(())
}curl --request PATCH \
--url https://test.dodopayments.com/customers/{customer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"metadata": {},
"name": "<string>",
"phone_number": "<string>"
}
'{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"email": "<string>",
"name": "<string>",
"metadata": {},
"phone_number": "<string>"
}