platform
platform copied to clipboard
Document the payment sequence
sequenceDiagram
autonumber
participant /dashboard
participant PaymentProvider as Payment Provider
participant /api/billing/webhooks/preorder
participant PostgreSQL
link /dashboard: Source @ https://github.com/WebstoneHQ/platform/blob/main/services/website/src/routes/dashboard.svelte
link PaymentProvider: Website @ https://paddle.com/
link /api/billing/webhooks/preorder: Source @ https://github.com/WebstoneHQ/platform/blob/main/services/website/src/routes/api/billing/webhooks/preorder.ts
Note over /dashboard: User clicks "Enroll now!"
/dashboard->>PaymentProvider: Display the Overlay Checkout
Note over PaymentProvider: User completes payment
PaymentProvider->>/api/billing/webhooks/preorder: POST request with order information
/api/billing/webhooks/preorder->>PostgreSQL: Persist payment information