Shift4 ACTION
Create Charge
Creates a new charge object. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Shift4 account once, then configure and run Create Charge 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: "shift4-create-charge",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
shift4: { authProvisionId: "apn_xxxxxxx" },
customerId: "Customer ID",
amount: 10,
},
})
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": "shift4-create-charge",
"configured_props": {
"shift4": { "authProvisionId": "apn_xxxxxxx" },
"customerId": "Customer ID",
"amount": 10
}
}'// 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": "shift4",
},
},
},
)
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: "shift4-create-charge",
arguments: {
customerId: "Customer ID",
amount: 10,
},
})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 |
|---|---|---|
customerId Customer ID | string | Identifier of the customer that will be associated with this charge. Optional Dynamic |
amount Amount | integer | The charge amount in minor units of a given currency. For example, 10€ is represented as '1000'. Required |
currency Currency | string | The charge currency represented as a three-letter ISO currency code. Required |
type Type | string | The type of the charge. Optional |
description Description | string | A description for the charge. Optional |
card Card | string | Card token, card details or card identifier. Optional |
paymentMethod Payment Method | string | Payment method details or identifier. Optional |
flow Flow | object | Details specific to the payment method charge. Optional |
captured Captured | boolean | Whether this charge should be immediately captured. Optional |
shipping Shipping | object | Shipping details. Sample object: {name: "string", address: {line1: "string", line2: "string", zip: "string", city: "string", state: "string", country: "country represented as two-letter ISO country code"}} Optional |
billing Billing | object | Billing details. Sample object: {name: "string", email: "string", address: {line1: "string", line2: "string", zip: "string", city: "string", state: "string", country: "country represented as two-letter ISO country code"}, vat: "string"} Optional |
threeDSecure 3D Secure | object | 3D Secure options. Optional |
metadata Metadata | object | Metadata object. 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
- shift4-create-charge
- Version
- 0.0.2
- App
- Shift4
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗