Scopes:
checkout and refunds.write for the client’s payment. payees.write to create the person, payees.credit to record the earning, payouts.write to pay it out. Live credits and payouts use your secret key. Amounts are whole cents in USD.Who does what
The client’s payment and every other funded job share one Business balance. Keep that balance at least as large as every job you have not released, plus every payee balance you have not paid out. If it falls short, the payout waits with
pending_reason: funds and goes out on its own when you add money. The person sees Pending. They are not told your balance is short.
Take the client’s payment
Create the payee once, when the person joins. Open a link session and passclient_secret to EasnerConnect.connect. Later jobs use the same payee.
When the client pays, create a Checkout session for the full job amount and store cs_… on the job. Mark the job funded on checkout.completed. Treat the money as spendable on payment.available. Leave the payee balance at zero while the work is in progress.
A credit with available_at in the future is only a time hold. It ends when that time arrives. The client’s approval is your status change, so create the credit at release.
Release
Credit the person’s share. Keep your fee on the Business balance by leaving it out of the credit. Onereference per job means a retry returns the first credit.
payout.completed. A failed payout restores both balances.
To let the person withdraw on your site, open a payout session and pass client_secret to EasnerConnect.withdraw.
A job with milestones is one Checkout payment and several releases. Credit each milestone as it is approved, with its own reference (job-1042-m1, job-1042-m2). The unreleased remainder stays in your job record.
Cancel or dispute
You decide the outcome. Easner does not sit between the client and the person. If you have not credited the person, leave the payee balance at zero and refund the Checkout payment. See Refunds. The API refund works until the payment has been credited to your Business balance. After that,POST /v1/refunds returns 409 already_settled and support does the refund. A job that runs for days is usually already settled by the time the client cancels.
If you already credited them and the credit is still available, reverse it with POST /v1/credits/:id/reversals. If the payout already completed, the reversal is recovered from their later credits. It does not pull the money back out of their Easner account.
Expected
- Store the Checkout session on the job, and the credit id on the release.
- Credit the person’s share when you release. Credit nothing while the job is only funded.
- Your fee is the amount you do not credit.
- Run reconciliation after each release day. Send what your ledger says each person is owed and has not been paid.
- A payout caught short of funds waits. It does not fail, and it does not take money from another person’s Easner account.
