View as Markdown
OPN (formerly Omise) icon

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)

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