OPN (formerly Omise) ACTION
Create a New Charge
Create a new charge for a specific customer and amount through the OPN platform. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's OPN (formerly Omise) account once, then configure and run Create a New 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: "omise-create-charge",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
omise: { authProvisionId: "apn_xxxxxxx" },
amount: 10,
currency: "Currency",
},
})
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": "omise-create-charge",
"configured_props": {
"omise": { "authProvisionId": "apn_xxxxxxx" },
"amount": 10,
"currency": "Currency"
}
}'// 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": "omise",
},
},
},
)
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: "omise-create-charge",
arguments: {
amount: 10,
currency: "Currency",
},
})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 |
|---|---|---|
amount Amount | integer | The amount for the charge in the smallest currency unit. Required |
currency Currency | string | The currency for the charge Required |
authorizationType Authorization Type | string | The type of the authorization for the charge. Optional |
capture Capture | boolean | Whether the charge is set to be automatically captured (paid). Valid only for credit and debit card charges. Optional |
customer Customer ID | string | The unique identifier for a customer Optional Dynamic |
card Card | string | An unused token identifier to add as a new card to the charge. Optional Dynamic |
description Description | string | Charge description. Supplying information about a purchase (e.g. number of items, type of items, date of delivery) helps Opn Payments better conduct fraud analysis. Optional |
expiresAt Expires At | string | UTC datetime of desired charge expiration in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). Optional |
ip IP | string | IP address to attach to the charge. Supplying the customer's real IP address helps Opn Payments better conduct fraud analysis. May be IPv4 or IPv6. Optional |
metadata Metadata | object | Custom metadata (e.g. {"answer": 42}) for charge. Optional |
platformFee Platform Fee | object | Platform fee object as fixed amount and/or percentage of charge amount. Optional |
returnUri Return URI | string | The URI to which the customer is redirected after authorization. Required if card and customer are not present. Optional |
source Source ID | string | A valid source identifier or source object Optional |
webhookEndpoints Webhook Endpoints | string[] | URLs to which charge notifications are to be sent. This field can contain a maximum of two URLs. Optional |
zeroInterestInstallments Zero Interest Installments | boolean | Whether merchant absorbs the interest for installment payments; must match value in associated source. 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
- omise-create-charge
- Version
- 0.0.2
- App
- OPN (formerly Omise)
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗