roam/aweber/stripe-purchase-subscription-events.svg

63 lines
20 KiB
XML
Raw Normal View History

2021-09-01 20:57:39 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="1088px" preserveAspectRatio="none" style="width:671px;height:1088px;" version="1.1" viewBox="0 0 671 1088" width="671px" zoomAndPan="magnify"><defs><filter height="300%" id="fmn5h8ng0q9e7" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#fmn5h8ng0q9e7)" height="77.9316" style="stroke:#000000;stroke-width:2.0;" width="448.5" x="10" y="148.7988"/><rect fill="#FFFFFF" height="31.3105" style="stroke:none;stroke-width:1.0;" width="448.5" x="10" y="195.4199"/><rect fill="#FFFFFF" filter="url(#fmn5h8ng0q9e7)" height="249.0605" style="stroke:#000000;stroke-width:2.0;" width="484" x="170" y="270.041"/><rect fill="#FFFFFF" height="130.8184" style="stroke:none;stroke-width:1.0;" width="484" x="170" y="388.2832"/><rect fill="#FFFFFF" filter="url(#fmn5h8ng0q9e7)" height="77.9316" style="stroke:#000000;stroke-width:2.0;" width="448.5" x="10" y="576.4121"/><rect fill="#FFFFFF" height="31.3105" style="stroke:none;stroke-width:1.0;" width="448.5" x="10" y="623.0332"/><rect fill="#FFFFFF" filter="url(#fmn5h8ng0q9e7)" height="289.3262" style="stroke:#000000;stroke-width:2.0;" width="481" x="173" y="697.6543"/><rect fill="#FFFFFF" height="100.1973" style="stroke:none;stroke-width:1.0;" width="481" x="173" y="786.5859"/><rect fill="#FFFFFF" height="100.1973" style="stroke:none;stroke-width:1.0;" width="481" x="173" y="886.7832"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="49" x2="49" y1="88.4883" y2="1003.9805"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="111" x2="111" y1="88.4883" y2="1003.9805"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="382.5" x2="382.5" y1="88.4883" y2="1003.9805"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="611" x2="611" y1="88.4883" y2="1003.9805"/><rect fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="54" x="20" y="53"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="27" y="73.5352">Stripe</text><rect fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="54" x="20" y="1002.9805"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="27" y="1023.5156">Stripe</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="88" y="85.5352">Client</text><ellipse cx="111" cy="15" fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M111,23 L111,50 M98,31 L124,31 M111,50 L98,65 M111,50 L124,65 " fill="none" filter="url(#fmn5h8ng0q9e7)" style="stroke:#A80036;stroke-width:2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="88" y="1016.5156">Client</text><ellipse cx="111" cy="1029.4688" fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M111,1037.4688 L111,1064.4688 M98,1045.4688 L124,1045.4688 M111,1064.4688 L98,1079.4688 M111,1064.4688 L124,1079.4688 " fill="none" filter="url(#fmn5h8ng0q9e7)" style="stroke:#A80036;stroke-width:2.0;"/><rect fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="127" x="317.5" y="53"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="324.5" y="73.5352">stripe-payments</text><rect fill="#FEFECE" filter="url(#fmn5h8
@startuml
participant Stripe
actor Client
participant "stripe-payments" as Backend
database Tracking
== Subscription activated ==
alt
Stripe - -> Backend : customer.subscription.created (active)
else
Stripe - -> Backend : customer.subscription.updated (active)
end
Backend -> Tracking : <font color="green">Store event</font>
alt New subscription
Backend -> Tracking : <font color="blue">Mark subscription as active</font>
Backend -> Backend : Fulfill purchase
Backend -> Tracking : <font color="blue">Mark purchase as fulfilled</font>
else Subscription already processed
note over Backend
One of the following is true:
<font color="green">- Already received an activation event for this subscription</font>
<font color="green">- Already receieved a termination event for this subscription</font>
<font color="blue">- Subscription already marked as active or terminated</font>
<font color="blue">- Purchase already marked as fulfilled</font>
end note
end
== Subscription terminated ==
alt
Stripe - -> Backend : customer.subscription.updated (no longer active)
else
Stripe - -> Backend : subscription_schedule.canceled
end
Backend -> Tracking : <font color="green">Store event</font>
alt Active subscription
Backend -> Backend : Trigger unsubscribe actions
Backend -> Tracking : <font color="blue">Mark subscription as terminated</font>
else Subscription not yet processed
note over Backend
One of the following is true:
<font color="green">- Did not receive an activation event for this subscription</font>
<font color="blue">- Subscription is not tracked</font>
end note
else Subscription already terminated
note over Backend
One of the following is true:
<font color="green">- Already received a termination event for this subscription</font>
<font color="blue">- Subscription already marked as terminated</font>
end note
end
@enduml
PlantUML version 1.2021.00(Sun Jan 10 05:25:05 EST 2021)
(GPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>