View as Markdown
SureCart icon

SureCart ACTION

Update Customer

Update an existing customer. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's SureCart account once, then configure and run Update Customer from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "surecart-update-customer",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    surecart: { authProvisionId: "apn_xxxxxxx" },
    customerId: "Customer ID",
    cascadeDefaultPaymentMethod: true,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Update Customer inputs
Property Type Description
customerId Customer ID string
The unique identifier of the customer. Use List Customers to retrieve a list of available customers.
Required
cascadeDefaultPaymentMethod Cascade Default Payment Method boolean
Set to true to cascade the default payment method to all subscriptions belonging to this customer.
Optional
name Name string
Full or business name (takes precedence over First Name / Last Name). Example: Acme Corp
Optional
firstName First Name string
The customer's first name. Example: Jane
Optional
lastName Last Name string
The customer's last name. Example: Doe
Optional
email Email string
The customer's email address. Example: customer@example.com
Optional
phone Phone string
The customer's phone number. Example: +15551234567
Optional
billingMatchesShipping Billing Matches Shipping boolean
Set to true to use the shipping address as the billing address.
Optional
taxEnabled Tax Enabled boolean
Enable or disable tax calculation for this customer.
Optional
unsubscribed Unsubscribed boolean
Set to true to mark the customer as unsubscribed from opt-in emails.
Optional
affiliation Affiliation string
Affiliation ID to associate with this customer. Example: aff_abc123
Optional
defaultPaymentMethod Default Payment Method string
UUID of the default payment method for this customer. Example: pm_abc123
Optional
billingAddress Billing Address object
The customer's billing address. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "line_2": "Apt 1", "name": "Jane Doe", "postal_code": "10001", "state": "NY" }
Optional
shippingAddress Shipping Address object
The customer's shipping address. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "line_2": "Apt 1", "name": "Jane Doe", "postal_code": "10001", "state": "NY" }
Optional
taxIdentifier Tax Identifier object
Tax identifier object with number and number_type fields. Example: { "number": "123456789", "number_type": "eu_vat" }
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
surecart-update-customer
Version
0.0.3
App
SureCart
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes