@medusajs/core-flows
Version:
Set of workflow definitions for Medusa
33 lines • 1.18 kB
TypeScript
import { WebhookActionResult } from "@medusajs/types";
/**
* The data to process a payment from a webhook action.
*/
export interface ProcessPaymentWorkflowInput extends WebhookActionResult {
}
export declare const processPaymentWorkflowId = "process-payment-workflow";
/**
* This workflow processes a payment to either complete its associated cart,
* capture the payment, or authorize the payment session. It's used when a
* [Webhook Event is received](https://docs.medusajs.com/resources/commerce-modules/payment/webhook-events).
*
* You can use this workflow within your own customizations or custom workflows, allowing you
* to process a payment in your custom flows based on a webhook action.
*
* @example
* const { result } = await processPaymentWorkflow(container)
* .run({
* input: {
* action: "captured",
* data: {
* session_id: "payses_123",
* amount: 10
* }
* }
* })
*
* @summary
*
* Process a payment based on a webhook event.
*/
export declare const processPaymentWorkflow: import("@medusajs/workflows-sdk").ReturnWorkflow<ProcessPaymentWorkflowInput, unknown, any[]>;
//# sourceMappingURL=process-payment.d.ts.map