-
Notifications
You must be signed in to change notification settings - Fork 30
SDP 1644 create direct payment #693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Something went wrong with PR preview build please check |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 When I try to trigger a Direct Payment, I get the following error
time="2025-06-12T20:52:00.315-07:00" level=error msg="Payment e66f5d1a-cd8c-4a3f-a1db-ab3678c130fd is not ready for sending. Error=disbursement for payment e66f5d1a-cd8c-4a3f-a1db-ab3678c130fd is not in STARTED state" pid=51849
The issue comes from payment_to_submitter_service.go
L 178
if p.PaymentType == data.PaymentTypeDisbursement || p.Disbursement != nil {
p.Disbursement here is not nil, there is an empty disbursement object.
internal/serve/serve.go
Outdated
r.With(middleware.RequirePermission( | ||
data.WritePayments, | ||
middleware.AnyRoleMiddleware(authManager, data.OwnerUserRole, data.FinancialControllerUserRole, data.BusinessUserRole), | ||
)).Patch("/retry", paymentsHandler.RetryPayments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 r.Post("/", paymentsHandler.PostPayment)
is missing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧪 Can you also add a test to Test_handleHTTP_authenticatedEndpoints
for POST /payments
stellar-disbursement-platform-backend-preview is available here: |
stellar-disbursement-platform-backend-preview is available here: |
What
Implements
POST /payments
API endpoint for direct payments to existing receivers without creating disbursements. Adds new "DIRECT" payment type with flexible entity reference system (by ID, email, phone, wallet address) and integrates with existing payment processing pipeline.Why
Enables on-demand, single payments for API integrations that don't fit the batch disbursement workflow. Critical for use cases like instant payments, manual corrections, and external system integrations that need immediate payment capability without disbursement overhead.
Known limitations
Checklist
SDP-1234: Add new feature
orChore: Refactor package xyz
format. The Jira ticket code was included if available.CHANGELOG.md
is updated (if applicable)