List balance transactions¶
GET
https://api.mollie.com/v2/balances/*balanceId*/transactions
With the List balance transactions endpoint you can retrieve a list of all the movements on your balance. This includes payments, refunds, chargebacks, and settlements.
Parameters¶
Replace balanceId
in the endpoint URL by the balance ID, which can be retrieved by the
List balances endpoint.
from
stringoptionallimit
integeroptionalResponse¶
200
application/hal+json
count
integerThe number of transactions found in_embedded
, which is either the requested number (with a maximum of 250) or the default number._embedded
objectThe object containing the queried data.
resource
stringIndicates the response contains a balance transaction object. Will always containbalance_transaction
for this endpoint.id
stringThe identifier uniquely referring to this balance transaction. Mollie assigns this identifier at transaction creation time. For examplebaltr_QM24QwzUWR4ev4Xfgyt29d
.type
stringThe type of movement, for example
payment
orrefund
. Values include the below examples, although this list is not definitive.Regular payment processing:
payment
capture
unauthorized-direct-debit
failed-payment
Refunds and chargebacks:
refund
returned-refund
chargeback
chargeback-reversal
Settlements:
outgoing-transfer
canceled-outgoing-transfer
returned-transfer
Invoicing:
invoice-compensation
balance-correction
Mollie Connect:
application-fee
split-payment
platform-payment-refund
platform-payment-chargeback
resultAmount
amount objectThe final amount that was moved to or from the balance, e.g.
{"currency":"EUR", "value":"100.00"}
. If the transaction moves funds away from the balance, for example when it concerns a refund, the amount will be negative.currency
stringThe ISO 4217 currency code of the movement amount.value
stringA string containing the exact movement amount in the given currency.initialAmount
amount objectThe amount that was to be moved to or from the balance, excluding deductions. If the transaction moves funds away from the balance, for example when it concerns a refund, the amount will be negative.
currency
stringThe ISO 4217 currency code of the movement amount.value
stringA string containing the exact movement amount in the given currency.deductions
amount objectoptionalThe total amount of deductions withheld from the movement. For example, if a €10,00 payment comes in with a €0,29 fee, the
deductions
amount will be{"currency":"EUR", "value":"-0.29"}
.When moving funds to a balance, we always round the deduction to a ‘real’ amount. Any differences between these realtime rounded amounts and the final invoice will be compensated when the invoice is generated.
currency
stringThe ISO 4217 currency code of the deduction.value
stringA string containing the exact deduction in the given currency.createdAt
datetimeThe date and time of the movement, in ISO 8601 format.context
objectDepending on the
type
of the balance transaction, we will try to give more context about the specific event that triggered the movement. For example, the context object for apayment
transaction will look like{"paymentId": "tr_7UhSN1zuXS"}
.Below is a complete list of the context values that each type of transaction will have.
- Type
payment
:paymentId
- Type
capture
:paymentId
captureId
- Type
unauthorized-direct-debit
:paymentId
- Type
failed-payment
:paymentId
- Type
refund
:paymentId
refundId
- Type
returned-refund
:paymentId
refundId
- Type
chargeback
:paymentId
chargebackId
- Type
chargeback-reversal
:paymentId
- Type
outgoing-transfer
:settlementId
transferId
- Type
canceled-outgoing-transfer
:settlementId
transferId
- Type
returned-transfer
:settlementId
transferId
- Type
invoice-compensation
:invoiceId
- Type
balance-correction
: none- Type
application-fee
:paymentId
- Type
split-payment
:paymentId
- Type
platform-payment-refund
:paymentId
refundId
- Type
platform-payment-chargeback
:paymentId
chargebackId
_links
objectLinks to help navigate through the lists of balance transactions. Every URL object will contain an
href
and atype
field.self
URL objectThe URL to the current set of balance transactions.previous
URL objectThe previous set of balance transactions, if available.next
URL objectThe next set of balance transactions, if available.documentation
URL objectThe URL to the balance transactions list endpoint documentation.
Example¶
Request¶
1 2 curl -X GET https://api.mollie.com/v2/balances/baltr_QM24QwzUWR4ev4Xfgyt29A/transactions?limit=5 \ -H "Authorization: Bearer access_vR6naacwfSpfaT5CUwNTdV5KsVPJTNjURkgBPdvW"
1 2 3 4 5 6 7 8 9 <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setAccessToken("access_vR6naacwfSpfaT5CUwNTdV5KsVPJTNjURkgBPdvW"); $balanceTransactions = $mollie->balanceTransactions->listFor( "baltr_QM24QwzUWR4ev4Xfgyt29A", [ "limit" => 5, ] );
Response¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | HTTP/1.1 200 OK Content-Type: application/hal+json { "count": 5, "_embedded": { "balance_transactions": [ { "resource": "balance_transaction", "id": "baltr_QM24QwzUWR4ev4Xfgyt29A", "type": "refund", "resultAmount": { "value": "-10.25", "currency": "EUR" }, "initialAmount": { "value": "-10.00", "currency": "EUR" }, "deductions": { "value": "-0.25", "currency": "EUR" }, "createdAt": "2021-01-10T12:06:28+00:00", "context": { "paymentId": "tr_7UhSN1zuXS", "refundId": "re_4qqhO89gsT" } }, { "resource": "balance_transaction", "id": "baltr_QM24QwzUWR4ev4Xfgyt29B", "type": "payment", "resultAmount": { "value": "9.71", "currency": "EUR" }, "initialAmount": { "value": "10.00", "currency": "EUR" }, "deductions": { "value": "-0.29", "currency": "EUR" }, "createdAt": "2021-01-10T12:06:28+00:00", "context": { "paymentId": "tr_7UhSN1zuXS" } } ] }, "_links": { "documentation": { "href": "https://docs.mollie.com/reference/v2/balances-api/list-balance-transactions", "type": "text/html" }, "self": { "href": "https://api.mollie.com/v2/balances/bal_gVMhHKqSSRYJyPsuoPNFH/transactions?limit=5", "type": "application/hal+json" }, "previous": null, "next": null } } |