Saltar al contenido principal
PATCH
/
v1
/
billing
/
customer
Update Customer
import requests

url = "http://localhost:3000/v1/billing/customer/"

payload = {
    "address": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postal_code": "<string>",
        "state": "<string>"
    },
    "email": "jsmith@example.com",
    "name": "<string>",
    "phone": "<string>",
    "metadata": {},
    "default_payment_method_id": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "id": "<string>",
  "address": {
    "city": "<string>",
    "country": "<string>",
    "line1": "<string>",
    "line2": "<string>",
    "postal_code": "<string>",
    "state": "<string>"
  },
  "email": "jsmith@example.com",
  "name": "<string>",
  "phone": "<string>",
  "metadata": {},
  "default_payment_method_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
address
AddressSchema · object
email
string<email> | null
metadata
Metadata · object

A set of key-value pairs that can be attached to a customer object. Check more at https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-metadata

default_payment_method_id
string | null

The ID of the default payment method for the customer.

Response

Successful Response

id
string
required

Unique identifier for the customer

address
AddressSchema · object
email
string<email> | null
metadata
Metadata · object

A set of key-value pairs that can be attached to a customer object. Check more at https://docs.stripe.com/api/customers/object?api-version=2025-09-30.clover#customer_object-metadata

default_payment_method_id
string | null

The ID of the default payment method for the customer.