CONNECT APP
Build with Paystack
Commerce
- API key
MCP
Give your agent Paystack tools
Every Paystack 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 Paystack 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": "paystack",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Add Split Code to Virtual Terminal:
const result = await mcp.callTool({
name: "paystack-add-split-code-to-virtual-terminal",
arguments: {
code: "Virtual Terminal Code",
splitCode: "Split Code",
},
})# 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": "paystack",
}
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 Add Split Code to Virtual Terminal:
result = await session.call_tool("paystack-add-split-code-to-virtual-terminal", {
"code": "Virtual Terminal Code",
"splitCode": "Split Code",
})API PROXY
Call the Paystack API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Paystack 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.paystack.co/customer",
})
// Any allowed Paystack 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.paystack.co/customer
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkucGF5c3RhY2suY28vY3VzdG9tZXI?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Paystack actions from your backend
Connect a user's Paystack account once, then run Add Split Code to Virtual Terminal 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: "paystack-add-split-code-to-virtual-terminal",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
paystack: { authProvisionId: "apn_xxxxxxx" },
code: "Virtual Terminal Code",
splitCode: "Split Code",
},
})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="paystack-add-split-code-to-virtual-terminal",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"paystack": {"authProvisionId": "apn_xxxxxxx"},
"code": "Virtual Terminal Code",
"splitCode": "Split Code",
},
)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": "paystack-add-split-code-to-virtual-terminal",
"configured_props": {
"paystack": { "authProvisionId": "apn_xxxxxxx" },
"code": "Virtual Terminal Code",
"splitCode": "Split Code"
}
}'TOOLS
Paystack actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Add Split Code to Virtual Terminal
actionAdd Split Code to Virtual Terminal. See the documentationWritev0.0.2 -
Assign Destination to Virtual Terminal
actionAdd a destination (WhatsApp number) to a Virtual Terminal on your integration. See the documentationWritev0.0.2 -
Charge Authorization
actionCharge a reusable authorization. See the documentationWritev0.0.6 -
Create Customer
actionCreate a customer on your integration. See the documentationWritev0.0.1 -
Create Virtual Terminal
actionCreate a Virtual Terminal on your integration. See the documentationWritev0.0.2 -
Deactivate Authorization
actionDeactivate an authorization when the card needs to be forgotten. See the documentationWritev0.0.2 -
Deactivate Virtual Terminal
actionDeactivate a Virtual Terminal on your integration. See the documentationWritev0.0.2 -
Direct Debit Activation Charge
actionTrigger an activation charge on an inactive mandate on behalf of your customer. See the documentationWritev0.0.2 -
Export Transactions
actionExport transactions from Paystack. See the documentation (https://paystack.com/docs/api/transaction/#export)Writev0.0.4 -
Fetch Customer
actionGet details of a customer on your integration. See the documentationRead-onlyv0.0.1 -
Fetch Mandate Authorizations
actionGet the list of direct debit mandates associated with a customer. See the documentationRead-onlyv0.0.1 -
Fetch Transaction
actionFetch a single transaction. See the documentationRead-onlyv0.0.7 -
Fetch Virtual Terminal
actionFetch a Virtual Terminal on your integration. See the documentationRead-onlyv0.0.2 -
Initialize Direct Debit
actionInitialize the process of linking an account to a customer for Direct Debit transactions. See the documentationWritev0.0.1 -
Initialize Transaction
actionInitializes a new transaction on Paystack. See the documentationWritev0.1.5 -
List Customer Code Options
actionRetrieves available options for the Customer Code field.Read-onlyv0.0.1 -
List Customer ID Options
actionRetrieves available options for the Customer ID field.Read-onlyv0.0.1 -
List Customers
actionList customers on your integration. See the documentationRead-onlyv0.0.1 -
List Reference Options
actionRetrieves available options for the Reference field.Read-onlyv0.0.1 -
List Split Code Options
actionRetrieves available options for the Split Code field.Read-onlyv0.0.1 -
List Transaction ID Options
actionRetrieves available options for the Transaction ID field.Read-onlyv0.0.1 -
List Transactions
actionList transactions carried out on your integration. See the documentationRead-onlyv0.0.7 -
List Virtual Terminal Code Options
actionRetrieves available options for the Virtual Terminal Code field.Read-onlyv0.0.1 -
List Virtual Terminals
actionList Virtual Terminals on your integration. See the documentationRead-onlyv0.0.2 -
Remove Split Code from Virtual Terminal
actionRemove Split Code from Virtual Terminal. See the documentationWritev0.0.2 -
Set Customer Risk Action
actionWhitelist or blacklist a customer on your integration. See the documentationWritev0.0.1 -
Unassign Destination from Virtual Terminal
actionUnassign a destination (WhatsApp Number) from a Virtual Terminal on your integration. See the documentationWritev0.0.2 -
Update Customer
actionUpdate a customer's details on your integration. See the documentationWritev0.0.1 -
Update Virtual Terminal
actionUpdate a Virtual Terminal on your integration. See the documentationWritev0.0.2 -
Validate Customer
actionValidate a customer's identity. See the documentationWritev0.0.1 -
Verify Transaction
actionConfirm the status of a transaction. See the documentationRead-onlyv0.0.7
EVENTS
Paystack triggers
Event sources your backend can deploy for users and receive through a webhook.
No Paystack triggers are available yet.
MULTI-APP
Use Paystack with other popular apps
Most products don't stop at one integration. Pair Paystack with the other apps your users rely on, and ship use cases that span both.
- App slug
- paystack
- Authentication
- API key
- Categories
- Commerce
- Actions
- 31
- Triggers
- 0
- API proxy
- Available