**Finance -> Payments**

Every payment a trader started to buy a challenge, the latest first: the ones
that went through, the ones still open, the ones that failed or were refunded,
and the free ones a coupon covered. Traders pay through your own Stripe account,
so the money goes to you and not through us. The connection to that account and
the methods a trader may pay with are the screen's settings, behind the
**Settings** button above the list.

## The list

The list opens on every payment across the whole width of the screen. Nothing
is opened until you pick one. Then the list folds to a column on the left and
the payment slides in beside it. `Esc` or the cross folds it back out.

Under the title stand the counts: how many payments there are, how many are
still open, how many failed in the last 30 days and how many were refunded. Click
a count to show only those. On a wide screen what you received in the last 30
days follows, per currency, because amounts are never added up across
currencies. When Stripe is not connected or cannot take payments yet, a line
under the counts says so, with a way to fix it.

Each row shows the trader, the short payment number, the amount (struck through
when the money never came or went back, with the price before discounts beside
it), the date, the challenge, the method and the status. `J` and `K` walk the
list and `Enter` opens the lit row. Once a payment is open, resting on another
row with `J` or `K` opens that one beside it. A right click on a row opens it,
checks it at Stripe, refunds it, opens the trader or the account, narrows the
list to that trader or that challenge, or copies the ID, the email or a link.

Each payment has its own address, so a link from a trader, the activity log or a
colleague opens straight on it, with the tab it was on.

## Search, filters and sorting

Search matches the trader's name and email, the payment number, the account
number, the coupon code and the challenge. Several words narrow further: every
one of them has to match. Start a word with `#` to look only at payment and
account numbers. A full payment, trader or account ID finds exactly that one, and
so does a Stripe checkout ID (`cs_...`), the one a trader pastes into a ticket. A
Stripe payment ID (`pi_...`) is found once the platform has seen it, which it
does when somebody opens the payment's Stripe tab, checks it or refunds it.
Press `/` anywhere to jump to the search box.

The filter menu holds the sort order and the filters:

| Filter       | What it narrows to                                                  |
| ------------ | ------------------------------------------------------------------- |
| Status       | Paid, open, failed, canceled, refunded, or everything               |
| Date         | Paid, or started when never paid, in the last 7, 30 or 90 days or year |
| Challenge    | One challenge                                                       |
| Method       | One way of paying, from the methods your traders actually used      |
| Discount     | Any discount, a coupon, a deal, an affiliate link, or none          |
| Paid or free | Paid with money, or free with a coupon                              |
| Currency     | One currency, when your payments come in more than one              |

The orders are newest, oldest, largest amount and trader. On a wide screen the
column heads sort the same way. Filters and the page live in the address bar,
so a filtered view can be bookmarked or sent to a colleague.

The download button beside the search exports exactly what the list shows,
every page of it, as a CSV with the prices, discounts, platform fee, method and
Stripe references of each payment.

## A payment

The head names a payment by its short number, which copies with a click, and its
status. Under it the amount, the challenge, the method and the day it started,
then the trader with their email, and what is worth knowing about them: a
deleted trader, one who cannot sign in, somebody on your own team, the coupon
that made it free, and how many other payments they made.

Beside it sits what the payment most likely waits for: **Check at Stripe** while
it is still open, **Refund** once it is paid. The menu behind `...` opens the
trader, the account or the challenge, narrows the list to this trader, and
copies the number, ID, email or a link.

Below that are the facts asked first: what was charged and the price before
discounts, the challenge and its size, the account it bought and how that account
stands, the method with the deal or coupon behind the price, and when it was
paid, failed or refunded, or how long it has been open.

| Tab      | What it holds                                                                                                                                                                                          |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Payment  | The price from the challenge's list price through the deal, the coupon and the affiliate discount to what the trader paid, the platform fee and what reached your Stripe account. Every moment the payment went through, the documents the trader accepted before paying with the exact text a click away, what an affiliate earned on it, and the IDs to find it by at Stripe. |
| Trader   | The trader in your books: what they spent, got refunded and were paid out, and what you kept. Then their other payments, any of which opens here in place of this one.                                  |
| Stripe   | The payment as Stripe holds it right now: what was charged and in which currency, the status, the card or method, the risk Stripe Radar gave it, what was refunded and the platform fee. A line for every way Stripe and your list disagree, and the disputes on it. |
| Activity | The purchase, the refund and every check at Stripe, newest first, with a link to the full activity log.                                                                                                |

The exact text of the accepted documents is what you send your payment provider
when a trader disputes a payment: what they agreed to, in which language, when
and from which IP address.

## Refunds

**Refund** sends the whole payment back to the trader through Stripe. It asks
first, says how much goes to whom, and asks for a reason Stripe records with it:
the trader asked, paid twice, fraud, or none. Fraud also tells Stripe to learn
from the card. Whoever may also manage trading accounts can suspend the account
the payment bought in the same step. That is off unless you switch it on,
because whether the account keeps trading is your call.

Stripe keeps its processing fee and the platform keeps its fee: both come out of
your Stripe balance. When the challenge gives its fee back with the first
payout, the dialog warns that a refund would pay it twice if that account is
ever paid out.

A refund is refused when the payment is not paid, was free, is still on its way,
or is disputed: a disputed payment is answered on the Stripe tab instead, or the
trader would get the money back twice. When Stripe had already refunded the
payment, the list is brought in line instead. Every refund is written to the
activity log with who sent it.

Only whole payments are refunded from here. A partial refund made in Stripe shows
on the Stripe tab, and the payment keeps counting as paid.

## Checking at Stripe

The webhook from Stripe and the trader's return to your site both settle a
payment. When neither arrived, a payment stays open while the money is in fact
there. **Check at Stripe** asks Stripe where the payment stands and brings the
list in line the same way they would: a paid checkout becomes paid and gets its
account, one that expired becomes failed, and a payment Stripe refunded in full
becomes refunded. A check that changes something is written to the activity log.

## Settings

**Settings** opens the screen's settings where a payment would open, with an
address of their own.

| Tab      | What it holds                                                                                                                                                                                              |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Account  | Connecting Stripe: pick the country of your business, from the countries Stripe supports, and Stripe opens the account. Then what Stripe still needs, and Stripe's own form to finish it or to change your business details and bank account later. |
| Checkout | The methods a trader may pay with, grouped as cards, wallets, bank payments, direct debits, pay later and vouchers, each with who it reaches. Every method is on until you turn it off. Cards stay on, so every trader has a way to pay. |
| Balance  | What is in your Stripe account and on its way, and the payouts Stripe sent to your bank, in Stripe's own screens.                                                                                          |
| Disputes | Every payment a trader disputed with their bank, to answer with your evidence before it closes.                                                                                                            |

The head shows whether the account takes payments, with its country, currency
and when it was connected, and under it whether it can take payments and pay out
and whether its details are complete. **Refresh** reads the account from Stripe
again. **Disconnect Stripe**, in the menu behind `...`, unlinks the account so
another one can be connected: the account stays at Stripe with its balance, and
the payments it took stay in the list.

Switching methods on or off is a change: it is saved with the save bar at the
bottom, and leaving with unsaved changes asks first. Connecting, refreshing and
disconnecting act at once.

## Who can do what

Reading the screen, its settings and the Stripe facts of a payment needs **View
Payments**. Refunding, checking at Stripe, connecting, refreshing and
disconnecting the account, changing the methods, and Stripe's own screens for the
account, the balance and disputes need **Manage Payments**: without it those
buttons and tabs are not there and the methods are shown read-only. Suspending
an account with a refund also needs **Manage Accounts**. The Activity tab needs
**View Activity Logs**, and the links to a trader, an account, a challenge, a
coupon or an affiliate follow the permissions of those screens.

## In the older designs

A firm on the OG or Tactical design keeps the screen it had: the Stripe
connection with its onboarding, balance and payouts, and the checkout methods,
on one page. The list of payments, a payment's own page, refunds, checking at
Stripe, the export and disputes are only in the new Default. A link to a
payment there lands on that screen.