Skip to content

[Multi-Tenant] Tenanted Incoming Payments #3117

@njlie

Description

@njlie

Incoming Payments should become tenanted as per the Multi-Tenancy design, and will be logically separated in the backend database by a tenantId row that serves as a foreign key on the tenants table.

  • Add tenantId row to incomingPayments table that is required and maps to an id on the tenants table.
  • Add tenantId to database queries on incoming payments
  • Acquire tenantId from request headers on routes involving incoming payments and pass them into incoming payment service logic.
  • Include tenantId in path of incoming payment URL. e.g. http://exampe-rafiki/:tenantId/incoming-payments/:id
  • Additionally, we should be able to support fetching an incoming payment with and without tenant id:
    • for GraphQL Admin API requests to get (and update) an incoming payment, tenantId will be provided in those requests, and it should be used when getting (or updating) the incoming payments.
    • However, because we are able to make payments across tenanted resources (ie. an outgoing payment on tenant A can pay into an incoming payment on tenant B), we should also have the functionality to to look up the incoming payment just by the Id, tenant-agnostic

Prerequisites

Metadata

Metadata

Assignees

Labels

pkg: backendChanges in the backend package.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions