Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

600 B
Raw Blame
import { SubscriberArgs, SubscriberConfig } from "@medusajs/framework"
import { OrderGroupWorkflowEvents } from "@mercurjs/core/workflows"

import { syncCapturesWorkflow } from "../workflows/captures/workflows/sync-captures"

export default async function stripeOrderGroupCreatedHandler({
  event,
  container,
}: SubscriberArgs<{ id: string }>) {
  await syncCapturesWorkflow(container).run({ input: { order_group_ids: [event.data.id] } })
}

export const config: SubscriberConfig = {
  event: OrderGroupWorkflowEvents.CREATED,
  context: { subscriberId: "stripe-connector-order-group-created" },
}