63 lines
No EOL
20 KiB
XML
63 lines
No EOL
20 KiB
XML
<?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;background:#FFFFFF;" 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(#fmn5h8ng0q9e7)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="127" x="317.5" y="1002.9805"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="324.5" y="1023.5156">stripe-payments</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="578" y="85.5352">Tracking</text><path d="M593,36 C593,26 611,26 611,26 C611,26 629,26 629,36 L629,62 C629,72 611,72 611,72 C611,72 593,72 593,62 L593,36 " fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" style="stroke:#000000;stroke-width:1.5;"/><path d="M593,36 C593,46 611,46 611,46 C611,46 629,46 629,36 " fill="none" style="stroke:#000000;stroke-width:1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="578" y="1016.5156">Tracking</text><path d="M593,1029.4688 C593,1019.4688 611,1019.4688 611,1019.4688 C611,1019.4688 629,1019.4688 629,1029.4688 L629,1055.4688 C629,1065.4688 611,1065.4688 611,1065.4688 C611,1065.4688 593,1065.4688 593,1055.4688 L593,1029.4688 " fill="#FEFECE" filter="url(#fmn5h8ng0q9e7)" style="stroke:#000000;stroke-width:1.5;"/><path d="M593,1029.4688 C593,1039.4688 611,1039.4688 611,1039.4688 C611,1039.4688 629,1039.4688 629,1029.4688 " fill="none" style="stroke:#000000;stroke-width:1.5;"/><rect fill="#EEEEEE" filter="url(#fmn5h8ng0q9e7)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="664" x="0" y="119.1436"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="664" y1="119.1436" y2="119.1436"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="664" y1="122.1436" y2="122.1436"/><rect fill="#EEEEEE" filter="url(#fmn5h8ng0q9e7)" height="23.3105" style="stroke:#000000;stroke-width:2.0;" width="168" x="248" y="108.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="150" x="254" y="125.0566">Subscription activated</text><path d="M10,148.7988 L72,148.7988 L72,155.7988 L62,165.7988 L10,165.7988 L10,148.7988 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="77.9316" style="stroke:#000000;stroke-width:2.0;" width="448.5" x="10" y="148.7988"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="25" y="162.3672">alt</text><polygon fill="#A80036" points="371,183.4199,381,187.4199,371,191.4199,375,187.4199" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="377" y1="187.4199" y2="187.4199"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="241" x="56" y="182.6777">customer.subscription.created (active)</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="10" x2="458.5" y1="196.4199" y2="196.4199"/><polygon fill="#A80036" points="371,214.7305,381,218.7305,371,222.7305,375,218.7305" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="377" y1="218.7305" y2="218.7305"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="246" x="56" y="213.9883">customer.subscription.updated (active)</text><polygon fill="#A80036" points="599,251.041,609,255.041,599,259.041,603,255.041" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="255.041" y2="255.041"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="390" y="250.2988">Store event</text><path d="M170,270.041 L232,270.041 L232,277.041 L222,287.041 L170,287.041 L170,270.041 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="249.0605" style="stroke:#000000;stroke-width:2.0;" width="484" x="170" y="270.041"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="185" y="283.6094">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="105" x="247" y="282.6758">[New subscription]</text><polygon fill="#A80036" points="599,304.6621,609,308.6621,599,312.6621,603,308.6621" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="308.6621" y2="308.6621"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="173" x="390" y="303.9199">Mark subscription as active</text><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="425" y1="337.9727" y2="337.9727"/><line style="stroke:#A80036;stroke-width:1.0;" x1="425" x2="425" y1="337.9727" y2="350.9727"/><line style="stroke:#A80036;stroke-width:1.0;" x1="384" x2="425" y1="350.9727" y2="350.9727"/><polygon fill="#A80036" points="394,346.9727,384,350.9727,394,354.9727,390,350.9727" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="97" x="390" y="333.2305">Fulfill purchase</text><polygon fill="#A80036" points="599,376.2832,609,380.2832,599,384.2832,603,380.2832" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="380.2832" y2="380.2832"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="163" x="390" y="375.541">Mark purchase as fulfilled</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="170" x2="654" y1="389.2832" y2="389.2832"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="182" x="175" y="399.918">[Subscription already processed]</text><path d="M180,408.2383 L180,509.2383 L582,509.2383 L582,418.2383 L572,408.2383 L180,408.2383 " fill="#FBFB77" filter="url(#fmn5h8ng0q9e7)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M572,408.2383 L572,418.2383 L582,418.2383 L572,408.2383 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="177" x="186" y="425.8066">One of the following is true:</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="0" x="190" y="441.1172"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="371" x="186" y="456.4277">- Already received an activation event for this subscription</text><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="381" x="186" y="471.7383">- Already receieved a termination event for this subscription</text><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="339" x="186" y="487.0488">- Subscription already marked as active or terminated</text><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="239" x="186" y="502.3594">- Purchase already marked as fulfilled</text><rect fill="#EEEEEE" filter="url(#fmn5h8ng0q9e7)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="664" x="0" y="546.7568"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="664" y1="546.7568" y2="546.7568"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="664" y1="549.7568" y2="549.7568"/><rect fill="#EEEEEE" filter="url(#fmn5h8ng0q9e7)" height="23.3105" style="stroke:#000000;stroke-width:2.0;" width="181" x="241.5" y="536.1016"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="163" x="247.5" y="552.6699">Subscription terminated</text><path d="M10,576.4121 L72,576.4121 L72,583.4121 L62,593.4121 L10,593.4121 L10,576.4121 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="77.9316" style="stroke:#000000;stroke-width:2.0;" width="448.5" x="10" y="576.4121"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="25" y="589.9805">alt</text><polygon fill="#A80036" points="371,611.0332,381,615.0332,371,619.0332,375,615.0332" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="377" y1="615.0332" y2="615.0332"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="310" x="56" y="610.291">customer.subscription.updated (no longer active)</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="10" x2="458.5" y1="624.0332" y2="624.0332"/><polygon fill="#A80036" points="371,642.3438,381,646.3438,371,650.3438,375,646.3438" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="49" x2="377" y1="646.3438" y2="646.3438"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="201" x="56" y="641.6016">subscription_schedule.canceled</text><polygon fill="#A80036" points="599,678.6543,609,682.6543,599,686.6543,603,682.6543" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="682.6543" y2="682.6543"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="390" y="677.9121">Store event</text><path d="M173,697.6543 L235,697.6543 L235,704.6543 L225,714.6543 L173,714.6543 L173,697.6543 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="289.3262" style="stroke:#000000;stroke-width:2.0;" width="481" x="173" y="697.6543"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="188" y="711.2227">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="117" x="250" y="710.2891">[Active subscription]</text><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="425" y1="736.2754" y2="736.2754"/><line style="stroke:#A80036;stroke-width:1.0;" x1="425" x2="425" y1="736.2754" y2="749.2754"/><line style="stroke:#A80036;stroke-width:1.0;" x1="384" x2="425" y1="749.2754" y2="749.2754"/><polygon fill="#A80036" points="394,745.2754,384,749.2754,394,753.2754,390,749.2754" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="176" x="390" y="731.5332">Trigger unsubscribe actions</text><polygon fill="#A80036" points="599,774.5859,609,778.5859,599,782.5859,603,778.5859" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="778.5859" y2="778.5859"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="204" x="390" y="773.8438">Mark subscription as terminated</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="173" x2="654" y1="787.5859" y2="787.5859"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="180" x="178" y="798.2207">[Subscription not yet processed]</text><path d="M189,806.541 L189,877.541 L573,877.541 L573,816.541 L563,806.541 L189,806.541 " fill="#FBFB77" filter="url(#fmn5h8ng0q9e7)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M563,806.541 L563,816.541 L573,816.541 L563,806.541 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="177" x="195" y="824.1094">One of the following is true:</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="0" x="199" y="839.4199"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="363" x="195" y="854.7305">- Did not receive an activation event for this subscription</text><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="182" x="195" y="870.041">- Subscription is not tracked</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="173" x2="654" y1="887.7832" y2="887.7832"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="186" x="178" y="898.418">[Subscription already terminated]</text><path d="M183,906.7383 L183,977.7383 L578,977.7383 L578,916.7383 L568,906.7383 L183,906.7383 " fill="#FBFB77" filter="url(#fmn5h8ng0q9e7)" style="stroke:#A80036;stroke-width:1.0;"/><path d="M568,906.7383 L568,916.7383 L578,916.7383 L568,906.7383 " fill="#FBFB77" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="177" x="189" y="924.3066">One of the following is true:</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="0" x="193" y="939.6172"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="374" x="189" y="954.9277">- Already received a termination event for this subscription</text><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="281" x="189" y="970.2383">- Subscription already marked as terminated</text><!--MD5=[7b8e6af856ef6a0a58034df8cb639863]
|
|
@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.10(Mon Aug 30 09:43:48 EDT 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> |