/api/v1/merchant
Endpoints
List transactions
GET /api/v1/merchant/transactions
Get transaction
GET /api/v1/merchant/transactions/:id
Returns line items, fees, payer metadata, and linked payment link or subscription when present.
Refund
POST /api/v1/merchant/transactions/:id/refunds
Portal users need finance role. Merchant API keys have full tenant access.
Settlements and withdrawals
GET /api/v1/merchant/settlements lists merchant payouts.
POST /api/v1/merchant/settlements/withdraw withdraws to a linked MoMo or bank account.
Withdraw body: { "amount", "currency", "payoutMethodId" }.
Summary KPIs
GET /api/v1/merchant/summary?days=30&seriesDays=7
Returns volume, fees, status breakdowns, and time series for the resolved TEST or LIVE environment.

