Rebasely Beta: data may be purged

examples/storefront Public

YAML · 19 lines · 1.3 KiB · at c8458cc

title: Fulfilling a paid orderdescription: >-  From Stripe's payment_intent.succeeded to a shipment at the warehouse. The webhook marks the  order paid through OrdersService, which announces it on order-events. fulfilment picks the event  up, reads the order, creates the shipment with the order id as idempotency key, and records it.actors: [warehouse]steps:  - { from: stripe, to: stripe-webhook, label: "payment_intent.succeeded, signed" }  - { from: stripe-webhook, to: storefront-api, label: "OrdersService.markPaid(order, intent)" }  - { from: storefront-api, to: db, label: mark the order paid }  - { from: storefront-api, to: order-events, label: send order.paid }  - { from: order-events, to: fulfilment, label: a batch of up to 10 events }  - { from: fulfilment, to: storefront-api, label: OrdersService.forFulfilment(order) }  - { from: storefront-api, to: db, label: read the order and its lines }  - { from: fulfilment, to: warehouse, label: "POST /v1/shipments, Idempotency-Key order-<id>" }  - { from: warehouse, to: fulfilment, label: the shipment id }  - { from: fulfilment, to: storefront-api, label: "OrdersService.recordShipment(order, shipment)" }  - { from: storefront-api, to: db, label: mark the order fulfilled }  - { from: fulfilment, to: order-events, label: "ack, or retry with backoff" }