Integration guides
Reconcile with your records
Keep your records and Merxian in agreement. Store your references on each resource, process events as they arrive, and compare with periodic reads.
On this page
Put your references on each resource#
| Resource | Field | Returned in |
|---|---|---|
| Transaction | externalReference |
The transaction, and external_reference in transaction.* events |
| Transaction | metadata |
The transaction, and metadata in transaction.* events |
| Checkout session | clientReferenceId |
The session, and client_reference_id in checkout.* events |
| Payment | metadata |
The payment |
| Refund | reference |
The refund |
Also store the Merxian IDs that you receive: txn_…, pay_…, rfnd_…, and cs_…. An ID is the most direct way to read a resource again.
Process events as they arrive#
Webhook events keep your records current. Update a record when you receive:
transaction.completed,transaction.partially_refunded,transaction.refunded, andtransaction.adjustedfor the amounts of a transaction.payment.succeededandpayment.failedfor each payment.refund.succeeded,refund.failed, andrefund.reversedfor each refund.invoice.issuedandinvoice.creditedfor the invoice and credit note numbers, when Merxian issues invoices for your account.
Events can arrive late, more than once, and in any order. See Process events.
Compare with periodic reads#
Events alone can miss a change, for example when your endpoint was down for longer than the retry window. Read the transactions of a period on a schedule and compare them with your records.
curl "https://api.merxian.com/v1/transactions?status=completed&fromDate=2026-09-14T00:00:00Z&toDate=2026-09-15T00:00:00Z&limit=100" \
-H "Authorization: Bearer $MERXIAN_API_KEY"fromDateincludes the time that you give.toDateexcludes it. So consecutive days do not overlap.- The list is newest first. Pass
pagination.nextCursorascursorto read the next page. The last page has nonextCursor. See Pagination and filters. - You can also filter by
customerId.
See GET/v1/transactions.
Amounts to compare#
All amounts are in minor units of the transaction currency. 14280 in EUR is €142.80.
| Field | Meaning |
|---|---|
amounts.total |
The amount of the transaction when it was finalized. |
adjustedRequiredAmount |
The amount required after adjustments. |
capturedAmount |
The amount that payments captured. |
refundedAmount |
The amount refunded. |
netCollectedAmount |
The captured amount less refunds. |
remainingCollectibleAmount |
The amount that is still to collect. |
For the payments of one transaction, call GET/v1/transactions/{transactionId}/payments. For one refund, call GET/v1/refunds/{refundId}.
Payouts#
Payouts are in the dashboard. The API has no payout endpoints, and payout events are not in the event catalogue yet. See Payouts.