1. Customers
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Customers

Update

$kit->customers->update()#

Updates an existing customer. Only the fields you pass are changed; omitted fields are left untouched in Stripe.

Signature#

Parameters#

FieldTypeDescription
emailstringReplaces the customer's email. Validated and lowercased the same way as on create().
namestringReplaces the customer's name.
phonestringReplaces the phone number.
descriptionstringReplaces the internal description.
addressarrayReplaces the full address object; you cannot patch a single sub-field, send the complete address.
defaultPaymentMethodIdstringSets the customer's default payment method for future invoices and off-session charges.
metadataarray<string,string>Replaces the customer's metadata. Unlike create(), this does not merge with a source key, whatever you pass here becomes the full metadata object in Stripe.

Example request#

Example response#

Errors#

ExceptionWhen
StripeOperationErrorThe customer ID does not exist, or Stripe rejects a field, for example an invalid email.

Notes#

If a storage adapter is configured, the updated record is persisted via saveCustomer() automatically.
To change the default payment method independently of any other customer field, use $kit->paymentMethods->setDefault() instead, it is a more direct call for that one purpose.
Previous
Create
Next
Sync
Built with