Skip to Content
Paycose Docs
Payout batches

Payout batches

The payout_batch object

A payout batch pays many payees from one request. Each row becomes a payout to a connected account, sent through your own payout provider or paid by you by hand, and the batch reports their progress.

Attributes

  • idstringRequired

    Unique identifier for the object.

  • objectstringRequired

    String naming the object's type.

  • livemodebooleanRequired

    true when the object exists in live mode, false in test mode.

  • kindstringRequired

    Kind of batch.

    • disbursement

      Your batch of payments to payees.

    • settlement

      A batch of payouts of merchant balances that Paycose assembles.

  • fundingstringRequired

    Where the batch's money comes from.

    • merchant_rail

      Paid from your own payout provider account.

    • balance

      Paid from Paycose balances.

  • statusstringRequired

    Status of the batch, worked out from its payouts and rows.

    • awaiting_approval

      Created and waiting to be approved.

    • processing

      Approved; rows are still becoming payouts or payouts are still on their way.

    • completed

      Every row became a payout and every payout was paid.

    • completed_with_failures

      Finished, but some payouts failed or were canceled, or some rows could not be paid.

    • canceled

      Canceled before any of its payouts was approved, sent or paid.

    • empty

      The batch has no payouts and no rows.

  • application_country_idstring

    Identifier of the country setup of your application that the batch belongs to.

  • accountstring

    ID of the account (acct_…) that owns the batch.

  • currencystringRequired

    Three-letter ISO 4217 currency code, in lowercase.

  • methodstring

    How the batch's payouts are paid.

    • provider

      Each payout is sent through your payout provider.

    • manual

      You pay each payee yourself and upload proof of each transfer.

  • providerstring

    Payout provider chosen when the batch was approved; omitted when none was chosen.

  • referencestring

    Reference recorded when the batch was approved; omitted when none.

  • descriptionstring

    Description given when the batch was created; omitted when empty.

  • purposestring

    Whether the batch's payouts also lower what you owe the connected accounts.

    • disbursement

      The payouts do not change what you owe connected accounts.

    • owed_settlement

      Each payout also records a settlement that lowers what you owe the connected account.

  • row_countintegerRequired

    Number of rows sent when the batch was created.

  • rows_doneintegerRequired

    Number of rows finished: turned into a payout, or given up on.

  • rows_failedintegerRequired

    Number of rows given up on without a payout.

  • progressobjectRequired

    Counts and totals of the batch's payouts by status.

    Show child attributes
    • progress.scaling_factorintegerRequired

      Number of smallest units in one unit of the batch currency, for example 100 for THB.

    • progress.countintegerRequired

      Number of payouts in the batch.

    • progress.amountintegerRequired

      Sum of the payouts' amount, in the currency's smallest unit.

    • progress.net_amountintegerRequired

      Sum of the payouts' net_amount, in the currency's smallest unit.

    • progress.waitingintegerRequired

      Number of payouts still waiting for approval.

    • progress.blockedintegerRequired

      Number of waiting payouts whose last attempt failed; they wait until the batch is retried.

    • progress.in_flightintegerRequired

      Number of payouts approved and on their way (status pending or sent).

    • progress.paidintegerRequired

      Number of paid payouts.

    • progress.paid_amountintegerRequired

      Sum of net_amount over the paid payouts, in the currency's smallest unit.

    • progress.failedintegerRequired

      Number of failed payouts.

    • progress.canceledintegerRequired

      Number of canceled payouts.

  • skippedarray of objectsRequired

    Rows that have not become payouts, with why; rows Paycose is still retrying are included.

    Show child attributes
    • skipped.rowintegerNullable

      Zero-based position of the line in the batch's rows. Omitted for entries that are not rows.

    • skipped.retryableboolean

      true while Paycose will still try the line again on its own.

    • skipped.attemptsinteger

      How many times Paycose has tried to create a payout for the line.

    • skipped.application_country_idstring

      Identifier of the country setup the skipped item belonged to. Set only on batches Paycose assembles itself.

    • skipped.accountstring

      ID of the account the line was to pay.

    • skipped.payoutstring

      ID of an existing payout the batch skipped, when the entry is a payout rather than a row.

    • skipped.currencystring

      Three-letter ISO 4217 currency code, in lowercase.

    • skipped.amountinteger

      Amount the line was to pay, in the currency's smallest unit (for example 49900 = 499.00 THB).

    • skipped.codestring

      Error code of the last failure, for example E4301, or create_failed when the failure had no code.

    • skipped.reasonstringRequired

      Why the line did not become a payout.

    • skipped.retry_aftertimestampNullable

      When Paycose will next try the line, in Unix seconds. Set only while retryable is true.

  • created_bystringRequired

    ID of the user who created the batch, or system.

  • created_by_typestringRequired

    Kind of creator.

    • merchant

      Created by you.

    • admin

      Created by a Paycose operator.

    • system

      Created automatically by Paycose, such as by the daily automatic payout run.

  • approved_attimestampRequiredNullable

    Unix timestamp in seconds.

  • approved_bystring

    ID of whoever approved the batch; omitted until it is approved. A batch you create is approved when it is created.

  • canceled_attimestampRequiredNullable

    Unix timestamp in seconds.

  • canceled_bystring

    ID of whoever canceled the batch; omitted unless it was canceled.

  • cancel_reasonstring

    Reason given when the batch was canceled; omitted when none.

  • createdtimestampRequired

    Time the object was created, in Unix seconds.

  • updatedtimestampRequired

    Time the object last changed, in Unix seconds.