n8n-nodes-base
Version:
Base nodes of n8n
64 lines (60 loc) • 1.8 kB
text/typescript
/**
* Stripe Node - Version 1
* Discriminator: resource=source, operation=create
*/
interface Credentials {
stripeApi: CredentialReference;
}
/** Create a charge */
export type StripeV1SourceCreateParams = {
resource: 'source';
operation: 'create';
/**
* ID of the customer to attach the source to
*/
customerId?: string | Expression<string> | PlaceholderValue;
/**
* Type of source (payment instrument) to create
* @default wechat
*/
type?: 'wechat' | Expression<string>;
/**
* Amount in cents to be collected for this charge, e.g. enter <code>100</code> for $1.00
* @default 0
*/
amount?: number | Expression<number>;
/**
* Three-letter ISO currency code, e.g. <code>USD</code> or <code>EUR</code>. It must be a <a href="https://stripe.com/docs/currencies">Stripe-supported currency</a>. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
currency?: string | Expression<string>;
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** Set of key-value pairs to attach to the source to create
* @default {}
*/
metadata?: {
/** Metadata Properties
*/
metadataProperties?: Array<{
/** Key
*/
key?: string | Expression<string> | PlaceholderValue;
/** Value
*/
value?: string | Expression<string> | PlaceholderValue;
}>;
};
/** Arbitrary text to display on the customer's statement
*/
statement_descriptor?: string | Expression<string> | PlaceholderValue;
};
};
export type StripeV1SourceCreateNode = {
type: 'n8n-nodes-base.stripe';
version: 1;
credentials?: Credentials;
config: NodeConfig<StripeV1SourceCreateParams>;
};