40 lines
No EOL
15 KiB
XML
40 lines
No EOL
15 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="781px" preserveAspectRatio="none" style="width:668px;height:781px;background:#FFFFFF;" version="1.1" viewBox="0 0 668 781" width="668px" zoomAndPan="magnify"><defs><filter height="300%" id="f15kx617gahtg6" 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(#f15kx617gahtg6)" height="208.1289" style="stroke:#000000;stroke-width:2.0;" width="644" x="10" y="193.4199"/><rect fill="#FFFFFF" height="73.5762" style="stroke:none;stroke-width:1.0;" width="644" x="10" y="327.9727"/><rect fill="#FFFFFF" filter="url(#f15kx617gahtg6)" height="77.9316" style="stroke:#000000;stroke-width:2.0;" width="448.5" x="10" y="500.8594"/><rect fill="#FFFFFF" height="31.3105" style="stroke:none;stroke-width:1.0;" width="448.5" x="10" y="547.4805"/><line style="stroke:#A80036;stroke-width:1.0;" x1="49" x2="49" y1="88.4883" y2="408.5488"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="49" x2="49" y1="408.5488" y2="436.5488"/><line style="stroke:#A80036;stroke-width:1.0;" x1="49" x2="49" y1="436.5488" y2="465.8594"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="49" x2="49" y1="465.8594" y2="493.8594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="49" x2="49" y1="493.8594" y2="696.7227"/><line style="stroke:#A80036;stroke-width:1.0;" x1="223" x2="223" y1="88.4883" y2="408.5488"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="223" x2="223" y1="408.5488" y2="436.5488"/><line style="stroke:#A80036;stroke-width:1.0;" x1="223" x2="223" y1="436.5488" y2="465.8594"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="223" x2="223" y1="465.8594" y2="493.8594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="223" x2="223" y1="493.8594" y2="696.7227"/><line style="stroke:#A80036;stroke-width:1.0;" x1="382.5" x2="382.5" y1="88.4883" y2="408.5488"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="382.5" x2="382.5" y1="408.5488" y2="436.5488"/><line style="stroke:#A80036;stroke-width:1.0;" x1="382.5" x2="382.5" y1="436.5488" y2="465.8594"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="382.5" x2="382.5" y1="465.8594" y2="493.8594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="382.5" x2="382.5" y1="493.8594" y2="696.7227"/><line style="stroke:#A80036;stroke-width:1.0;" x1="611" x2="611" y1="88.4883" y2="408.5488"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="611" x2="611" y1="408.5488" y2="436.5488"/><line style="stroke:#A80036;stroke-width:1.0;" x1="611" x2="611" y1="436.5488" y2="465.8594"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="611" x2="611" y1="465.8594" y2="493.8594"/><line style="stroke:#A80036;stroke-width:1.0;" x1="611" x2="611" y1="493.8594" y2="696.7227"/><rect fill="#FEFECE" filter="url(#f15kx617gahtg6)" 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(#f15kx617gahtg6)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="54" x="20" y="695.7227"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="27" y="716.2578">Stripe</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="200" y="85.5352">Client</text><ellipse cx="223" cy="15" fill="#FEFECE" filter="url(#f15kx617gahtg6)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M223,23 L223,50 M210,31 L236,31 M223,50 L210,65 M223,50 L236,65 " fill="none" filter="url(#f15kx617gahtg6)" style="stroke:#A80036;stroke-width:2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="40" x="200" y="709.2578">Client</text><ellipse cx="223" cy="722.2109" fill="#FEFECE" filter="url(#f15kx617gahtg6)" rx="8" ry="8" style="stroke:#A80036;stroke-width:2.0;"/><path d="M223,730.2109 L223,757.2109 M210,738.2109 L236,738.2109 M223,757.2109 L210,772.2109 M223,757.2109 L236,772.2109 " fill="none" filter="url(#f15kx617gahtg6)" style="stroke:#A80036;stroke-width:2.0;"/><rect fill="#FEFECE" filter="url(#f15kx617gahtg6)" 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(#f15kx617gahtg6)" height="30.4883" style="stroke:#A80036;stroke-width:1.5;" width="127" x="317.5" y="695.7227"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="113" x="324.5" y="716.2578">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(#f15kx617gahtg6)" 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="709.2578">Tracking</text><path d="M593,722.2109 C593,712.2109 611,712.2109 611,712.2109 C611,712.2109 629,712.2109 629,722.2109 L629,748.2109 C629,758.2109 611,758.2109 611,758.2109 C611,758.2109 593,758.2109 593,748.2109 L593,722.2109 " fill="#FEFECE" filter="url(#f15kx617gahtg6)" style="stroke:#000000;stroke-width:1.5;"/><path d="M593,722.2109 C593,732.2109 611,732.2109 611,732.2109 C611,732.2109 629,732.2109 629,722.2109 " fill="none" style="stroke:#000000;stroke-width:1.5;"/><polygon fill="#A80036" points="60,115.7988,50,119.7988,60,123.7988,56,119.7988" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="222" y1="119.7988" y2="119.7988"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="150" x="66" y="115.0566">Create payment method</text><polygon fill="#A80036" points="371,145.1094,381,149.1094,371,153.1094,375,149.1094" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="223" x2="377" y1="149.1094" y2="149.1094"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="105" x="230" y="144.3672">Initiate purchase</text><polygon fill="#A80036" points="599,174.4199,609,178.4199,599,182.4199,603,178.4199" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="178.4199" y2="178.4199"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="167" x="390" y="173.6777">Store incomplete purchase</text><path d="M10,193.4199 L72,193.4199 L72,200.4199 L62,210.4199 L10,210.4199 L10,193.4199 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="208.1289" style="stroke:#000000;stroke-width:2.0;" width="644" x="10" y="193.4199"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="25" y="206.9883">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="89" x="87" y="206.0547">[Non-recurring]</text><polygon fill="#A80036" points="60,228.041,50,232.041,60,236.041,56,232.041" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="382" y1="232.041" y2="232.041"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="121" x="66" y="227.2988">Create invoice item</text><polygon fill="#A80036" points="60,257.3516,50,261.3516,60,265.3516,56,261.3516" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="382" y1="261.3516" y2="261.3516"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="89" x="66" y="256.6094">Create invoice</text><polygon fill="#A80036" points="60,286.6621,50,290.6621,60,294.6621,56,290.6621" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="382" y1="290.6621" y2="290.6621"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="66" y="285.9199">Pay invoice</text><polygon fill="#A80036" points="599,315.9727,609,319.9727,599,323.9727,603,319.9727" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="319.9727" y2="319.9727"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="160" x="390" y="315.2305">Store completed payment</text><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="10" x2="654" y1="328.9727" y2="328.9727"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="63" x="15" y="339.6074">[Recurring]</text><polygon fill="#A80036" points="60,360.2383,50,364.2383,60,368.2383,56,364.2383" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="54" x2="382" y1="364.2383" y2="364.2383"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="123" x="66" y="359.4961">Create subscription</text><polygon fill="#A80036" points="599,389.5488,609,393.5488,599,397.5488,603,393.5488" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="393.5488" y2="393.5488"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="156" x="390" y="388.8066">Store active subscription</text><polygon fill="#A80036" points="371,453.8594,381,457.8594,371,461.8594,375,457.8594" 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="457.8594" y2="457.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="140" x="56" y="453.1172">Subscription activated</text><path d="M10,500.8594 L72,500.8594 L72,507.8594 L62,517.8594 L10,517.8594 L10,500.8594 " 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="500.8594"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="17" x="25" y="514.4277">alt</text><polygon fill="#A80036" points="371,535.4805,381,539.4805,371,543.4805,375,539.4805" 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="539.4805" y2="539.4805"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="310" x="56" y="534.7383">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="548.4805" y2="548.4805"/><polygon fill="#A80036" points="371,566.791,381,570.791,371,574.791,375,570.791" 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="570.791" y2="570.791"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="201" x="56" y="566.0488">subscription_schedule.canceled</text><polygon fill="#A80036" points="599,603.1016,609,607.1016,599,611.1016,603,607.1016" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="607.1016" y2="607.1016"/><text fill="#008000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="70" x="390" y="602.3594">Store event</text><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="425" y1="636.4121" y2="636.4121"/><line style="stroke:#A80036;stroke-width:1.0;" x1="425" x2="425" y1="636.4121" y2="649.4121"/><line style="stroke:#A80036;stroke-width:1.0;" x1="384" x2="425" y1="649.4121" y2="649.4121"/><polygon fill="#A80036" points="394,645.4121,384,649.4121,394,653.4121,390,649.4121" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="176" x="390" y="631.6699">Trigger unsubscribe actions</text><polygon fill="#A80036" points="599,674.7227,609,678.7227,599,682.7227,603,678.7227" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="383" x2="605" y1="678.7227" y2="678.7227"/><text fill="#0000FF" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="204" x="390" y="673.9805">Mark subscription as terminated</text><!--MD5=[8099e34c003701f9167a3acc5077181d]
|
|
@startuml
|
|
participant Stripe
|
|
actor Client
|
|
participant "stripe-payments" as Backend
|
|
database Tracking
|
|
|
|
Client -> Stripe : Create payment method
|
|
Client -> Backend: Initiate purchase
|
|
Backend -> Tracking : <font color="blue">Store incomplete purchase</font>
|
|
alt Non-recurring
|
|
Backend -> Stripe : Create invoice item
|
|
Backend -> Stripe : Create invoice
|
|
Backend -> Stripe : Pay invoice
|
|
Backend -> Tracking : <font color="blue">Store completed payment</font>
|
|
else Recurring
|
|
Backend -> Stripe : Create subscription
|
|
Backend -> Tracking : <font color="blue">Store active subscription</font>
|
|
end
|
|
...
|
|
Stripe - -> Backend : Subscription activated
|
|
...
|
|
alt
|
|
Stripe - -> Backend : customer.subscription.updated (no longer active)
|
|
else
|
|
Stripe - -> Backend : subscription_schedule.canceled
|
|
end
|
|
Backend -> Tracking : <font color="green">Store event</font>
|
|
Backend -> Backend : Trigger unsubscribe actions
|
|
Backend -> Tracking : <font color="blue">Mark subscription as terminated</font>
|
|
@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> |