feat(engine): add SEP-31 cross-border direct payment protocol support

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
fastapi, python

Research direction

Start by reading the SEP-31 specification and the existing SEP implementations under engine/app, then inspect engine/app/main.py and engine/app/sep1.py for registration and discovery patterns. The issue names engine/alembic/versions/ and engine/tests/test_sep31.py; use those to understand the data model and expected flow. Done means the listed endpoints, state transitions, signed webhooks, and full-flow tests meet the acceptance criteria.

Written by the indexing model from the issue text.

Description

complexity: high engine

Context

Cross-border payment providers on Stellar use SEP-31 (Direct Payment API) for anchor-to-anchor remittances paired with SEP-12 KYC and SEP-38 firm quotes. Adding a local SEP-31 implementation enables fintech teams to test sending-anchor flows deterministically against SEPBox.

Scope & Target Files

  • Create engine/app/sep31.py and register in engine/app/main.py
  • Update engine/app/sep1.py (stellar.toml) with DIRECT_PAYMENT_SERVER
  • Add Alembic migration in engine/alembic/versions/ and tests in engine/tests/test_sep31.py

Acceptance Criteria

  • Implement GET /sep31/info advertising receive assets (USDC, XLM) and required sender/receiver KYC field schemas.
  • Implement authenticated POST /sep31/transactions supporting amount, asset_code, quote_id, sender_id, and receiver_id.
  • Implement GET /sep31/transactions/{id} and a simulation transition endpoint for advancing pending_sender -> pending_receiver -> completed.
  • Trigger signed HMAC webhooks on state transitions and cover the full flow in engine/tests/test_sep31.py.
Dominant language
Python
Stars
0
Forks
1
Avg merge
19h 43m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sepbox-dev/sepbox

All issues in sepbox-dev/sepbox

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.