View as Markdown
SureCart icon

SureCart ACTION

Create Checkout

Create a new 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 Create 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-create-checkout",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    surecart: { authProvisionId: "apn_xxxxxxx" },
    email: "Email",
    name: "Name",
  },
})

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.

Create Checkout inputs
Property Type Description
email Email string
Customer email address. Example: customer@example.com
Optional
name Name string
Full or business name (takes precedence over First/Last 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
currency Currency string
ISO 4217 currency code for this checkout. Example: usd
Optional
liveMode Live Mode boolean
Filter by live mode (true) or test mode (false).
Optional
taxEnabled Tax Enabled boolean
Enable tax calculation for this checkout.
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 abandoned checkout recovery tracking for this session.
Optional
externalUrl External URL string
Custom redirect URL for the customer portal. Example: https://mysite.com/thank-you
Optional
groupKey Group Key string
Dynamic grouping identifier for this checkout. Example: campaign_summer_2024
Optional
billingAddress Billing Address object
Billing address object. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "postal_code": "10001", "state": "NY" }
Optional
shippingAddress Shipping Address object
Shipping address object. Example: { "city": "New York", "country": "US", "line_1": "123 Main St", "postal_code": "10001", "state": "NY" }
Optional
lineItems Line Items string
Initial line items for this checkout. Each item requires a price UUID. Example: [{ "price": "price_abc123", "quantity": 1 }]
Optional
discount Discount object
Coupon or promotion code to apply. Example: { "coupon": "coup_abc123" }
Optional
taxIdentifier Tax Identifier object
Tax ID object with number and number_type. Example: { "number": "123456789", "number_type": "eu_vat" }
Optional
selectedShippingChoice Selected Shipping Choice ID string
UUID of the pre-selected shipping option. Example: sc_abc123
Optional
metadata Metadata object
Additional key-value metadata. Example: { "source": "email_campaign" }
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-create-checkout
Version
0.0.3
App
SureCart
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes