CONNECT APP
Build with SureCart
Commerce
- API key
MCP
Give your agent SureCart tools
Every SureCart action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's SureCart account for each tool call — you store no tokens.
// 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()
// e.g. run Create Checkout:
const result = await mcp.callTool({
name: "surecart-create-checkout",
arguments: {
email: "Email",
name: "Name",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"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",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Checkout:
result = await session.call_tool("surecart-create-checkout", {
"email": "Email",
"name": "Name",
})API PROXY
Call the SureCart API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the SureCart API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.surecart.com/v1/account",
})
// Any allowed SureCart endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.surecart.com/v1/account
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuc3VyZWNhcnQuY29tL3YxL2FjY291bnQ?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run SureCart actions from your backend
Connect a user's SureCart account once, then run Create Checkout on their behalf from your own code — TypeScript, Python, or plain HTTP.
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",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="surecart-create-checkout",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"surecart": {"authProvisionId": "apn_xxxxxxx"},
"email": "Email",
"name": "Name",
},
)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"
}
}'TOOLS
SureCart actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Checkout
actionCreate a new checkout session. See the documentationWritev0.0.3 -
Create Coupon
actionCreate a new coupon. See the documentationWritev0.0.1 -
Create Customer
actionCreate a new customer. See the documentationWritev0.0.3 -
Create Fulfillment
actionCreate a new fulfillment for an order. See the documentationWritev0.0.3 -
Create Invoice
actionCreate a new invoice. See the documentationWritev0.0.3 -
Create Line Item
actionAdd a line item to a checkout. See the documentationWritev0.0.3 -
Create Media
actionCreate a new media object from a direct upload. See the documentationWritev0.0.3 -
Create Price
actionCreate a new price for a product. See the documentationWritev0.0.2 -
Create Product
actionCreate a new product. See the documentationWritev0.0.1 -
Create Promotion
actionCreate a new promotion. See the documentationWritev0.0.1 -
Create Refund
actionCreate a new refund for a charge. See the documentationWritev0.0.3 -
Create Return Request
actionCreate a new return request for an order. See the documentationWritev0.0.3 -
Create Subscription
actionCreate a new subscription for a customer. See the documentationWritev0.0.3 -
Create Variant
actionCreate a new variant. See the documentationWritev0.0.1 -
Delete Coupon
actionDelete a coupon by ID. See the documentationWritev0.0.1 -
Delete Customer
actionDelete a customer by ID. See the documentationWritev0.0.3 -
Delete Fulfillment
actionDelete a fulfillment by ID. See the documentationWritev0.0.3 -
Delete Product
actionDelete a product by ID. See the documentationWritev0.0.1 -
Delete Promotion
actionDelete a promotion by ID. See the documentationWritev0.0.1 -
Delete Return Request
actionDelete a return request by ID. See the documentationWritev0.0.3 -
Delete Variant
actionDelete a variant by ID. See the documentationWritev0.0.1 -
Expose Customer Media
actionRetrieve a temporary signed URL granting a customer access to a private media file. See the documentationRead-onlyv0.0.4 -
List Abandoned Checkouts
actionReturn a list of abandoned checkouts. See the documentationRead-onlyv1.0.0 -
List Cancellation Acts
actionReturn a list of cancellation acts. See the documentationRead-onlyv1.0.0 -
List Cancellation Reasons
actionReturn a list of cancellation reasons. See the documentationRead-onlyv1.0.0 -
List Charges
actionReturn a list of charges. See the documentationRead-onlyv1.0.0 -
List Checkouts
actionReturn a list of checkouts. See the documentationRead-onlyv1.0.0 -
List Coupons
actionReturn a list of coupons. See the documentationRead-onlyv0.0.1 -
List Customers
actionReturn a list of customers. See the documentationRead-onlyv1.0.0 -
List Fulfillments
actionReturn a list of fulfillments. See the documentationRead-onlyv1.0.0 -
List Invoices
actionReturn a list of invoices. See the documentationRead-onlyv1.0.0 -
List Line Items
actionRetrieves a paginated list of line items from SureCart. Use to inspect items added to checkouts, audit configurations, or filter by checkout or line item IDs; to find valid checkout IDs, use List Checkouts; returns up to 100 items per page and supports pagination parameters. See the documentationRead-onlyv1.0.1 -
List Media
actionReturn a list of media items. See the documentationRead-onlyv1.0.0 -
List Orders
actionReturn a list of orders. See the documentationRead-onlyv1.0.0 -
List Periods
actionReturn a list of subscription billing periods. See the documentationRead-onlyv1.0.0 -
List Prices
actionReturn a list of prices. See the documentationRead-onlyv1.0.0 -
List Products
actionReturn a list of products. See the documentationRead-onlyv1.0.0 -
List Promotions
actionReturn a list of promotions. See the documentationRead-onlyv0.0.1 -
List Purchases
actionReturn a list of purchases. See the documentationRead-onlyv1.0.0 -
List Refund Items
actionReturn a list of refund items. See the documentationRead-onlyv1.0.0 -
List Refunds
actionReturn a list of refunds. See the documentationRead-onlyv1.0.0 -
List Return Requests
actionReturn a list of return requests. See the documentationRead-onlyv1.0.0 -
List Shipments
actionReturn a list of shipments. See the documentationRead-onlyv1.0.0 -
List Subscriptions
actionReturn a list of subscriptions. See the documentationRead-onlyv1.0.0 -
List Trackings
actionReturn a list of tracking records. See the documentationRead-onlyv1.0.0 -
List Variants
actionReturn a list of variants. See the documentationRead-onlyv0.0.1 -
Retrieve Abandoned Checkout
actionRetrieve an abandoned checkout by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Cancellation Act
actionRetrieve a cancellation act by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Cancellation Reason
actionRetrieve a cancellation reason by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Charge
actionRetrieve a single SureCart charge by its ID. Run List Charges first to obtain a valid charge ID. See the documentationRead-onlyv0.0.2 -
Retrieve Checkout
actionRetrieve a checkout by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Coupon
actionRetrieve a single coupon by its ID. Run List Coupons first to obtain a valid coupon ID. See the documentationRead-onlyv0.0.2 -
Retrieve Customer
actionRetrieve a customer by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Fulfillment
actionRetrieve a fulfillment by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Invoice
actionRetrieve an invoice by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Line Item
actionRetrieve a line item by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Order
actionRetrieve an order by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Price
actionRetrieve a single SureCart price by its ID. Run List Prices first to obtain a valid price ID. See the documentationRead-onlyv0.0.2 -
Retrieve Product
actionRetrieve a product by ID or slug. See the documentationRead-onlyv0.0.3 -
Retrieve Promotion
actionRetrieve a single promotion by its ID. Run List Promotions first to obtain a valid promotion ID. See the documentationRead-onlyv0.0.2 -
Retrieve Purchase
actionRetrieve a purchase by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Refund
actionRetrieve a refund by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Refund Item
actionRetrieve a refund item by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Return Request
actionRetrieve a return request by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Shipment
actionRetrieve a shipment by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Subscription
actionRetrieve a subscription by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Subscription Protocol
actionRetrieve the account-level subscription protocol settings, including cancellation behavior and retry windows. See the documentationRead-onlyv0.0.3 -
Retrieve Tracking
actionRetrieve a tracking record by ID. See the documentationRead-onlyv0.0.3 -
Retrieve Variant
actionRetrieve a single variant by its ID. Run List Variants first to obtain a valid variant ID. See the documentationRead-onlyv0.0.2 -
Update Checkout
actionUpdate an existing checkout session. See the documentationWritev0.0.3 -
Update Coupon
actionUpdate an existing coupon. See the documentationWritev0.0.1 -
Update Customer
actionUpdate an existing customer. See the documentationWritev0.0.3 -
Update Fulfillment
actionUpdate an existing fulfillment. See the documentationWritev0.0.3 -
Update Line Item
actionUpdate an existing line item. See the documentationWritev0.0.2 -
Update Product
actionUpdate an existing product. See the documentationWritev0.0.1 -
Update Promotion
actionUpdate an existing promotion. See the documentationWritev0.0.1 -
Update Purchase
actionUpdate an existing purchase, such as scheduling a revocation. See the documentationWritev0.0.3 -
Update Return Request
actionUpdate an existing return request. See the documentationWritev0.0.3 -
Update Shipment
actionUpdate an existing shipment. See the documentationWritev0.0.3 -
Update Subscription
actionUpdate an existing subscription. See the documentationWritev0.0.3 -
Update Variant
actionUpdate an existing variant. See the documentationWritev0.0.1
EVENTS
SureCart triggers
Event sources your backend can deploy for users and receive through a webhook.
-
Checkout Abandoned (Instant)
triggerEmit new event when a customer abandons their checkout. See the documentationInstantv0.0.3 -
Customer Updated (Instant)
triggerEmit new event when a customer is updated. See the documentationInstantv0.0.3 -
Invoice Updated (Instant)
triggerEmit new event when an invoice is updated. See the documentationInstantv0.0.3 -
New Abandoned Checkout Recovered (Instant)
triggerEmit new event when an abandoned checkout is recovered. See the documentationInstantv0.0.3 -
New Customer Created (Instant)
triggerEmit new event when a new customer is created. See the documentationInstantv0.0.3 -
New Fulfillment Created (Instant)
triggerEmit new event when a fulfillment is created. See the documentationInstantv0.0.3 -
New Fulfillment Deleted (Instant)
triggerEmit new event when a fulfillment is deleted. See the documentationInstantv0.0.3 -
New Fulfillment Updated (Instant)
triggerEmit new event when a fulfillment is updated. See the documentationInstantv0.0.3 -
New Invoice Created (Instant)
triggerEmit new event when an invoice is created. See the documentationInstantv0.0.3 -
New Invoice Deleted (Instant)
triggerEmit new event when an invoice is deleted. See the documentationInstantv0.0.1 -
New Invoice Made Draft (Instant)
triggerEmit new event when an invoice is made a draft. See the documentationInstantv0.0.1 -
New Invoice Opened (Instant)
triggerEmit new event when an invoice is opened. See the documentationInstantv0.0.3 -
New Invoice Paid (Instant)
triggerEmit new event when an invoice is paid. See the documentationInstantv0.0.3 -
New Order Fulfilled (Instant)
triggerEmit new event when an order is fulfilled. See the documentationInstantv0.0.3 -
New Order Partially Fulfilled (Instant)
triggerEmit new event when an order is partially fulfilled. See the documentationInstantv0.0.1 -
New Order Partially Shipped (Instant)
triggerEmit new event when an order is partially shipped. See the documentationInstantv0.0.1 -
New Order Payment Failed (Instant)
triggerEmit new event when an order payment fails. See the documentationInstantv0.0.3 -
New Order Unfulfilled (Instant)
triggerEmit new event when an order is marked unfulfilled. See the documentationInstantv0.0.1 -
New Order Unshipped (Instant)
triggerEmit new event when an order is marked unshipped. See the documentationInstantv0.0.1 -
New Order Voided (Instant)
triggerEmit new event when an order is voided. See the documentationInstantv0.0.3 -
New Price Created (Instant)
triggerEmit new event when a price is created. See the documentationInstantv0.0.1 -
New Price Deleted (Instant)
triggerEmit new event when a price is deleted. See the documentationInstantv0.0.1 -
New Price Updated (Instant)
triggerEmit new event when a price is updated. See the documentationInstantv0.0.1 -
New Product Created (Instant)
triggerEmit new event when a product is created. See the documentationInstantv0.0.3 -
New Purchase Created (Instant)
triggerEmit new event when a purchase is created. See the documentationInstantv0.0.3 -
New Refund Created (Instant)
triggerEmit new event when a refund is created. See the documentationInstantv0.0.3 -
New Return Request Created (Instant)
triggerEmit new event when a return request is created. See the documentationInstantv0.0.3 -
New Subscription Made Trialing (Instant)
triggerEmit new event when a subscription enters trial status. See the documentationInstantv0.0.3 -
Order Created (Instant)
triggerEmit new event when an order is created. See the documentationInstantv0.0.3 -
Order Delivered (Instant)
triggerEmit new event when an order is delivered. See the documentationInstantv0.0.3 -
Order Made Processing (Instant)
triggerEmit new event when an order is moved to processing status. See the documentationInstantv0.0.3 -
Order Paid (Instant)
triggerEmit new event when an order is paid. See the documentationInstantv0.0.3 -
Order Shipped (Instant)
triggerEmit new event when an order is shipped. See the documentationInstantv0.0.3 -
Product Deleted (Instant)
triggerEmit new event when a product is deleted. See the documentationInstantv0.0.3 -
Product Stock Adjusted (Instant)
triggerEmit new event when a product's stock is adjusted. See the documentationInstantv0.0.3 -
Product Updated (Instant)
triggerEmit new event when a product is updated. See the documentationInstantv0.0.3 -
Purchase Invoked (Instant)
triggerEmit new event when a purchase is invoked. See the documentationInstantv0.0.3 -
Purchase Revoked (Instant)
triggerEmit new event when a purchase is revoked. See the documentationInstantv0.0.3 -
Purchase Updated (Instant)
triggerEmit new event when a purchase is updated. See the documentationInstantv0.0.3 -
Refund Succeeded (Instant)
triggerEmit new event when a refund succeeds. See the documentationInstantv0.0.3 -
Return Request Completed (Instant)
triggerEmit new event when a return request is completed. See the documentationInstantv0.0.3 -
Return Request Deleted (Instant)
triggerEmit new event when a return request is deleted. See the documentationInstantv0.0.3 -
Return Request Opened (Instant)
triggerEmit new event when a return request is opened. See the documentationInstantv0.0.3 -
Return Request Updated (Instant)
triggerEmit new event when a return request is updated. See the documentationInstantv0.0.3 -
Subscription Canceled (Instant)
triggerEmit new event when a subscription is canceled. See the documentationInstantv0.0.3 -
Subscription Completed (Instant)
triggerEmit new event when a subscription is completed. See the documentationInstantv0.0.3 -
Subscription Created (Instant)
triggerEmit new event when a subscription is created. See the documentationInstantv0.0.3 -
Subscription Made Active (Instant)
triggerEmit new event when a subscription is made active. See the documentationInstantv0.0.3 -
Subscription Renewal Reminder Sent (Instant)
triggerEmit new event when a subscription renewal reminder is sent. See the documentationInstantv0.0.3 -
Subscription Renewed (Instant)
triggerEmit new event when a subscription is renewed. See the documentationInstantv0.0.3 -
Subscription Set to Cancel (Instant)
triggerEmit new event when a subscription is set to cancel. See the documentationInstantv0.0.3 -
Subscription Updated (Instant)
triggerEmit new event when a subscription is updated. See the documentationInstantv0.0.3 -
Variant Stock Adjusted (Instant)
triggerEmit new event when a product variant's stock is adjusted. See the documentationInstantv0.0.3
- App slug
- surecart
- Authentication
- API key
- Categories
- Commerce
- Actions
- 81
- Triggers
- 53
- API proxy
- Available