%%{init: { "theme": "base", "themeVariables": { "fontSize": "18px", "background": "transparent", "actorBkg": "#038851", "actorTextColor": "#ffffff", "actorBorder": "#026139", "actorLineColor": "#94a3b8", "signalColor": "#64748b", "signalTextColor": "#059669", "noteBkgColor": "#e6f4ee", "noteTextColor": "#02502f", "noteBorderColor": "#038851", "activationBkgColor": "#c6ebdc", "activationBorderColor": "#026139", "sequenceNumberColor": "#ffffff" }, "sequence": { "useMaxWidth": true, "actorMargin": 70, "width": 150, "height": 60, "boxMargin": 12, "noteMargin": 14, "messageMargin": 50, "diagramMarginX": 20, "diagramMarginY": 20, "actorFontSize": 18, "actorFontWeight": 700, "noteFontSize": 15, "noteFontFamily": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", "messageFontSize": 16, "messageFontWeight": 700, "noteAlign": "left", "mirrorActors": false } }}%%
sequenceDiagram
autonumber
participant Deliverect
participant Payment Platform
Note over Deliverect,Payment Platform: 1. Register profile
Deliverect->>Payment Platform: POST register with gatewayProfileId accountId apiKey and webhookUrl
Payment Platform-->>Deliverect: 200 OK with requestPaymentURL refundPaymentURL and unregisterGatewayProfileURL
Note over Deliverect,Payment Platform: 2. Request payment
Deliverect->>Payment Platform: POST requestPaymentURL with amount currency reference returnUrl and payer
Payment Platform-->>Deliverect: 200 OK with update status and optional redirect action
Note over Deliverect,Payment Platform: 3. Async payment update when status was pending
Payment Platform->>Deliverect: POST payment events endpoint payment_update authorized or refused
Deliverect-->>Payment Platform: 200 OK
Note over Deliverect,Payment Platform: 4. Refund payment
Deliverect->>Payment Platform: POST refundPaymentURL with paymentId and amount
Payment Platform-->>Deliverect: 200 OK with status succeeded pending or failed
Note over Deliverect,Payment Platform: 5. Async refund update when status was pending
Payment Platform->>Deliverect: POST payment events endpoint refund_update succeeded or failed
Deliverect-->>Payment Platform: 200 OK
Note over Deliverect,Payment Platform: 6. Unregister profile
Deliverect->>Payment Platform: POST unregisterGatewayProfileURL with accountId and gatewayProfileId
Payment Platform-->>Deliverect: 200 OK