SureCart ACTION
Create Price
Create a new price for a product. 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 Price 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-price",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
surecart: { authProvisionId: "apn_xxxxxxx" },
product: "Product ID",
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-price",
"configured_props": {
"surecart": { "authProvisionId": "apn_xxxxxxx" },
"product": "Product ID",
"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-price",
arguments: {
product: "Product ID",
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 |
|---|---|---|
product Product ID | string | The unique identifier of the product. Use List Products to retrieve a list of available products. Required |
name Name | string | Display name for the price shown to customers. Example: Monthly Plan Optional |
amount Amount | integer | Price in cents for fixed-price plans. Leave empty when Ad Hoc is true to allow custom amounts. Example: 9900 for $99.00 Optional |
currency Currency | string | Three-letter ISO 4217 currency code. Defaults to the account currency. Example: usd Optional |
adHoc Ad Hoc | boolean | Set to true to allow customers to enter a custom amount instead of a fixed price. Optional |
adHocMinAmount Ad Hoc Minimum Amount | integer | Minimum custom amount in cents when Ad Hoc is enabled. Example: 500 for $5.00 Optional |
adHocMaxAmount Ad Hoc Maximum Amount | integer | Maximum custom amount in cents when Ad Hoc is enabled. Example: 100000 for $1,000.00 Optional |
scratchAmount Scratch Amount | integer | Original pre-discount price in cents, shown as a strikethrough. Example: 19900 for $199.00 Optional |
recurringInterval Recurring Interval | string | Billing frequency for a subscription price. Optional |
recurringIntervalCount Recurring Interval Count | integer | Number of intervals between billings. Example: 3 with Recurring Interval month bills every 3 months. Optional |
recurringPeriodCount Recurring Period Count | integer | Total number of billing periods before the subscription completes (installment plans). Example: 12 for a 12-month plan. Optional |
trialDurationDays Trial Duration (Days) | integer | Number of free trial days before billing begins. Example: 14 Optional |
setupFeeEnabled Setup Fee Enabled | boolean | Set to true to charge a one-time setup fee alongside the recurring price. Optional |
setupFeeAmount Setup Fee Amount | integer | One-time setup fee in cents. Example: 2500 for $25.00 Optional |
setupFeeName Setup Fee Name | string | Display label for the setup fee. Example: Onboarding Fee Optional |
setupFeeTrialEnabled Setup Fee Trial Enabled | boolean | Set to true to defer the setup fee until the trial period ends. Optional |
licenseActivationLimit License Activation Limit | integer | Maximum number of license activations allowed. Defaults to the product setting if not set. Example: 5 Optional |
revokeAfterDays Revoke After (Days) | integer | Number of days after which access is automatically revoked. Example: 365 Optional |
revokePurchasesOnCompleted Revoke Purchases On Completed | boolean | Set to true to revoke access when an installment subscription completes. Optional |
restartSubscriptionOnCompleted Restart Subscription On Completed | boolean | Set to true to automatically restart the subscription after an installment plan completes. Optional |
portalSubscriptionUpdateEnabled Portal Subscription Update Enabled | boolean | Set to false to prevent customers from switching to this price in the customer portal. Optional |
renewalPrice Renewal Price ID | string | UUID of the price to transition to upon renewal. Example: price_abc123 Optional |
position Position | integer | Display ordering position among prices. Example: 1 Optional |
archived Archived | boolean | Set to true to create the price in an archived state. Optional |
metadata Metadata | object | Additional key-value metadata. Example: { "sku": "PLAN-001" } 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-price
- Version
- 0.0.2
- App
- SureCart
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗