Skip to content

How to Automate Bank Reconciliation

A payment operator’s payout reaches the business’s bank account as a single line, although it bundles many payments. The article describes how to match it through the APIs with the ProAbono invoices it settles, starting from either side:

  • the operator’s data: every payment created in Stripe or GoCardless by ProAbono carries pa_ metadata, pa_invoice_id among it, which ties the payment to its ProAbono invoice;
  • ProAbono’s data: the automated transactions list gives, for each transaction, its invoice and its identifier at the operator.

The metadata and the list are presented in ProAbono Metadata in Stripe and ProAbono Metadata in GoCardless.

  • A Stripe or GoCardless account connected to the ProAbono business.
  • Access to the operator’s API: a Stripe API key, or a GoCardless access token.
  • The ProAbono API keys: see How to Get My API Keys.

The operator’s API lists what a payout contains:

  • at Stripe, the Balance Transactions API, filtered on the payout with the payout parameter, a filter available for automatic payouts only. The source property of each transaction names the object behind it, for instance ch_… for a payment or re_… for a refund;
  • at GoCardless, the Payout Items API (GET /payout_items?payout=…), which only serves payouts created in the last 6 months. The links.payment link of each item names the payment it relates to.

The metadata object of each payment carries pa_invoice_id, the reconciliation key: that identifier designates a single ProAbono invoice.

  • At Stripe, the charge (ch_…) and its PaymentIntent (pi_…) both carry the metadata; the charge comes with the request of step 1 when source is expanded (expand[]=data.source).
  • At GoCardless, the payment named by links.payment is read through the Payments API.

The value of pa_invoice_id is passed as it stands as the IdInvoice of the invoice retrieval call.

Request

GET https://api-42.proabono.com/v1/Invoice/4574980

Response

{
"Id": 4574980,
"IdSegment": 69,
"IdCustomer": 133700,
"ReferenceSegment": "demo-eur",
"ReferenceCustomer": "cust-42",
"FullNumber": "S-69.00000175",
"AmountTotal": 45480,
"Currency": "EUR",
"…": "…"
}

Each line of the payout is thereby tied to a ProAbono invoice, identified by the number printed on the document (FullNumber) and by its customer (ReferenceCustomer).

The automated transactions of a period are extracted through the API BackOffice. DateCreationMin and DateCreationMax bound the creation date of the transactions, and each Extra parameter adds an object to every transaction: its customer (Customer), its invoice (Invoice) and its reference at the operator (TransactionSpecific).

The results are paginated as in the API Live: Page selects the page, SizePage sets the number of transactions per page — 10 by default —, TotalItems gives the total number of transactions, and the next link of Links leads to the following page.

Request

GET https://via.proabono.com/Gateway/GatewayTransactions?DateCreationMin=2026-07-01T00:00:00.00Z&DateCreationMax=2026-08-01T00:00:00.00Z&Page=1&IdBusiness=42&Extra=Customer&Extra=TransactionSpecific&Extra=Invoice

Response

{
"Page": 1,
"SizePage": 10,
"Count": 10,
"TotalItems": 23,
"DateGenerated": "2026-08-01T08:00:00.00Z",
"Items": [
{
"Id": 1214730,
"DateCreation": "2026-07-15T09:12:00.00Z",
"IdBusiness": 42,
"IdSegment": 69,
"IdCustomer": 133700,
"IdInvoice": 4574980,
"Amount": 45480,
"TypePayment": "DirectDebit",
"TypeGateway": "DirectDebitGoCardlessSepaV2",
"TypeTransaction": "Debit",
"StateTransaction": "Success",
"ReferenceTransaction": "PM01K8Z3QH7R2X5V9C4N6B1T0WAD",
"NameReference": "payment_id",
"Customer": {
"Id": 133700,
"ReferenceCustomer": "cust-42",
"Name": "John Doe",
"…": "…"
},
"TransactionSpecific": {
"Name": "payment_id",
"Value": "PM01K8Z3QH7R2X5V9C4N6B1T0WAD"
},
"Invoice": {
"Id": 4574980,
"FullNumber": "S-69.00000175",
"Status": "Paid",
"AmountTotal": 45480,
"…": "…"
},
"…": "…"
},
"…"
],
"Links": [
{
"rel": "next",
"href": "/Gateway/GatewayTransactions?DateCreationMin=2026-07-01T00:00:00.00Z&DateCreationMax=2026-08-01T00:00:00.00Z&Page=2&IdBusiness=42&Extra=Customer&Extra=TransactionSpecific&Extra=Invoice"
}
]
}

The payments in the payout are listed through the operator’s API, as in step 1 of the previous procedure.

The join is made on the transaction identifier at the operator: ReferenceTransaction on the ProAbono side, source at Stripe (ch_…), links.payment at GoCardless (PM…). Each payment in the payout is thereby tied to its ProAbono invoice, whose Invoice object gives the number (FullNumber).