Skip to content

feat: add backend REST endpoint POST /invoices/:id/release-escrow #116

Description

Description

Implement the POST /invoices/:id/release-escrow endpoint that enables an admin to trigger release_escrow on a paid invoice, transitioning it to the Released state. The endpoint enforces admin-only access and returns the updated status on success.

Requirements and context

  • Enforce admin-only authorization before submitting the transaction
  • Call release_escrow on the invoice contract via Soroban RPC
  • Handle Unauthorized(1) from the contract with a 403 response
  • Return updated invoice status (Released) and transaction hash on success
  • Follow existing project conventions

Suggested execution

  1. Fork the repo and create a branch
    git checkout -b feat/backend-post-invoice-release-escrow
    
  2. Implement changes
  3. Test and commit

Example commit message

feat: add backend REST endpoint POST /invoices/:id/release-escrow

Guidelines

  • Assignment required before starting
  • PR description must include: Closes #[issue_id]
  • Keep PR description professional and detailed

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions