Skip to content

Merchant API-key authentication and scoping #9

Description

@Manuel1234477

Context

Every endpoint is unauthenticated. Anyone can create payments and GET /payments returns all merchants' payments. merchant_id is just a free-text field on the request.

Tasks

  • Add a merchants table with hashed API keys.
  • Require Authorization: Bearer <key> on POST /payments and the list endpoint.
  • Derive merchant_id from the key; scope GET /payments to the authenticated merchant.

Acceptance criteria

  • Unauthenticated writes/list are rejected with 401.
  • A merchant only sees its own payments.

Metadata

Metadata

Assignees

Labels

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