Skip to main content

Reconcile a payout

This walkthrough starts from a deposit on your bank statement and works down to the individual card transactions behind it. At the end you have everything needed for the bookkeeping entry: gross sales, refunds, fees, and the net amount that reached the bank.

The examples use the Merchant API in test. For the Partner API, change the host and add AgreementNumber to each call so you work on one merchant at a time.

1. Find the payments for the day​

List the payments made on a given day:

curl -u "$USERNAME:$API_KEY" \
"https://partner-api.staging.straumur.is/api/Payments?PaidDateFrom=2026-10-21&PaidDateTo=2026-10-21"
{
"payments": [
{
"paymentID": "P-1000123-58-A",
"agreementNumber": "1000123",
"paidDate": "2026-10-21T09:14:02Z",
"currency": "ISK",
"payoutAmount": 1184250.00,
"settlements": ["2001045-412"],
// ...
}
],
"responseDateTime": "2026-10-22T08:30:11Z",
"responseIdentifier": "0f6b6f8e-6a9e-4a5e-9a58-1f2a7c0d9b41"
}

Match each payment to a bank deposit on payoutAmount, currency and paidDate. paymentID is the payment reference. Keep it with the deposit.

2. Get the settlements in the payment​

settlements lists the references of the settlements the payment covers. Look each one up:

curl -u "$USERNAME:$API_KEY" \
"https://partner-api.staging.straumur.is/api/Settlements?Reference=2001045-412"
{
"settlements": [
{
"reference": "2001045-412",
"settlementNumber": 412,
"agreementNumber": "1000123",
"currency": "ISK",
"grossPurchase": 1202500.00,
"grossSettlement": 1202500.00,
"feeAmount": -18250.00,
"deduction": 18250.00,
"netSettlement": 1184250.00,
"transactions": 318,
// ...
}
]
}

A settlement gives you the totals for the bookkeeping entry: gross sales (grossPurchase), refunds (refundAmount), the fees and other deductions (deduction, broken down in the fee fields), and the net amount (netSettlement). The netSettlement of all settlements in a payment adds up to the payment's payoutAmount. See Settlements for every field.

When a bank transfer fee applies, it is booked as a separate settlement with a negative netSettlement, and that settlement is listed in the same payment. If the net amount is below the minimum transfer amount for the currency, no payment is made yet. The settlement is paid together with a later one.

3. Get the transactions in each settlement​

Use the agreement number and the settlement number from step 2:

curl -u "$USERNAME:$API_KEY" \
"https://partner-api.staging.straumur.is/api/Transactions?AgreementNumber=1000123&SettlementNumber=412"

Each transaction has its grossAmount, the fees Straumur deducted, and the netAmount. For online payments, referenceData holds the merchant reference you sent with the payment, such as your order number. Use it to match each transaction to the sale in your own system. For terminal payments, match on terminalID, purchaseDate, authorizationNumber and the amount.

The sum of the transactions' netAmount can differ from the settlement's netSettlement. The difference is the amounts settled at agreement level and not per transaction, such as chargebacks and monthly fees. They are listed in the settlement's fee and dispute fields.

Settlement number and reference

A settlement has both a settlementNumber (412) and a reference (2001045-412). On transactions, the field called settlementNumber holds the settlement reference, and settlementID holds the settlement's ID. The SettlementNumber filter on /api/Transactions and /api/Settlements takes the number. Settlement numbers are unique per merchant only, so combine SettlementNumber with AgreementNumber when you use the Partner API.

Run it daily​

  1. Each morning after the settlement run, list yesterday's payments with PaidDateFrom and PaidDateTo.
  2. For each payment, fetch its settlements and post one entry per settlement.
  3. Fetch the transactions per settlement if you match sales one by one.
  4. Store paymentID and the settlement references so you do not post the same entry twice.

If you prefer to book sales when they settle and not when they are paid, list settlements by CreateDateFrom and CreateDateTo instead, and match the payment later.