Settlement Batch Summaries

The settlement batch summary displays the total sales and credits for each batch. This information can be aggregated by date, or by date and a custom field.

By date

result = braintree.SettlementBatchSummary.generate(
  datetime.datetime.today().strftime("%Y-%m-%d")
)
if result.is_success:
  print(result.settlement_batch_summary.records)
Python

By date and custom field

result = braintree.SettlementBatchSummary.generate(
  datetime.datetime.today().strftime("%Y-%m-%d"),
  "your_custom_field"
)
if result.is_success:
  print(result.settlement_batch_summary.records)
Python

Records data structure

Below is an example of the data structure returned by records.

[
  {
    "your_custom_field": "your_first_custom_value",
    "card_type": "MasterCard",
    "count": "24",
    "merchant_account_id": "your_merchant_account_id",
    "kind": "sale",
    "amount_settled": "1200.00"
  },
  {
    "your_custom_field":  'your_second_custom_value',
    "card_type": "MasterCard",
    "count": "42",
    "merchant_account_id": "your_merchant_account_id",
    "kind": "sale",
    "amount_settled": "1234.00"
  }
]
Python

See Also