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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "surecart-create-checkout",
"configured_props": {
"surecart": { "authProvisionId": "apn_xxxxxxx" },
"email": "Email",
"name": "Name"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "surecart",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "surecart-create-checkout",
arguments: {
email: "Email",
name: "Name",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| 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
- Source
- View on GitHub ↗