Method.from
Create a payment method definition
Creates a payment method definition.
Usage
tempo/methods.ts
import { , } from 'mppx'
const = .({
: 'charge',
: 'tempo',
: {
: {
: .({
: .(),
: .('transaction'),
}),
},
: .({
: .(),
: .(),
: .(),
}),
},
})Return type
type ReturnType = methodThe method object passed in (identity function for type inference).
Parameters
intent
- Type:
string
Intent type (for example, "charge", "session").
method
Payment method definition.
name
- Type:
string
Payment method name (for example, "tempo", "stripe").
schema
- Type:
{ credential: { payload: ZodMiniType }, request: ZodMiniType }
Zod schemas for validating Credential payloads and request parameters.