Payments

Payouts

A payout is PayMongo settling your collected payments, less fees, refunds, and disputes, to your bank account. The Payouts API is read-only and account-wide, so only the Operator runs it, from the administration area. Unlike every other list, payouts and their transactions come in token pages: instead of has_more, a page carries an opaque next cursor and totals. Call nextPage() on the page, or lazy() to walk every page, rather than passing the cursor yourself. The Playground never creates a payout, so payout identifiers are typed in rather than picked from resources it recorded.

Read the Payouts docs

Every demonstration here makes a real PayMongo API call in test mode. Nothing is simulated, and no real money moves.

List payouts

List one page of the account's payouts, with the cursor to the next page and the total count.

Test mode: Payouts exist only once PayMongo has settled payments to a bank account, so a test account may have none to list, or PayMongo may reject the request in test mode. Either way the real response is shown.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$payout = Paymongo::payouts()->list(
    params: [
        'limit' => 10,
    ],
);

Retrieve payout

Fetch one payout by its identifier, copied from the list, with its gross, fee, and net amounts.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$payout = Paymongo::payouts()->retrieve(
    id: '',
);

List payout transactions

Drill into one payout: the payments, refunds, disputes, and adjustments it settled, one token page at a time.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$payout = Paymongo::payouts()->transactions(
    payoutId: '',
    params: [
        'limit' => 10,
    ],
);

Read payout schedule

Read when PayMongo pays out: automatically on its lineup of days, or manually on request. It takes the organization identifier (org_…) from the PayMongo dashboard.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$payout = Paymongo::payouts()->schedule(
    merchantId: '',
);