@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, $"Payouts{(string.IsNullOrEmpty(Model.PullPaymentName) ? string.Empty : " for pull payment " + 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", "Approve & Send")); stateActions.Add(("approve", "Approve")); stateActions.Add(("cancel", "Cancel")); break; case PayoutState.AwaitingPayment: if (!Model.HasPayoutProcessor) stateActions.Add(("pay", "Send")); stateActions.Add(("cancel", "Cancel")); stateActions.Add(("mark-paid", "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 this criteria.

}