Merchants
Read a merchant's book
What was issued under one merchant over a period, and what was taken back, with the period’s totals per currency.
GET
A Loan may name the merchant it financed a purchase at, by your own
A missing, malformed or inverted
merchant_ref on the issuance. This read answers, for that merchant and a period: every sale that bound inside the period — on its anchor, or on its confirmation’s date where it was issued with a hold — with its principal and its state; and every return, cancellation, rescission, void and withdrawal recorded on such a Loan with its date inside the period, with its figure. Beside the entries, the whole period’s totals per currency — on every page.
A hold is no sale until it is confirmed. As a card authorisation is settled only once captured, a Loan issued with a hold enters the book on the day it is confirmed. One that expired or was voided unconfirmed never bound and is on no merchant’s book. A confirmation after a period never reaches back into it, so a period you settled stays settled.
Settlement is your ledger. What you owe the merchant is the principal issued, less the commission your agreement states and that commission’s tax, less what was taken back, plus or minus any subsidy you agreed. The Platform holds no agreement and no merchant. It repeats on each issuance the commission your configuration version states, as merchant_commission_bps, and serves every figure the settlement starts from; the subtraction your agreement states is yours.
A retracted fact is off the book. The Platform keeps no register of merchants, so a
merchant_ref no Loan names is an empty book, not a 404.
Path parameters
The merchant, as your Loans name it. Letters, digits, hyphen and underscore, 1 to 64; anything else is
400 invalid_query.Query parameters
The period’s first day, included. Required and never defaulted — there is no today the Platform can supply.
from or to, and any other parameter, is 400 invalid_query.
Response
The whole period, one row per currency, ordered by code. Each row states
issued, returned, cancelled, rescinded, voided and withdrawn as {count, amount} — a kind the period holds none of is a stated zero, so you subtract without checking whether a field is there.