User Journey
What a person sees and what the system does when results are delivered, in version 1.
Get the receipt email
Someone who has just paidDELIVERY-V1-E7-03
Starts when: Stripe confirms the payment.
The personIs on the success page; nothing to do.
The systemPayment tells DocFlow the order is paid; DocFlow's server asks Delivery to send order_paid, using the payment event's ID so it is sent once.
The personWithin a minute, receives 'Your DocFlow results are ready' with the document name, the amount paid and a 'View your results' button.
The systemDelivery looks up the verified address, sends the email through Resend from receipts@01scale.com, signed so it passes SPF and DKIM.
The personTaps 'View your results'.
The systemThe link goes to the success page on 01scale.com, which asks them to sign in if needed. The email never contains a file link.
Result: The person has a record of the payment and a way back to the results, without any file being reachable from the email itself.
Confirmation is slow
Someone on the success pageDOCFLOW-V1-E7-01DELIVERY-V1-E7-03
Starts when: Stripe's confirmation takes longer than 30 seconds.
The personSees 'Confirming payment…', then after 30 seconds 'We'll email you when it's ready.'
The systemDocFlow's success page stops polling the order (its own job, DOCFLOW-V1-E7-01).
The personReceives the email a little later and opens the results from it.
The systemWhen the payment is confirmed, the email is sent as usual: it never depended on the page staying open.
Result: Closing the page never loses the results.
The email cannot be sent
Someone whose mailbox rejects the emailDELIVERY-V1-E7-03
Starts when: Resend reports a failure.
The personIs on the success page, downloads working.
The systemDelivery retries 3 times; all fail; the message is failed.
The personSees 'Email couldn't be sent. Your files are here to download.'
The systemThe success page reads the message's status from Delivery.
Result: The person still has the files; nothing else depends on the email.
When something goes wrong
- Resend is down or rejects the emailMessage
failed - On the success page: 'Email couldn't be sent. Your files are here to download.'
- The payment event arrives twiceSame idempotency key
- Only one email.
- The account is deleted before the email goesMessage
cancelled - Nothing is sent.
- Someone tries to send email from a browser
service_only - Refused.
User journeys on GitHub →