@using BTCPayServer.Client.Models @using BTCPayServer.Payouts @using BTCPayServer.Views.Stores @using BTCPayServer.Client @model BTCPayServer.Models.WalletViewModels.PayoutsModel @inject PayoutMethodHandlerDictionary PayoutHandlers; @{ var storeId = Context.GetRouteValue("storeId") as string; ViewData.SetActivePage(StoreNavPages.Payouts, string.IsNullOrEmpty(Model.PullPaymentName) ? StringLocalizer["Payouts"] : StringLocalizer["Payouts for pull payment {0}", Model.PullPaymentName], Context.GetStoreData().Id); Model.PaginationQuery ??= new Dictionary(); Model.PaginationQuery.Add("pullPaymentId", Model.PullPaymentId); Model.PaginationQuery.Add("payoutMethodId", Model.PayoutMethodId); Model.PaginationQuery.Add("payoutState", Model.PayoutState); var stateActions = new List<(string Action, string Text)>(); if (PayoutMethodId.TryParse(Model.PayoutMethodId, out var payoutMethodId)) { var payoutHandler = PayoutHandlers.TryGet(payoutMethodId); if (payoutHandler is null) return; stateActions.AddRange(payoutHandler.GetPayoutSpecificActions().Where(pair => pair.Key == Model.PayoutState).SelectMany(pair => pair.Value)); } switch (Model.PayoutState) { case PayoutState.AwaitingApproval: if (!Model.HasPayoutProcessor) stateActions.Add(("approve-pay", StringLocalizer["Approve & Send"])); stateActions.Add(("approve", StringLocalizer["Approve"])); stateActions.Add(("cancel", StringLocalizer["Cancel"])); break; case PayoutState.AwaitingPayment: if (!Model.HasPayoutProcessor) stateActions.Add(("pay", StringLocalizer["Send"])); stateActions.Add(("cancel", StringLocalizer["Cancel"])); stateActions.Add(("mark-paid", StringLocalizer["Mark as already paid"])); break; } } @section PageHeadContent { } @section PageFootContent { }

Payouts allow you to process pull payments, in the form of refunds, salary payouts, or withdrawals. You can also configure payout processors to automate payouts.

Learn More
@if (!Model.HasPayoutProcessor) { }
@if (Model.Payouts.Any()) {
@if (stateActions.Any()) { } @if (Model.PayoutState != PayoutState.AwaitingApproval) { } @if (stateActions.Any()) { } @for (var i = 0; i < Model.Payouts.Count; i++) { var pp = Model.Payouts[i]; @if (stateActions.Any()) { } @if (Model.PayoutState != PayoutState.AwaitingApproval) { } }
Date
Source Destination AmountTransaction
0 selected
@foreach (var action in stateActions) { }
@pp.Date.ToBrowserDate() @if (pp.SourceLink is not null && pp.Source is not null) { @pp.Source } else if (pp.Source is not null) { @pp.Source } @pp.Amount @if (!string.IsNullOrEmpty(pp.ProofLink)) { Link }
} else {

There are no payouts matching these criteria.

}