SDP 1685 add create receiver endpoint - #687
Merged
Merged
Conversation
dpohr
had a problem deploying
to
Anchor Integration Tests
May 20, 2025 15:48 — with
GitHub Actions
Failure
dpohr
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 15:48 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Anchor Integration Tests
May 20, 2025 16:16 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 16:16 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 17:57 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Anchor Integration Tests
May 20, 2025 17:57 — with
GitHub Actions
Inactive
dpohr
marked this pull request as ready for review
May 21, 2025 08:25
marcelosalloum
requested review from
Copilot,
marcelosalloum,
marwen-abid and
philipliu
May 22, 2025 22:43
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new POST /receivers endpoint to create receiver records with associated verification and wallet data through a transactional API call.
- Introduces endpoint registration in serve.go with role-based middleware.
- Implements request validation, receiver creation, and insertion of associated verifications and wallets.
- Adds unit tests to validate proper request handling and error responses.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/serve/serve_test.go | Adds a new test case for POST /receivers. |
| internal/serve/serve.go | Registers the new POST /receivers endpoint with appropriate middleware. |
| internal/serve/httphandler/receiver_handler_test.go | Refactors test setup for receiver endpoints using a common DB connection helper. |
| internal/serve/httphandler/receiver_handler.go | Implements validation logic and transactional creation for receivers, verifications, and wallets. |
| internal/serve/httphandler/receiver_create_handler_test.go | Provides comprehensive tests for validation errors and successful receiver creation. |
philipliu
reviewed
May 23, 2025
dpohr
temporarily deployed
to
Anchor Integration Tests
May 23, 2025 17:21 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 23, 2025 17:21 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 26, 2025 09:41 — with
GitHub Actions
Inactive
dpohr
temporarily deployed
to
Anchor Integration Tests
May 26, 2025 09:41 — with
GitHub Actions
Inactive
philipliu
added a commit
that referenced
this pull request
Jun 13, 2025
* SDP-1689 Prevent unregistering user-managed wallets and wallets with in-progress payments. (#683) * Feat: Turn on service account use in the ap deployment in the helm chart (#679) ### What Turn on the service account in the helm chart for the ap deployment ### Why Currently the serviceaccount name is commented out while all the other deployments have the serviceaccountname set up * Bump vite (#654) * Bump the minor-and-patch group across 1 directory with 6 updates (#690) * Bump the minor-and-patch group across 1 directory with 6 updates Bumps the minor-and-patch group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) | `0.32.0` | `0.33.0` | | [github.com/nyaruka/phonenumbers](https://github.com/nyaruka/phonenumbers) | `1.6.1` | `1.6.3` | | [github.com/segmentio/kafka-go](https://github.com/segmentio/kafka-go) | `0.4.47` | `0.4.48` | | [github.com/twilio/twilio-go](https://github.com/twilio/twilio-go) | `1.25.1` | `1.26.1` | | [golang.org/x/crypto](https://github.com/golang/crypto) | `0.37.0` | `0.38.0` | | [golang.org/x/net](https://github.com/golang/net) | `0.39.0` | `0.40.0` | Updates `github.com/getsentry/sentry-go` from 0.32.0 to 0.33.0 - [Release notes](https://github.com/getsentry/sentry-go/releases) - [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-go@v0.32.0...v0.33.0) Updates `github.com/nyaruka/phonenumbers` from 1.6.1 to 1.6.3 - [Release notes](https://github.com/nyaruka/phonenumbers/releases) - [Changelog](https://github.com/nyaruka/phonenumbers/blob/main/CHANGELOG.md) - [Commits](nyaruka/phonenumbers@v1.6.1...v1.6.3) Updates `github.com/segmentio/kafka-go` from 0.4.47 to 0.4.48 - [Release notes](https://github.com/segmentio/kafka-go/releases) - [Commits](segmentio/kafka-go@v0.4.47...v0.4.48) Updates `github.com/twilio/twilio-go` from 1.25.1 to 1.26.1 - [Release notes](https://github.com/twilio/twilio-go/releases) - [Changelog](https://github.com/twilio/twilio-go/blob/main/CHANGES.md) - [Commits](twilio/twilio-go@v1.25.1...v1.26.1) Updates `golang.org/x/crypto` from 0.37.0 to 0.38.0 - [Commits](golang/crypto@v0.37.0...v0.38.0) Updates `golang.org/x/net` from 0.39.0 to 0.40.0 - [Commits](golang/net@v0.39.0...v0.40.0) --- updated-dependencies: - dependency-name: github.com/getsentry/sentry-go dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: github.com/nyaruka/phonenumbers dependency-version: 1.6.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: github.com/segmentio/kafka-go dependency-version: 0.4.48 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: github.com/twilio/twilio-go dependency-version: 1.26.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: golang.org/x/crypto dependency-version: 0.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: golang.org/x/net dependency-version: 0.40.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG.md * Update go.list --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Salloum <[email protected]> * SDP 1685 add create receiver endpoint (#687) * SDP 1685 add create receiver endpoint * SDP 1685 receiver shadowing fix * SDP-1685 discussions fix * Add badges to the README.md file (#691) ### What Add Several badges to the README.md: <img width="969" alt="Screenshot 2025-05-23 at 2 19 10 PM" src="https://github.com/user-attachments/assets/d0a45bb4-4d35-4ccb-a9c7-798e16845ffe" /> This includes the DeepWiki badge, which ensures DeepWiki will re-index this repo once a week. ### Why 📈 Kaizen * chore: bump version to 3.7.1 * Fix stellar.expert pubnet URL configuration in helm chart * SDP-1630: add api key auth to all SDP endpoints (#681) * SDP-1630 add api keys middleware * SDP-1630 fix existing tests * SDP 1630 merge develop * SDP 1630 * SDP 1630 gofumpt * SDP 1630 * SDP 1630 changelog update * SDP 1630 keys parsing improve * SDP 1630 update remote debug template file * SDP-1630 resolve discussions * SDP 1630 resolve discussion * SDP 1686 create wallet endpoint update (#696) * SDP 1686 create wallet endpoint update * SDP-1686 * SDP-1686 fix test * SDP-1686 * SDP 1687 update wallet patch endpoint (#697) * SDP 1686 create wallet endpoint update * SDP-1686 * SDP-1686 fix test * SDP-1687 update PATCH endpoint * SDP 1687 update chengelog * SDP 1687 * SDP-1687 linter fix * SDP-1687 discussions fix * SDP-1687 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Marwen Abid <[email protected]> Co-authored-by: Traver Tischio <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Salloum <[email protected]> Co-authored-by: Denys <[email protected]> Co-authored-by: Marcelo Salloum dos Santos <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implementation of a new
POST /receiversendpoint that allows creating receiver records via the API. The endpoint supports creating a receiver with associated verification data and/or wallet information, providing a programmatic way to register receivers that can later be referenced in payments or disbursements.Key features:
Why
This endpoint complements the existing receiver reference model used in payments and disbursements. It provides an API-first approach to receiver management, enhancing the platform's capabilities for integration with external systems.
Known limitations
Checklist
SDP-1234: Add new featureorChore: Refactor package xyzformat. The Jira ticket code was included if available.CHANGELOG.mdis updated (if applicable)