View as Markdown
SureCart icon

SureCart ACTION

Update Checkout

Update an existing checkout session. 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 Checkout 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-checkout",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    surecart: { authProvisionId: "apn_xxxxxxx" },
    checkoutId: "Checkout ID",
    refreshLineItems: 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 Checkout inputs
Property Type Description
checkoutId Checkout ID string
The unique identifier of the checkout. Use List Checkouts to retrieve a list of available checkouts.
Required
refreshLineItems Refresh Line Items boolean
Refresh all line item prices to their most recent versions.
Optional
email Email string
Customer email address. Example: customer@example.com
Optional
name Name string
Full or business name. Example: Acme Corp
Optional
firstName First Name string
Customer first name. Example: Jane
Optional
lastName Last Name string
Customer last name. Example: Doe
Optional
phone Phone string
Customer phone number. Example: +15551234567
Optional
customer Customer ID string
The unique identifier of the customer. Use List Customers to retrieve a list of available customers.
Required
taxEnabled Tax Enabled boolean
Enable or disable tax calculation.
Optional
taxBehavior Tax Behavior string
Whether tax is included in or added on top of the price.
Optional
billingMatchesShipping Billing Matches Shipping boolean
Use the shipping address as the billing address.
Optional
abandonedCheckoutEnabled Abandoned Checkout Enabled boolean
Enable or disable abandoned checkout recovery for this session.
Optional
billingAddress Billing Address object
Updated billing address. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "postal_code": "10001", "state": "NY" }
Optional
shippingAddress Shipping Address object
Updated shipping address. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "postal_code": "10001", "state": "NY" }
Optional
lineItems Line Items string
Updated line items. Example: [{ "price": "price_abc123", "quantity": 2 }]
Optional
discount Discount object
Updated coupon or promotion code. Example: { "coupon": "coup_abc123" }
Optional
taxIdentifier Tax Identifier object
Updated tax ID object. Example: { "number": "123456789", "number_type": "eu_vat" }
Optional
selectedShippingChoice Selected Shipping Choice ID string
UUID of the selected shipping option. Example: sc_abc123
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-checkout
Version
0.0.3
App
SureCart
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes