View as Markdown
Shift4 icon

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)

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 Charge inputs
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